#include <SnapshotHandler.h>
◆ SnapshotHandler()
◆ ~SnapshotHandler()
| SnapshotHandler::~SnapshotHandler |
( |
| ) |
|
|
virtual |
◆ CheckIfRollbackOfOneWayTicketIsPossible()
CheckIfRollbackOfOneWayTicketIsPossible - detects if rollback from snapshots of one way ticket is possible according to combination of current settings of tariff system.
- Parameters
-
| rollbackPossible | - output parameter where result will be stored. Will be set to true if rollback from snapshot is possible |
- Returns
- See also
- EIssueLogicDefines::ReturnValues
◆ CheckIfSnapshotIsRequired()
Check if it's required to save snapshot of some ticket from card to catch state before operation was just realized. Checks data in DataStorage (like Operaration, CardWrite flags, IssuedTicket ...)
- Parameters
-
| saveSnapshot | - output parameter telling if snapshot should be saved |
- Returns
- value from EIssueLogicDefines::ReturnValues (Ok on success)
◆ Init()
◆ LoadSnapshot()
Find snapshot in XML file with saved snapshots and return it (in output parameter)
- Parameters
-
| cardUID | - UID of card which ticket is meant for (card where ticket will be written) |
| ticketNumber | - number of statistical ticket for which snapshot was created |
| type | |
| snapshot | - output parameter filled with data read from XML (from found snapshot) |
- Returns
- value from EIssueLogicDefines::ReturnValues (Ok when snapshot is found and deserialized from XML)
◆ RestoreOneWayTicketFromSnapshot()
◆ RestoreTimeTicketFromSnapshot()
Restore ticket from snapshot and write it to card (set via facade)
- Parameters
-
| cardUID | - UID of card which ticket is meant for (card where ticket will be written). Used to identify snapshot together with ticketNumber |
| ticketNumber | - number of statistical ticket for which snapshot was created. Used to identify snapshot together with cardUID |
- Returns
- value from EIssueLogicDefines::ReturnValues (Ok on success)
◆ SaveSnapshot()
Create and save snapshot into xml file. Ticket is determined by data in dataStorage (cardWrite flags, ticket index, etc.)
- Note
- Old snapshots are removed from XML on save.
- Returns
- value from EIssueLogicDefines::ReturnValues (Ok on success)
The documentation for this class was generated from the following files: