AppCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
EM::TicketIssueLogic::OneWayTicketSnapshot Class Reference

#include <OneWayTicketSnapshot.h>

Inheritance diagram for EM::TicketIssueLogic::OneWayTicketSnapshot:
Inheritance graph
[legend]
Collaboration diagram for EM::TicketIssueLogic::OneWayTicketSnapshot:
Collaboration graph
[legend]

Public Member Functions

 OneWayTicketSnapshot ()
 
virtual ~OneWayTicketSnapshot ()
 
void SetTicketType (const unsigned long type)
 
void SetData (const unsigned char ticketIndex, const std::string &snapshotData)
 
unsigned long GetTicketType () const
 
bool GetData (const unsigned char ticketIndex, std::string &snapshotData) const
 
virtual bool Serialize (QDomDocument &doc, QDomElement &newElement) const
 Serialize saves snapshot into given xml element (Sets attributes and value/data) More...
 
virtual bool Deserialize (const QDomElement &xmlElement)
 Deserialize loads attributes and data from given XML element and sets snapshot members with its values. More...
 
- Public Member Functions inherited from EM::TicketIssueLogic::Snapshot
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
 

Additional Inherited Members

- Public Types inherited from EM::TicketIssueLogic::Snapshot
enum  SnapshotType { TypeUndefined = 0, TypeOneWayTicket = 1, TypeTimeTicket = 2 }
 
- Static Public Member Functions inherited from EM::TicketIssueLogic::Snapshot
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...
 
- Protected Member Functions inherited from EM::TicketIssueLogic::Snapshot
 Snapshot (const SnapshotType type)
 
virtual ~Snapshot ()
 

Constructor & Destructor Documentation

INTERNAL OneWayTicketSnapshot::OneWayTicketSnapshot ( )
OneWayTicketSnapshot::~OneWayTicketSnapshot ( )
virtual

Member Function Documentation

bool OneWayTicketSnapshot::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 from EM::TicketIssueLogic::Snapshot.

Here is the call graph for this function:

bool OneWayTicketSnapshot::GetData ( const unsigned char  ticketIndex,
std::string &  snapshotData 
) const

Here is the caller graph for this function:

unsigned long OneWayTicketSnapshot::GetTicketType ( ) const

Here is the caller graph for this function:

bool OneWayTicketSnapshot::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 from EM::TicketIssueLogic::Snapshot.

Here is the call graph for this function:

void OneWayTicketSnapshot::SetData ( const unsigned char  ticketIndex,
const std::string &  snapshotData 
)
void OneWayTicketSnapshot::SetTicketType ( const unsigned long  type)

The documentation for this class was generated from the following files: