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

#include <TicketIssueBusinessLogic.h>

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

Classes

class  DataClass
 

Public Member Functions

 TicketIssueBusinessLogic ()
 
virtual ~TicketIssueBusinessLogic ()
 
bool IsAllowedPaymentOnSelectedTariffSetting (EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *selectedTariff, const EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa::AllowedPaymentType requiredPaymentType)
 IsAllowedPaymentOnSelectedTariff checks setting 'Platba'/3 on selected tariff. More...
 
bool IsSelectedTicketCountValidForTicketIssue (EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *selectedTariff, const int selectedTicketCount)
 Check selected count of tickets is lower than setting on tariff 'LimitPreHromVydaj'/36. More...
 
QString GetZonesOnBusStop (EM::Strojcek::VstupneUdaje::CestovnePoriadky::EZastavkaVypis *busStopListing)
 GetZonesOnBusStop - finds all zones on specified bus stop and returns those, which have correct IDS number. More...
 
bool GetTimeTicketCardWriteOperationByTariffPayment (EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, const EM::TicketIssueLogic::EIssueLogicDefines::PaymentType &paymentType, EM::TicketIssueLogic::EIssueLogicDefines::CardWriteOperations &operationType)
 GetTimeTicketCardWriteOperationByTariffPayment returns CardWriteOperation based on tariff's settings and payment type for time ticket issue. More...
 
bool GetTimeTicketCardValidityStart (const long timeTicketIndex, QDateTime &validityStart)
 GetTimeTicketCardValidityStart returns validity start date of new issuing time ticket based on readed time ticket structures from card. More...
 
bool CheckOverlappingWithTimeTicketOnCard (short timeTicketIndex, unsigned long startValidity, unsigned long endValidity, const unsigned short its, const long utn, bool &validOverlappingTicketFound)
 CheckOverlappingWithTimeTicketOnCard check if concrete time ticket with timeTicketIndex overlap it's time validity with startValidity and endValidity. More...
 
bool CheckOverlappingWithAllTimeTicketsOnCard (unsigned long startValidity, unsigned long endValidity, EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, bool &validOverlappingTicketFound)
 CheckOverlappingWithAllTimeTicketsOnCard checks overlapping with all time tickets on card using method. More...
 
bool PrepareTimeTicketZoneListByPriceListRow (EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, unsigned char priceListRow, std::list< unsigned long > &zoneList)
 PrepareTimeTicketZoneListByPriceListRow returns zone list based on price list row. More...
 
bool GetTimeTicketZoneListSpecific (EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, long timeTicketIndex, std::list< unsigned long > &zoneList)
 GetTimeTicketZoneListSpecific returns zone list from concrete time ticket with timeTicketIndex. More...
 
bool CheckMultiplePassengersOnTimeTicket (std::vector< const EM::TicketIssueLogic::ETicketIssueLogicOutputData * > *outputDataCollection, unsigned short &maximalCountFullFare, unsigned short &maximalCountReducedFare)
 
bool IsEnteredTimePeriodValidForTimeTicket (EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, const QDateTime &timeTicketValidityStartDateTime, const QDateTime &timeTicketValidityEndDateTime, QString &messageToDisplay)
 
- Public Member Functions inherited from BusinessLogic
 BusinessLogic (ApplicationDefines::BusinessLogicType businessLogicType, ApplicationDefines::BusinessLogicLifeTimeType businessLogicLifeTimeType)
 
virtual ~BusinessLogic ()
 
ApplicationDefines::BusinessLogicType GetBusinessLogicType () const
 
ApplicationDefines::BusinessLogicLifeTimeType GetBusinessLogicLifeTimeType () const
 

Static Public Member Functions

static bool GetITSAndUTNFromTariff (EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, unsigned short &its, long &utn)
 GetITSAndUTNFromTariff - method gets ITS (IDS) and UTN (cislo MHD) from tariff. More...
 

Static Public Attributes

static const
ApplicationDefines::BusinessLogicType 
mBusinessLogicType = ApplicationDefines::TicketIssueBusinessLogic
 

Constructor & Destructor Documentation

TicketIssueBusinessLogic::TicketIssueBusinessLogic ( )
TicketIssueBusinessLogic::~TicketIssueBusinessLogic ( )
virtual

Member Function Documentation

bool TicketIssueBusinessLogic::CheckMultiplePassengersOnTimeTicket ( std::vector< const EM::TicketIssueLogic::ETicketIssueLogicOutputData * > *  outputDataCollection,
unsigned short &  maximalCountFullFare,
unsigned short &  maximalCountReducedFare 
)
bool TicketIssueBusinessLogic::CheckOverlappingWithAllTimeTicketsOnCard ( unsigned long  startValidity,
unsigned long  endValidity,
EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *  tariff,
bool &  validOverlappingTicketFound 
)

CheckOverlappingWithAllTimeTicketsOnCard checks overlapping with all time tickets on card using method.

See also
CheckOverlappingWithTimeTicketOnCard
Parameters
startValidity- validity start datetime in seconds from 1.1.1970
endValidity- validity end datetime in seconds from 1.1.1970
validOverlappingTicketFound- true, if dates overlap with some existing time ticket's dates
Returns
true, if method perform successfully, false otherwise

Here is the call graph for this function:

bool TicketIssueBusinessLogic::CheckOverlappingWithTimeTicketOnCard ( short  timeTicketIndex,
unsigned long  startValidity,
unsigned long  endValidity,
const unsigned short  its,
const long  utn,
bool &  validOverlappingTicketFound 
)

CheckOverlappingWithTimeTicketOnCard check if concrete time ticket with timeTicketIndex overlap it's time validity with startValidity and endValidity.

Parameters
timeTicketIndex- time ticket index
startValidity- validity start datetime in seconds from 1.1.1970
endValidity- validity end datetime in seconds from 1.1.1970
its- IDS
utn- urban transport identification number (cislo MHD)
validOverlappingTicketFound- true, if dates overlap with existing time ticket's dates
Returns
true, if method perform successfully, false otherwise

Here is the caller graph for this function:

bool TicketIssueBusinessLogic::GetITSAndUTNFromTariff ( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *  tariff,
unsigned short &  its,
long &  utn 
)
static

GetITSAndUTNFromTariff - method gets ITS (IDS) and UTN (cislo MHD) from tariff.

Parameters
tariff- tariff, from which we will get ITS and UTN
its- IDS
utn- cislo MHD
Returns
true on success, false on failure

Here is the caller graph for this function:

bool TicketIssueBusinessLogic::GetTimeTicketCardValidityStart ( const long  timeTicketIndex,
QDateTime &  validityStart 
)

GetTimeTicketCardValidityStart returns validity start date of new issuing time ticket based on readed time ticket structures from card.

Parameters
timeTicketIndex- time ticket index
validityStart- new time ticket's validity start date
Returns
true on success, false otherwise
bool TicketIssueBusinessLogic::GetTimeTicketCardWriteOperationByTariffPayment ( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *  tariff,
const EM::TicketIssueLogic::EIssueLogicDefines::PaymentType &  paymentType,
EM::TicketIssueLogic::EIssueLogicDefines::CardWriteOperations &  operationType 
)

GetTimeTicketCardWriteOperationByTariffPayment returns CardWriteOperation based on tariff's settings and payment type for time ticket issue.

Parameters
tariff- selected tariff, have to be not null
paymentType- bit-oriented flag that indicates requeired payment type for ticket issue
operationType- output parameter,
See also
EM::TicketIssueLogic::EIssueLogicDefines::CardWriteOperations
Returns
true on success, false otherwise
bool TicketIssueBusinessLogic::GetTimeTicketZoneListSpecific ( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *  tariff,
long  timeTicketIndex,
std::list< unsigned long > &  zoneList 
)

GetTimeTicketZoneListSpecific returns zone list from concrete time ticket with timeTicketIndex.

Parameters
tariff- selected tariff, have to be not null
timeTicketIndex- time ticket index
zoneList- output parameter - list of zones from time ticket
Returns
true, if method perform successfully, false otherwise
QString TicketIssueBusinessLogic::GetZonesOnBusStop ( EM::Strojcek::VstupneUdaje::CestovnePoriadky::EZastavkaVypis *  busStopListing)

GetZonesOnBusStop - finds all zones on specified bus stop and returns those, which have correct IDS number.

Parameters
busStopListing- listing of specified bus stop
Returns
IDS numbers separated by commas, empty string if no zones are found
bool TicketIssueBusinessLogic::IsAllowedPaymentOnSelectedTariffSetting ( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *  selectedTariff,
const EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa::AllowedPaymentType  requiredPaymentType 
)

IsAllowedPaymentOnSelectedTariff checks setting 'Platba'/3 on selected tariff.

Parameters
requiredPaymentType- bit-oriented flag that indicate requeired payment type for ticket issue
Returns
true - required payment requiredPaymentType is allowed for operation ticket issue, false otherwise.
bool TicketIssueBusinessLogic::IsEnteredTimePeriodValidForTimeTicket ( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *  tariff,
const QDateTime &  timeTicketValidityStartDateTime,
const QDateTime &  timeTicketValidityEndDateTime,
QString &  messageToDisplay 
)
bool TicketIssueBusinessLogic::IsSelectedTicketCountValidForTicketIssue ( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *  selectedTariff,
const int  selectedTicketCount 
)

Check selected count of tickets is lower than setting on tariff 'LimitPreHromVydaj'/36.

Returns
true - selected ticket count is lower than tariff setting, false otherwise
bool TicketIssueBusinessLogic::PrepareTimeTicketZoneListByPriceListRow ( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *  tariff,
unsigned char  priceListRow,
std::list< unsigned long > &  zoneList 
)

PrepareTimeTicketZoneListByPriceListRow returns zone list based on price list row.

Parameters
tariff- selected tariff, have to be not null
priceListRow- selected price list row
zoneList- output parameter - list of zones
Returns
true, if method perfrorm successfully, false otherwise

Member Data Documentation

const ApplicationDefines::BusinessLogicType TicketIssueBusinessLogic::mBusinessLogicType = ApplicationDefines::TicketIssueBusinessLogic
static

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