AppCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass Class Reference
Collaboration diagram for EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass:
Collaboration graph
[legend]

Public Member Functions

 DataClass (ETicketIssueLogicDataStorage *dataStorage, TripSectionPostProcessModule *dataClassOwner)
 
 ~DataClass ()
 
EIssueLogicDefines::ReturnValues PostProcessForNonCombinedTicket () const
 when combining is OFF, only one segment (for whole journey) is created and continuous trips are handeld in price calculation More...
 
EIssueLogicDefines::ReturnValues PostProcessForSimpleCombinedTicket () const
 if were created more than 2 trip sections I delete it, and create new max 2 trip sections More...
 
EIssueLogicDefines::ReturnValues PostProcessForByway () const
 PostProcessForByway pass all trip section from trip section collection and check 'byway validity'. If trip section is byway invalid => trip section will be removed from trip section collection in data storage. More...
 
EIssueLogicDefines::ReturnValues EvaluateBywayTypeForSection (EIssueLogicDefines::TripSectionType tripSectionType, long sectionCheckoutBusStopLineOrder, long sectionCheckinBusStopLineOrder, BywayType &useBywayType) const
 Prepare byway type by trip section type. More...
 
EIssueLogicDefines::ReturnValues PostProcessRemoveOneBusStopSectionOnBorderOfDifferentTariffSystem () const
 
EIssueLogicDefines::ReturnValues IsTransitionFromIDSToNoIDSTariffSystem (TripSection *firstTripSection, TripSection *secondTripSection, bool &isTransitionFromIDSToNoIDSTariffSystem) const
 Checks transtition from IDS tariff system to no-IDS tariff system. More...
 
EIssueLogicDefines::ReturnValues CompareIDSNumberOnSections (TripSection *firstTripSection, TripSection *secondTripSection, bool &sameIDSNumber) const
 
EIssueLogicDefines::ReturnValues GetIDSNumberByTripSection (const TripSection *tripSection, unsigned int &sectionIDSNumber) const
 GetIDSNumberByTripSection - get IDS number from tariff group on tripSection. More...
 
EIssueLogicDefines::ReturnValues PostProcessAdditionalRouteZones () const
 
EIssueLogicDefines::ReturnValues PostProcessRemoveEmptyTimeTicketJourneys () const
 
EIssueLogicDefines::ReturnValues GetTimeTicketCoverage (std::map< short, std::list< unsigned long > > &timeTicketCoverage, std::list< unsigned long > additionalZones) const
 
EIssueLogicDefines::ReturnValues GetTravelledZones (const TripSection *firstTripSection, const TripSection *secondTripSection, std::list< unsigned long > &travelledZones) const
 gain union of travelled zones from two trip sections More...
 
bool IsEnabledPostProcessRemoveOnBusStopSectionOnBorderOfDifferentTariffSystem (const TripSection *firstTripSection, const TripSection *lastTripSection) const
 
void AddSingleBusStopSectionToAdditionalZones (TripSection *tripSection) const
 AddSingleBusStopSectionToAdditionalZones - if additional zones collection exists, add zone from single bus stop tripSection to additional zone collection. More...
 

Public Attributes

ETicketIssueLogicDataStoragemDataStorage
 
TripSectionPostProcessModulemDataClassOwner
 
ETripSectionModulemTripSectionModule
 

Constructor & Destructor Documentation

EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::DataClass ( ETicketIssueLogicDataStorage dataStorage,
TripSectionPostProcessModule dataClassOwner 
)
inline
EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::~DataClass ( )
inline

Member Function Documentation

void EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::AddSingleBusStopSectionToAdditionalZones ( TripSection tripSection) const

AddSingleBusStopSectionToAdditionalZones - if additional zones collection exists, add zone from single bus stop tripSection to additional zone collection.

Parameters
tripSection- trip section with single bus stop (start bus stop is the same as end bus stop)

Here is the call graph for this function:

EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::CompareIDSNumberOnSections ( TripSection firstTripSection,
TripSection secondTripSection,
bool &  sameIDSNumber 
) const
Parameters
sameIDSNumber- output param - false - different IDS number on firstTripSection and secondTripSection
sameIDSNumber- output param - true - same IDS number on firstTripSection and secondTripSection
Returns
EIssueLogicDefines::NullInternalPointer - one of trip section is NULL
EIssueLogicDefines::NullTariffGroup - one of tariff group is NULL

compareIDSNumberOnSections

EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::EvaluateBywayTypeForSection ( EIssueLogicDefines::TripSectionType  tripSectionType,
long  sectionCheckoutBusStopLineOrder,
long  sectionCheckinBusStopLineOrder,
BywayType &  useBywayType 
) const

Prepare byway type by trip section type.

Note
Case 0 for time ticket section type: set useBywayType on value BywayTypeTimeTicket
Case 1 for cash section type: Found valid TimeTicket on checkIn and checkOut bus stop. In this case set useBywayType on value BywayTypeTimeTicket
Case 2 for cash section type: Not found valid TimeTicket on someone bus stop. In this case set useBywayType on value BywayTypeOneWayTicket
see documentation in .cpp file
Parameters
sectionCheckoutBusStopLineOrder- actual trip section
sectionCheckoutBusStopLineOrder- last section bus stop
sectionCheckinBusStopLineOrder- first section bus stop
useBywayType- output value. See
See also
note case 0 || 1 || 2
Returns
Ok - all ok
See also
EIssueLogicDefines::ReturnValues
EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::GetIDSNumberByTripSection ( const TripSection tripSection,
unsigned int &  sectionIDSNumber 
) const

GetIDSNumberByTripSection - get IDS number from tariff group on tripSection.

Returns
Ok - all ok
See also
EIssueLogicDefines::ReturnValues

Here is the call graph for this function:

EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::GetTimeTicketCoverage ( std::map< short, std::list< unsigned long > > &  timeTicketCoverage,
std::list< unsigned long >  additionalZones 
) const

Here is the call graph for this function:

EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::GetTravelledZones ( const TripSection firstTripSection,
const TripSection secondTripSection,
std::list< unsigned long > &  travelledZones 
) const

gain union of travelled zones from two trip sections

Parameters
firstTripSection- first trip section
secondTripSection- second trip section
travelledZones- output param - contain travelled zones from firstTripSection and secondTripSection
Returns
Ok - all ok
See also
EIssueLogicDefines::ReturnValues

Here is the call graph for this function:

bool EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::IsEnabledPostProcessRemoveOnBusStopSectionOnBorderOfDifferentTariffSystem ( const TripSection firstTripSection,
const TripSection lastTripSection 
) const
EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::IsTransitionFromIDSToNoIDSTariffSystem ( TripSection firstTripSection,
TripSection secondTripSection,
bool &  isTransitionFromIDSToNoIDSTariffSystem 
) const

Checks transtition from IDS tariff system to no-IDS tariff system.

Parameters
isTransitionFromIDSToNoIDSTariffSystem- output param - true - IDS number defined by tariff group on firstTripSection is different as value 0 AND IDS number defined by tariff group on secondTripSection is value 0.
Returns
EIssueLogicDefines::NullTariffGroup - one of tariff group is NULL
EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::PostProcessAdditionalRouteZones ( ) const
EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::PostProcessForByway ( ) const

PostProcessForByway pass all trip section from trip section collection and check 'byway validity'. If trip section is byway invalid => trip section will be removed from trip section collection in data storage.

Note
Function checks byway validity only for TripSectionCash and TripSectionTimeTicket
Returns
Ok - all ok
See also
EIssueLogicDefines::ReturnValues

Here is the call graph for this function:

EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::PostProcessForNonCombinedTicket ( ) const

when combining is OFF, only one segment (for whole journey) is created and continuous trips are handeld in price calculation

Returns
Ok - all ok
See also
EIssueLogicDefines::ReturnValues
EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::PostProcessForSimpleCombinedTicket ( ) const

if were created more than 2 trip sections I delete it, and create new max 2 trip sections

Returns
Ok - all ok
See also
EIssueLogicDefines::ReturnValues

Here is the call graph for this function:

EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::PostProcessRemoveEmptyTimeTicketJourneys ( ) const

Here is the call graph for this function:

EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::PostProcessRemoveOneBusStopSectionOnBorderOfDifferentTariffSystem ( ) const

Here is the call graph for this function:

Member Data Documentation

TripSectionPostProcessModule* EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::mDataClassOwner
ETicketIssueLogicDataStorage* EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::mDataStorage
ETripSectionModule* EM::TicketIssueLogic::TripSectionPostProcessModule::DataClass::mTripSectionModule

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