Vesna
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Member Functions | List of all members
OneWayTicketIssueStateLogic Class Reference

#include <OneWayTicketIssueStateLogic.h>

Inheritance diagram for OneWayTicketIssueStateLogic:
Inheritance graph
[legend]
Collaboration diagram for OneWayTicketIssueStateLogic:
Collaboration graph
[legend]

Classes

class  DataClass
 

Public Member Functions

 OneWayTicketIssueStateLogic (ApplicationState *stateLogicOwner, const StorageList &storageList, BusinessLogicManager *businessLogicManager)
 
virtual ~OneWayTicketIssueStateLogic ()
 
bool InitTicketIssueLogic (const EM::TicketIssueLogic::EIssueLogicDefines::PaymentType paymentType)
 
bool ReinitPriceListRow ()
 ReinitPriceListRow - This method reinitializes the Ticket Issue Logic’s (TIL) price list row, either by setting it to a manually defined price list row or resetting it to zero (as the default price list row). Brief issue description: The issue occurs during price calculation followed by ticket issuance. The price calculation process sets a deviated price list row, and when the ticket is issued, it calculates an incorrect price because the modified price list row remains stored in the TIL data storage. Exact example: A user has a valid time ticket for Zone A. The user boards a bus at a stop in Zone A and exits at a stop in Zone B. The fare should be calculated based on the distance traveled in Zone B. The price calculation doesn't take in count valid zones (what is correct behaviour). However, if a deviated price exists for the route from the boarding to the landing stop,this price list row is stored in the TIL data storage. When price calculation is followed up by issuing ticket, which has two trip sections: 1.) section is free, covered by the time ticket (Zone A) 2.) section is a distance-based fare in Zone B TIL calculates the price for the second section but retrieves the previously stored price list row, leading to an incorrect fare calculation. This method is required to clear the stored price list row after price calculation and before ticket issuance. More...
 
EM::TicketIssueLogic::EGeneralTicketIssueLogic * GetTicketIssueLogic () const
 
void OnSuccessFullIssue ()
 
- Public Member Functions inherited from StateLogic
 StateLogic (State *stateLogicOwner, const StorageList &storageList, ApplicationStateDefines::StateLogicType stateLogicType, BusinessLogicManager *businessLogicManager)
 
virtual ~StateLogic ()
 
ApplicationStateDefines::StateLogicType GetStateLogicType ()
 

Additional Inherited Members

- Protected Member Functions inherited from StateLogic
const BusinessLogicManagerGetBusinessLogicManager () const
 
const State * GetStateLogicOwner () const
 
const StorageList & GetStorageList () const
 

Constructor & Destructor Documentation

OneWayTicketIssueStateLogic::OneWayTicketIssueStateLogic ( ApplicationState stateLogicOwner,
const StorageList &  storageList,
BusinessLogicManager businessLogicManager 
)
OneWayTicketIssueStateLogic::~OneWayTicketIssueStateLogic ( )
virtual

Member Function Documentation

EGeneralTicketIssueLogic * OneWayTicketIssueStateLogic::GetTicketIssueLogic ( ) const

Here is the caller graph for this function:

bool OneWayTicketIssueStateLogic::InitTicketIssueLogic ( const EM::TicketIssueLogic::EIssueLogicDefines::PaymentType  paymentType)

Here is the call graph for this function:

Here is the caller graph for this function:

void OneWayTicketIssueStateLogic::OnSuccessFullIssue ( )

Here is the call graph for this function:

Here is the caller graph for this function:

bool OneWayTicketIssueStateLogic::ReinitPriceListRow ( )

ReinitPriceListRow - This method reinitializes the Ticket Issue Logic’s (TIL) price list row, either by setting it to a manually defined price list row or resetting it to zero (as the default price list row). Brief issue description: The issue occurs during price calculation followed by ticket issuance. The price calculation process sets a deviated price list row, and when the ticket is issued, it calculates an incorrect price because the modified price list row remains stored in the TIL data storage. Exact example: A user has a valid time ticket for Zone A. The user boards a bus at a stop in Zone A and exits at a stop in Zone B. The fare should be calculated based on the distance traveled in Zone B. The price calculation doesn't take in count valid zones (what is correct behaviour). However, if a deviated price exists for the route from the boarding to the landing stop,this price list row is stored in the TIL data storage. When price calculation is followed up by issuing ticket, which has two trip sections: 1.) section is free, covered by the time ticket (Zone A) 2.) section is a distance-based fare in Zone B TIL calculates the price for the second section but retrieves the previously stored price list row, leading to an incorrect fare calculation. This method is required to clear the stored price list row after price calculation and before ticket issuance.

Returns
true on success, false otherwise

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: