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

#include <ETimeTicketModule.h>

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

Public Member Functions

 ETimeTicketModule (ETicketIssueLogic *ticketIssueLogic, ETicketIssueLogicDataStorage *dataStorage, std::string moduleName=E_TIME_TICKET_MODULE_NAME)
 
virtual ~ETimeTicketModule ()
 
virtual
EIssueLogicDefines::ReturnValues 
FindAndStoreValidTimeTickets ()
 Searches for valid time ticket on card. More...
 
virtual
EIssueLogicDefines::ReturnValues 
DoTimeTicketJourney ()
 Sets data about timeTicket journey to card. More...
 
virtual
EIssueLogicDefines::ReturnValues 
Init ()
 Function saves (into memebers) some more frequently used modules. More...
 
virtual
EIssueLogicDefines::ReturnValues 
CheckTimeValidity (const unsigned char timeTicketIndex, bool &valid)
 checks time validity of time ticket on given index. In parameter valid will be stored information whether it's valid or not. More...
 
EIssueLogicDefines::ReturnValues CheckUrbanTransportOnBusstop (const unsigned char timeTicketIndex, const long busStopLineOrder, bool &valid) const
 Compares urban transport number on card and on busstop (they have to be equal) More...
 
EIssueLogicDefines::ReturnValues CheckNetworkOnBusstop (const unsigned char timeTicketIndex, const unsigned long busStopLineOrder, const unsigned long sectionStart, bool &valid) const
 checks if idsNID == cardNID More...
 
EIssueLogicDefines::ReturnValues CheckUTNOrNetworkIDValidity (const unsigned char timeTicketIndex, const unsigned long busStopLineOrder, const unsigned long sectionStart, bool &timeTicketValid) const
 CheckUTNOrNetworkIDValidity - Check urban transport number or network ID validity. More...
 
EIssueLogicDefines::ReturnValues GetZonesCoveredByTimeTickets (std::vector< unsigned short > &zones)
 GetZonesCoveredByTimeTickets. More...
 
- Public Member Functions inherited from EM::TicketIssueLogic::ETicketIssueModule
 ETicketIssueModule (const std::string &name, EIssueLogicDefines::ModuleFamily moduleFamily)
 
virtual ~ETicketIssueModule ()
 
bool GetName (std::string &moduleName)
 unique module identificator More...
 
bool GetModuleFamily (EIssueLogicDefines::ModuleFamily &moduleFamily)
 return by reference module family More...
 

Protected Member Functions

virtual
EIssueLogicDefines::ReturnValues 
CheckSupplementaryConditions (const unsigned char timeTicketIndex, bool &valid)
 performs supplemtary checks on time ticket (e.g. number of trips on trip card). In parameter valid will be stored information whether it's valid or not. More...
 
virtual
EIssueLogicDefines::ReturnValues 
CheckTariffValidity (unsigned char timeTicketIndex, bool &valid)
 Checks if tariff for specified tariffTicketNumber exists and then checks if it's placed on tariff group (if it should be checked) More...
 
virtual
EIssueLogicDefines::ReturnValues 
SetOneWayTicketData (bool flagCanDoInterchange)
 sets one-way ticket's data holding informations about journey on time ticket More...
 
virtual
EIssueLogicDefines::ReturnValues 
CheckHoursTimeTicket (const short timeTicketIndex, bool &validTimeTicketOnTrip)
 CheckHoursTimeTicket - Check hoursTimeTicket validity. TEMPORARY FUNCTION. More...
 

Constructor & Destructor Documentation

INTERNAL ETimeTicketModule::ETimeTicketModule ( ETicketIssueLogic ticketIssueLogic,
ETicketIssueLogicDataStorage dataStorage,
std::string  moduleName = E_TIME_TICKET_MODULE_NAME 
)

CONSTRUCTOR

ETimeTicketModule::~ETimeTicketModule ( )
virtual

DESTRUCTOR

Member Function Documentation

EIssueLogicDefines::ReturnValues ETimeTicketModule::CheckHoursTimeTicket ( const short  timeTicketIndex,
bool &  validTimeTicketOnTrip 
)
protectedvirtual

CheckHoursTimeTicket - Check hoursTimeTicket validity. TEMPORARY FUNCTION.

Parameters
timeTicketIndex- index of time ticket to be checked
validTimeTicketOnTrip- output param. True if time ticket with index timeTicketIndex is valid on given bus stop
Returns
Ok - found valid hours time ticket
See also
EIssueLogicDefines::ReturnValues

CheckHoursTimeTicket

EM::TicketIssueLogic::ETimeTicketModule::CheckNetworkOnBusstop ( const unsigned char  timeTicketIndex,
const unsigned long  busStopLineOrder,
const unsigned long  sectionStart,
bool &  valid 
) const

checks if idsNID == cardNID

CheckNetworkOnBusstop

Parameters
timeTicketIndex- index of time ticket to be checked
valid- output param. True if time ticket with index timeTicketIndex has same NID as idsNID
busStopLineOrder- order on line of bus stop
sectionStart- order on line of first bus stop currently processed
Returns
Ok - all ok
See also
EIssueLogicDefines::ReturnValues

Here is the call graph for this function:

Here is the caller graph for this function:

EIssueLogicDefines::ReturnValues ETimeTicketModule::CheckSupplementaryConditions ( const unsigned char  timeTicketIndex,
bool &  valid 
)
protectedvirtual

performs supplemtary checks on time ticket (e.g. number of trips on trip card). In parameter valid will be stored information whether it's valid or not.

Parameters
timeTicketIndex- index of ime ticket to be checked
valid- holds information of time ticket on given index is valid (output parameter)
Returns
EIssueLogicDefines::Ok when everything's fine. When error occurs, other value from enum will be returned

CheckSupplementaryConditions

Here is the call graph for this function:

Here is the caller graph for this function:

EIssueLogicDefines::ReturnValues ETimeTicketModule::CheckTariffValidity ( unsigned char  timeTicketIndex,
bool &  valid 
)
protectedvirtual

Checks if tariff for specified tariffTicketNumber exists and then checks if it's placed on tariff group (if it should be checked)

Parameters
tariffTicketNumber- ID of tariff of time ticket
valid- stores if tariff is valid or not
Returns
EIssueLogicDefines::Ok when everything's fine
EIssueLogicDefines::BadInputData when failed to get tariff group from storage

CheckTariffValidity

Here is the call graph for this function:

Here is the caller graph for this function:

EIssueLogicDefines::ReturnValues ETimeTicketModule::CheckTimeValidity ( const unsigned char  timeTicketIndex,
bool &  valid 
)
virtual

checks time validity of time ticket on given index. In parameter valid will be stored information whether it's valid or not.

Parameters
timeTicketIndex- index of ime ticket to be checked
valid- holds information of time ticket on given index is valid (output parameter)
Returns
EIssueLogicDefines::Ok when everything's fine. When error occurs, other value from enum will be returned
Note
it's public because sometimes application needs to know if ticket is time-valid or not (e.g card info)

CheckTimeValidity

Here is the call graph for this function:

Here is the caller graph for this function:

EM::TicketIssueLogic::ETimeTicketModule::CheckUrbanTransportOnBusstop ( const unsigned char  timeTicketIndex,
const long  busStopLineOrder,
bool &  valid 
) const

Compares urban transport number on card and on busstop (they have to be equal)

CheckUrbanTransportOnBusstop

Parameters
timeTicketIndex- index of time ticket to be checked
busStopLineOrder- order on line of bus stop, that is being checked if time ticket is valid on it
valid- output param. True if time ticket with index timeTicketIndex is valid on given bus stop
Returns
Ok - all ok
See also
EIssueLogicDefines::ReturnValues

Here is the call graph for this function:

Here is the caller graph for this function:

EIssueLogicDefines::ReturnValues ETimeTicketModule::CheckUTNOrNetworkIDValidity ( const unsigned char  timeTicketIndex,
const unsigned long  busStopLineOrder,
const unsigned long  sectionStart,
bool &  timeTicketValid 
) const

CheckUTNOrNetworkIDValidity - Check urban transport number or network ID validity.

Parameters
timeTicketIndex- index of time ticket to be checked
busStopLineOrder- bus stop to be checked
sectionstart - order on line of first bus stop in section currently processed
timeTicketValid- output param. True if time ticket with index timeTicketIndex is valid on given bus stop
Note
calls CheckNetworkOnBusstop or ETimeTicketModule::CheckUrbanTransportOnBusstop
Returns
Ok - all ok
See also
EIssueLogicDefines::ReturnValues

CheckUTNOrNetworkIDValidity

Here is the call graph for this function:

EM::TicketIssueLogic::ETimeTicketModule::DoTimeTicketJourney ( )
virtual

Sets data about timeTicket journey to card.

DoTimeTicketJourney

Returns
EIssueLogicDefines::Ok when everything's fine. When error occurs, other value from enum will be returned

Here is the call graph for this function:

EIssueLogicDefines::ReturnValues ETimeTicketModule::FindAndStoreValidTimeTickets ( )
virtual

Searches for valid time ticket on card.

Returns
EIssueLogicDefines::Ok when everything's fine. When error occurs, other value from enum will be returned

FindAndStoreValidTimeTicket

Here is the call graph for this function:

EIssueLogicDefines::ReturnValues ETimeTicketModule::GetZonesCoveredByTimeTickets ( std::vector< unsigned short > &  zones)

GetZonesCoveredByTimeTickets.

Parameters
zones- output parameter - zones covered by valid time tickets
Returns
Ok - all ok
See also
EIssueLogicDefines::ReturnValues

GetZonesCoveredByTimeTickets

Here is the call graph for this function:

EIssueLogicDefines::ReturnValues ETimeTicketModule::Init ( void  )
virtual

Function saves (into memebers) some more frequently used modules.

Returns
Ok - when everything's fine
ErrorInitModules - failed to get module manager
ModuleNotFound - when module manager did not found required module

Init

Reimplemented from EM::TicketIssueLogic::ETicketIssueModule.

Here is the call graph for this function:

EIssueLogicDefines::ReturnValues ETimeTicketModule::SetOneWayTicketData ( bool  flagCanDoInterchange)
protectedvirtual

sets one-way ticket's data holding informations about journey on time ticket

Parameters
flagCanDoInterchange- flag that have value from output of function EInterchangeModule::IsInterchangePossible
Returns
EIssueLogicDefines::Ok when everything's fine. When error occurs, other value from enum will be returned

SetOneWayTicketData

Here is the call graph for this function:

Here is the caller graph for this function:


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