#include <Snapshot.h>
|
| 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) More...
|
| |
| static bool | ExtractTimeStamp (const QDomElement &xmlElement, unsigned long &timeStamp) |
| | Extract information about snapshot creation time from given xml node. More...
|
| |
| Enumerator |
|---|
| TypeUndefined |
|
| TypeOneWayTicket |
|
| TypeTimeTicket |
|
| 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
| 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::TimeTicketSnapshot, and EM::TicketIssueLogic::OneWayTicketSnapshot.
| 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
| const std::string & Snapshot::GetCardUID |
( |
| ) |
const |
| unsigned long Snapshot::GetTicketNumber |
( |
| ) |
const |
| unsigned long Snapshot::GetTimeStamp |
( |
| ) |
const |
| 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::TimeTicketSnapshot, and EM::TicketIssueLogic::OneWayTicketSnapshot.
| void Snapshot::SetCardUID |
( |
const std::string & |
uid | ) |
|
| void Snapshot::SetTicketNumber |
( |
const unsigned long |
ticketNumber | ) |
|
| void Snapshot::SetTimeStamp |
( |
const unsigned long |
timeStamp | ) |
|
The documentation for this class was generated from the following files: