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

#include <EExceptions.h>

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

Public Member Functions

 EExceptions ()
 
 ~EExceptions ()
 
bool ReadConfiguration (std::string customConfigPath)
 Function provides the possibility to read config file from custom/not standard path. More...
 
std::string GetExceptionTextInsteadOfTypeCard (unsigned char CardTypeNumber, unsigned char SubCardTypeNumber, unsigned short FactoryNumber)
 
long MapZoneNumberToUi (const long zoneNumber) const
 
long MapZoneNumberFromUi (const long uiZoneNumber) const
 
unsigned short MapTariffTicketNumberByUTN (const unsigned short UTN, const unsigned short tariffTicketNumberFrom) const
 
bool IsCustomerProfileValidityException (const unsigned long networkID, const unsigned char customerProfileIndex, const unsigned short customerProfileValue) const
 IsCustomerProfileValidityException - check if is defined exception in Exceptions.xml for networkID, customerProfileIndex and customerProfileValue. More...
 
bool IsForbiddenCard (const long companyNumber, const long cardType, const unsigned long cardSubType, const long cardMedium)
 IsForbiddenCard checks actual approached card with forbidden exceptions. If some exception have same data as exception, this card will be forbidden for usage in vehicle system. More...
 
bool GetZoneCountExceptionForZoneCombination (std::set< unsigned long > zoneCombination, unsigned long &zoneCorrectedCount)
 GetZoneCountExceptionForZoneCombination - functions check if there is exception for zone combination and increment/decrement zones count for combination. More...
 
bool RecodeSelectedTariffTicketNumberToCard (const unsigned short selectedTariffTicketNumber, unsigned short &recodedTariffTicketNumberToCard)
 RecodeSelectedTariffTicketNumberToCard - recode selected tariff to tariff to card. More...
 
bool IsIssueRestrictedByCardPublisher (const unsigned short cardPublisherNumber, const long ticketTypeID, const long paymentType)
 IsIssueRestrictedByCardPublisher - check if ticketTypeID is restricted by paymentType for cardPublisherNumber. More...
 
void GetForeignZonesWithZeroVATValue (std::vector< unsigned long > &foreignZoneList)
 GetForeignZonesWithZeroVATValue - returns list of foreign zones with zero VAT value. More...
 
const std::set< unsigned long > & GetCityCardApplicationsToIgnore () const
 GetCityCardApplicationsToIgnore - method returns set of city card with exact application that should be ignored in manual issue. More...
 
 EExceptions ()
 
 ~EExceptions ()
 
bool ReadConfiguration (std::string customConfigPath)
 Function provides the possibility to read config file from custom/not standard path. More...
 
std::string GetExceptionTextInsteadOfTypeCard (unsigned char CardTypeNumber, unsigned char SubCardTypeNumber, unsigned short FactoryNumber)
 
long MapZoneNumberToUi (const long zoneNumber) const
 
long MapZoneNumberFromUi (const long uiZoneNumber) const
 
unsigned short MapTariffTicketNumberByUTN (const unsigned short UTN, const unsigned short tariffTicketNumberFrom) const
 
bool IsCustomerProfileValidityException (const unsigned long networkID, const unsigned char customerProfileIndex, const unsigned short customerProfileValue) const
 IsCustomerProfileValidityException - check if is defined exception in Exceptions.xml for networkID, customerProfileIndex and customerProfileValue. More...
 
bool IsForbiddenCard (const long companyNumber, const long cardType, const unsigned long cardSubType, const long cardMedium)
 IsForbiddenCard checks actual approached card with forbidden exceptions. If some exception have same data as exception, this card will be forbidden for usage in vehicle system. More...
 
bool GetZoneCountExceptionForZoneCombination (std::set< unsigned long > zoneCombination, unsigned long &zoneCorrectedCount)
 GetZoneCountExceptionForZoneCombination - functions check if there is exception for zone combination and increment/decrement zones count for combination. More...
 
bool RecodeSelectedTariffTicketNumberToCard (const unsigned short selectedTariffTicketNumber, unsigned short &recodedTariffTicketNumberToCard)
 RecodeSelectedTariffTicketNumberToCard - recode selected tariff to tariff to card. More...
 
bool IsIssueRestrictedByCardPublisher (const unsigned short cardPublisherNumber, const long ticketTypeID, const long paymentType)
 IsIssueRestrictedByCardPublisher - check if ticketTypeID is restricted by paymentType for cardPublisherNumber. More...
 
void GetForeignZonesWithZeroVATValue (std::vector< unsigned long > &foreignZoneList)
 GetForeignZonesWithZeroVATValue - returns list of foreign zones with zero VAT value. More...
 
const std::set< unsigned long > & GetCityCardApplicationsToIgnore () const
 GetCityCardApplicationsToIgnore - method returns set of city card with exact application that should be ignored in manual issue. More...
 

Constructor & Destructor Documentation

INTERNAL EExceptions::EExceptions ( )

CONSTRUCTOR

EExceptions::~EExceptions ( )

DESTRUCTOR

EExceptions::EExceptions ( )
EExceptions::~EExceptions ( )

Member Function Documentation

const std::set< unsigned long > & EExceptions::GetCityCardApplicationsToIgnore ( ) const

GetCityCardApplicationsToIgnore - method returns set of city card with exact application that should be ignored in manual issue.

Returns
- list of city card with applications to ignore
const std::set<unsigned long>& EExceptions::GetCityCardApplicationsToIgnore ( ) const

GetCityCardApplicationsToIgnore - method returns set of city card with exact application that should be ignored in manual issue.

Returns
- list of city card with applications to ignore
std::string EExceptions::GetExceptionTextInsteadOfTypeCard ( unsigned char  CardTypeNumber,
unsigned char  SubCardTypeNumber,
unsigned short  FactoryNumber 
)

GetExceptionTextInsteadOfTypeCard

std::string EExceptions::GetExceptionTextInsteadOfTypeCard ( unsigned char  CardTypeNumber,
unsigned char  SubCardTypeNumber,
unsigned short  FactoryNumber 
)
void EExceptions::GetForeignZonesWithZeroVATValue ( std::vector< unsigned long > &  foreignZoneList)

GetForeignZonesWithZeroVATValue - returns list of foreign zones with zero VAT value.

Parameters
foreignZoneList- output parameter - list of foreign zones with zero VAT value
void EExceptions::GetForeignZonesWithZeroVATValue ( std::vector< unsigned long > &  foreignZoneList)

GetForeignZonesWithZeroVATValue - returns list of foreign zones with zero VAT value.

Parameters
foreignZoneList- output parameter - list of foreign zones with zero VAT value
bool EExceptions::GetZoneCountExceptionForZoneCombination ( std::set< unsigned long >  zoneCombination,
unsigned long &  zoneCorrectedCount 
)

GetZoneCountExceptionForZoneCombination - functions check if there is exception for zone combination and increment/decrement zones count for combination.

Parameters
zoneCombination- zone combination to check for exceptions
zoneCorrectedCount- output parameter - if no exception found returns size of zone combination otherwise returns corrected size
Returns
always true
bool EExceptions::GetZoneCountExceptionForZoneCombination ( std::set< unsigned long >  zoneCombination,
unsigned long &  zoneCorrectedCount 
)

GetZoneCountExceptionForZoneCombination - functions check if there is exception for zone combination and increment/decrement zones count for combination.

Parameters
zoneCombination- zone combination to check for exceptions
zoneCorrectedCount- output parameter - if no exception found returns size of zone combination otherwise returns corrected size
Returns
always true

Tarifna reforma BID 2025 odstranila tuto vynimku. Nikde inde sa nepouziva. Po 1.6.2025 sa moze tato podmienka vyhodit z kodu. Funkcia moze ostat, ak by mal niekto rovnaku poziadavku v buducnosti Je to riesene napevno v kode, pretoze exceptions.xml sa nahravaju v externych datach, ktore nemaju platnost. Preto by sa museli data prehrat presne 1.6., co je nerealizovatelne.

bool EExceptions::IsCustomerProfileValidityException ( const unsigned long  networkID,
const unsigned char  customerProfileIndex,
const unsigned short  customerProfileValue 
) const

IsCustomerProfileValidityException - check if is defined exception in Exceptions.xml for networkID, customerProfileIndex and customerProfileValue.

Parameters
networkID
customerProfileIndex
customerProfileValue
Returns
true if customer profile has defined exception in Exceptions.xml, false else
bool EExceptions::IsCustomerProfileValidityException ( const unsigned long  networkID,
const unsigned char  customerProfileIndex,
const unsigned short  customerProfileValue 
) const

IsCustomerProfileValidityException - check if is defined exception in Exceptions.xml for networkID, customerProfileIndex and customerProfileValue.

Parameters
networkID
customerProfileIndex
customerProfileValue
Returns
true if customer profile has defined exception in Exceptions.xml, false else

IsCustomerProfileValidityException

bool EExceptions::IsForbiddenCard ( const long  companyNumber,
const long  cardType,
const unsigned long  cardSubType,
const long  cardMedium 
)

IsForbiddenCard checks actual approached card with forbidden exceptions. If some exception have same data as exception, this card will be forbidden for usage in vehicle system.

Parameters
companyNumber- checking company number from card
cardType- checking card type from card
cardSubType- checking card sub type from card
cardMedium- checking card medium
Returns
bool EExceptions::IsForbiddenCard ( const long  companyNumber,
const long  cardType,
const unsigned long  cardSubType,
const long  cardMedium 
)

IsForbiddenCard checks actual approached card with forbidden exceptions. If some exception have same data as exception, this card will be forbidden for usage in vehicle system.

Parameters
companyNumber- checking company number from card
cardType- checking card type from card
cardSubType- checking card sub type from card
cardMedium- checking card medium
Returns
bool EExceptions::IsIssueRestrictedByCardPublisher ( const unsigned short  cardPublisherNumber,
const long  ticketTypeID,
const long  paymentType 
)

IsIssueRestrictedByCardPublisher - check if ticketTypeID is restricted by paymentType for cardPublisherNumber.

Parameters
cardPublisherNumber- card publisher number
ticketTypeID- ticket type
See also
ETarifa::ETypListkaID
Parameters
paymentType- type of payment,
See also
EIssueLogicDefines::PaymentType
Returns
true if issue is restricted, false otherwise
bool EExceptions::IsIssueRestrictedByCardPublisher ( const unsigned short  cardPublisherNumber,
const long  ticketTypeID,
const long  paymentType 
)

IsIssueRestrictedByCardPublisher - check if ticketTypeID is restricted by paymentType for cardPublisherNumber.

Parameters
cardPublisherNumber- card publisher number
ticketTypeID- ticket type
See also
ETarifa::ETypListkaID
Parameters
paymentType- type of payment,
See also
EIssueLogicDefines::PaymentType
Returns
true if issue is restricted, false otherwise
unsigned short EExceptions::MapTariffTicketNumberByUTN ( const unsigned short  UTN,
const unsigned short  tariffTicketNumberFrom 
) const
unsigned short EExceptions::MapTariffTicketNumberByUTN ( const unsigned short  UTN,
const unsigned short  tariffTicketNumberFrom 
) const

MapTariffTicketNumberByCompanyNumber

long EExceptions::MapZoneNumberFromUi ( const long  uiZoneNumber) const
long EExceptions::MapZoneNumberFromUi ( const long  uiZoneNumber) const

MapZoneNumberFromUi

long EExceptions::MapZoneNumberToUi ( const long  zoneNumber) const
long EExceptions::MapZoneNumberToUi ( const long  zoneNumber) const

MapZoneNumberToUi

bool EExceptions::ReadConfiguration ( std::string  customConfigPath)

Function provides the possibility to read config file from custom/not standard path.

Parameters
customConfigPath- custom path to configuration file
Returns
true - sucessfully processed, false otherwise
bool EExceptions::ReadConfiguration ( std::string  customConfigPath)

Function provides the possibility to read config file from custom/not standard path.

Parameters
customConfigPath- custom path to configuration file
Returns
true - sucessfully processed, false otherwise
bool EExceptions::RecodeSelectedTariffTicketNumberToCard ( const unsigned short  selectedTariffTicketNumber,
unsigned short &  recodedTariffTicketNumberToCard 
)

RecodeSelectedTariffTicketNumberToCard - recode selected tariff to tariff to card.

Note
In case that selectedTariffTicketNumber have no exception return true and set outout param with same value as selectedTariffTicketNumber
Parameters
selectedTariffTicketNumber- selected tariff ticket number
recodedTariffTicketNumberToCard- output param - recoded tariff ticket number to card

&s=exceptions#exceptions.xml http://redmine.transdata.sk/issues/1407

bool EExceptions::RecodeSelectedTariffTicketNumberToCard ( const unsigned short  selectedTariffTicketNumber,
unsigned short &  recodedTariffTicketNumberToCard 
)

RecodeSelectedTariffTicketNumberToCard - recode selected tariff to tariff to card.

Note
In case that selectedTariffTicketNumber have no exception return true and set outout param with same value as selectedTariffTicketNumber
Parameters
selectedTariffTicketNumber- selected tariff ticket number
recodedTariffTicketNumberToCard- output param - recoded tariff ticket number to card

&s=exceptions#exceptions.xml http://redmine.transdata.sk/issues/1407


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