#include <Snapshot.h>
|
| void | SetCardUID (const std::string &uid) |
| |
| void | SetTicketNumber (const unsigned long ticketNumber) |
| |
| void | SetTimeStamp (const unsigned long timeStamp) |
| |
| const std::string & | GetCardUID () const |
| |
| unsigned long | GetTicketNumber () const |
| |
| SnapshotType | GetSnapshotType () const |
| |
| unsigned long | GetTimeStamp () const |
| |
| virtual bool | Serialize (QDomDocument &doc, QDomElement &newElement) const |
| | Serialize saves snapshot into given xml element (Sets attributes and value/data)
|
| |
| virtual bool | Deserialize (const QDomElement &xmlElement) |
| | Deserialize loads attributes and data from given XML element and sets snapshot members with its values.
|
| |
|
| static bool | Check (const QDomElement &xmlElement, const std::string &cardUID, const unsigned long ticketNumber, const SnapshotType type) |
| | Check if this snapshot has required parameters (given as arguments)
|
| |
| static bool | ExtractTimeStamp (const QDomElement &xmlElement, unsigned long &timeStamp) |
| | Extract information about snapshot creation time from given xml node.
|
| |
◆ SnapshotType
| Enumerator |
|---|
| TypeUndefined | |
| TypeOneWayTicket | |
| TypeTimeTicket | |
◆ Snapshot()
◆ ~Snapshot()
◆ Check()
| bool Snapshot::Check |
( |
const QDomElement & |
xmlElement, |
|
|
const std::string & |
cardUID, |
|
|
const unsigned long |
ticketNumber, |
|
|
const SnapshotType |
type |
|
) |
| |
|
static |
Check if this snapshot has required parameters (given as arguments)
- Parameters
-
| cardUID | - UID of card from which snapshot has to originate |
| ticketNumber | - number of statistic ticket for operation to be cancelled (snapshot come from state right before this operation) |
| type | - type of required snapshot (TimeTicket/OneWayTicket...) |
- Returns
- true if snapshot corresponds with given arguments, false if not
◆ Deserialize()
| bool Snapshot::Deserialize |
( |
const QDomElement & |
xmlElement | ) |
|
|
virtual |
Deserialize loads attributes and data from given XML element and sets snapshot members with its values.
- Parameters
-
| xmlElement | - reference to XML element with snapshot parameters and data (created with Serialize) |
- Returns
- false on data extraction error (e.g. failed to convert som data from text) or other error. True when loading values was successful.
Reimplemented in EM::TicketIssueLogic::OneWayTicketSnapshot, and EM::TicketIssueLogic::TimeTicketSnapshot.
◆ ExtractTimeStamp()
| bool Snapshot::ExtractTimeStamp |
( |
const QDomElement & |
xmlElement, |
|
|
unsigned long & |
timeStamp |
|
) |
| |
|
static |
Extract information about snapshot creation time from given xml node.
- Parameters
-
| xmlElement | - xml element whit snapshot information |
| timeStamp | - output parameter filled with time of snapshot creation |
- Returns
- false on error. True when extraction was without errors
◆ GetCardUID()
| const std::string & Snapshot::GetCardUID |
( |
| ) |
const |
◆ GetSnapshotType()
◆ GetTicketNumber()
| unsigned long Snapshot::GetTicketNumber |
( |
| ) |
const |
◆ GetTimeStamp()
| unsigned long Snapshot::GetTimeStamp |
( |
| ) |
const |
◆ Serialize()
| bool Snapshot::Serialize |
( |
QDomDocument & |
doc, |
|
|
QDomElement & |
newElement |
|
) |
| const |
|
virtual |
Serialize saves snapshot into given xml element (Sets attributes and value/data)
- Parameters
-
| doc | - reference to instance of QDomDocument where element will be saved (used to create data node) |
| newElement | - reference to XML element to be filled with snapshot data |
- Returns
- true on successful serializtion (xml element filling), otherwise false
Reimplemented in EM::TicketIssueLogic::OneWayTicketSnapshot, and EM::TicketIssueLogic::TimeTicketSnapshot.
◆ SetCardUID()
| void Snapshot::SetCardUID |
( |
const std::string & |
uid | ) |
|
◆ SetTicketNumber()
| void Snapshot::SetTicketNumber |
( |
const unsigned long |
ticketNumber | ) |
|
◆ SetTimeStamp()
| void Snapshot::SetTimeStamp |
( |
const unsigned long |
timeStamp | ) |
|
The documentation for this class was generated from the following files: