AppCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
IssuedTicketSegment.h
Go to the documentation of this file.
1 #ifndef _ISSUEDTICKETSEGMENT_H_
2 #define _ISSUEDTICKETSEGMENT_H_
3 
4 #include <list>
5 #include "../ETicketIssueLogicDefines.h"
6 #include "core/common/eplatform.h"
7 
8 class EHead;
9 
10 namespace EM
11 {
12  namespace Strojcek
13  {
14  namespace VstupneUdaje
15  {
16  namespace TarifnySystem
17  {
18  class ETarifa;
19  class ETarifnaSkupina;
20  }
21  }
22  }
23 
24  namespace TicketIssueLogic
25  {
26  class IssuedTicket;
27  class IssuedTicketBusinessLogic;
29  {
30  public:
32  {
33  TicketFlagAdditionalZones = 0x001, // indicates special appendix ticket for zones that are not part of trip when selling ticket to special destination zone
34  TicketFlagKilometersFree = 0x002 // indicates special case of segment. This kilometers are not charged to final price. For example 'one bus stop section' on border of zonation
35  };
36 
38  {
44  TypeRegistrationTicket = 5 // Registration ticket - see RedmineTask 1890
45  };
46 
47  IssuedTicketSegment( IssuedTicket *issuedTicket );
49 
50  bool SetTariffDataAndEvaluateTicketType( Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, Strojcek::VstupneUdaje::TarifnySystem::ETarifnaSkupina *tariffGroup );
51  bool GetTariff( Strojcek::VstupneUdaje::TarifnySystem::ETarifa *&tariff ) const;
52  bool GetTariffGroup( Strojcek::VstupneUdaje::TarifnySystem::ETarifnaSkupina *&tariffGroup ) const;
53 
55 
56  bool SetSegmentPrice( long segmentPrice );
57  bool GetSegmentPrice( long &segmentPrice ) const;
58 
59  bool SetDistanceForPay( const long distanceForPay );
60  bool GetDistanceForPay( long &distanceForPay ) const;
61 
62  bool SetTravelledZones( const std::list<unsigned long> &travelledZones );
63  bool GetTravelledZones( const std::list< unsigned long > *&travelledZones ) const;
64 
65  bool SetTravelTime( const long travelTime );
66  bool GetTravelTime( long &travelTime );
67 
68  bool SetPriceListRowNumber( const unsigned short priceListRow );
69  bool GetPriceListRowNumber( unsigned short &priceListRow ) const;
70 
71  bool SetTimeTicketIndexOnCard( const short timeTicketIndexOnCard );
72  bool GetTimeTicketIndexOnCard( short &timeTicketIndexOnCard ) const;
73 
74  bool SetValidOneWayTicketIndexOnCard( const signed char oneWayTicketIndex );
75  bool GetValidOneWayTicketIndexOnCard( signed char &oneWayTicketIndex ) const;
76 
77  bool SetSegmentStartBusStopLineOrder( const unsigned long segmentStartBusStopLineOrder );
78  bool GetSegmentStartBusStopLineOrder( unsigned long &segmentStartBusStopLineOrder ) const;
79 
80  bool SetSegmentEndBusStopLineOrder( const unsigned long segmentEndBusStopLineOrder );
81  bool GetSegmentEndBusStopLineOrder( unsigned long &segmentEndBusStopLineOrder ) const;
82 
83  bool SetContinuousTripOrder( const unsigned char continuousTripOrder );
84  bool GetContinuousTripOrder( unsigned char &continuousTripOrder ) const;
85 
86  bool IsNextSegmentContinuous( bool &isNextSegmentContinuous ) const;
87  bool ExistsNextSegment( bool &existsNextSegment ) const;
88 
89  bool SetVATRate( long vatRate );
90  bool GetVATRate( long &vatRate ) const;
91 
92  bool SetBulkVATValue( long bulkVatValue );
93  bool GetBulkVATValue( long &bulkVatValue ) const;
94 
95  bool SetTicketNumber( unsigned long ticketNumber );
96 
99 
100  bool GetCalculatePriceResultCollection( EHead *&calculatePriceResultcollection ) const;
101  bool SetCalculatePriceResultCollection( const EHead *calculatePriceResultcollection );
102 
103  bool GetUsedCustomerProfileIndex( unsigned char &usedCustomerProfileIndex ) const;
104 
105  unsigned char GetCurrencyID();
106 
107  void PrintToLog();
108 
109  private:
110  class DataClass;
111  DataClass *d;
112  };
113  }
114 }
115 
116 #endif // _ISSUEDTICKETSEGMENT_H_
~IssuedTicketSegment()
Definition: IssuedTicketSegment.cpp:98
bool GetTariffGroup(Strojcek::VstupneUdaje::TarifnySystem::ETarifnaSkupina *&tariffGroup) const
Definition: IssuedTicketSegment.cpp:137
bool GetSegmentEndBusStopLineOrder(unsigned long &segmentEndBusStopLineOrder) const
Definition: IssuedTicketSegment.cpp:256
bool SetTimeTicketIndexOnCard(const short timeTicketIndexOnCard)
Definition: IssuedTicketSegment.cpp:214
IssuedTicketSegmentType
Definition: IssuedTicketSegment.h:37
bool ExistsNextSegment(bool &existsNextSegment) const
Definition: IssuedTicketSegment.cpp:311
bool SetSegmentPrice(long segmentPrice)
Definition: IssuedTicketSegment.cpp:154
bool GetSegmentStartBusStopLineOrder(unsigned long &segmentStartBusStopLineOrder) const
Definition: IssuedTicketSegment.cpp:244
bool SetValidOneWayTicketIndexOnCard(const signed char oneWayTicketIndex)
Definition: IssuedTicketSegment.cpp:226
EEventTripTicketPr __EDATAPTR d
Definition: EEventTripTicket.h:96
bool SetSegmentStartBusStopLineOrder(const unsigned long segmentStartBusStopLineOrder)
Definition: IssuedTicketSegment.cpp:238
bool GetPriceListRowNumber(unsigned short &priceListRow) const
Definition: IssuedTicketSegment.cpp:208
bool GetContinuousTripOrder(unsigned char &continuousTripOrder) const
Definition: IssuedTicketSegment.cpp:268
bool IsNextSegmentContinuous(bool &isNextSegmentContinuous) const
Definition: IssuedTicketSegment.cpp:274
Definition: IssuedTicketSegment.h:28
bool SetTravelledZones(const std::list< unsigned long > &travelledZones)
Definition: IssuedTicketSegment.cpp:178
bool GetSegmentPrice(long &segmentPrice) const
Definition: IssuedTicketSegment.cpp:160
Definition: IssuedTicketSegment.h:40
bool SetTicketSegmentFlag(IssuedTicketSegment::IssuedTicketSegmentFlags flag)
Definition: IssuedTicketSegment.cpp:366
void IsSetTicketSegmentFlag(IssuedTicketSegment::IssuedTicketSegmentFlags flag, bool &isSet) const
Definition: IssuedTicketSegment.cpp:372
bool SetContinuousTripOrder(const unsigned char continuousTripOrder)
Definition: IssuedTicketSegment.cpp:262
bool GetCalculatePriceResultCollection(EHead *&calculatePriceResultcollection) const
Definition: IssuedTicketSegment.cpp:377
bool GetValidOneWayTicketIndexOnCard(signed char &oneWayTicketIndex) const
Definition: IssuedTicketSegment.cpp:232
bool SetTariffDataAndEvaluateTicketType(Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, Strojcek::VstupneUdaje::TarifnySystem::ETarifnaSkupina *tariffGroup)
Definition: IssuedTicketSegment.cpp:103
bool GetDistanceForPay(long &distanceForPay) const
Definition: IssuedTicketSegment.cpp:172
bool GetVATRate(long &vatRate) const
Definition: IssuedTicketSegment.cpp:348
bool SetPriceListRowNumber(const unsigned short priceListRow)
Definition: IssuedTicketSegment.cpp:202
bool GetTravelTime(long &travelTime)
Definition: IssuedTicketSegment.cpp:196
__ECLASS DataClass
Definition: EEventUpdateCustomerData.h:35
IssuedTicketSegmentFlags
Definition: IssuedTicketSegment.h:31
unsigned char GetCurrencyID()
Definition: IssuedTicketSegment.cpp:405
Definition: IssuedTicket.h:33
IssuedTicketSegment(IssuedTicket *issuedTicket)
Definition: IssuedTicketSegment.cpp:93
bool SetSegmentEndBusStopLineOrder(const unsigned long segmentEndBusStopLineOrder)
Definition: IssuedTicketSegment.cpp:250
bool GetSegmentType(IssuedTicketSegment::IssuedTicketSegmentType &segmentType)
Definition: IssuedTicketSegment.cpp:148
bool SetCalculatePriceResultCollection(const EHead *calculatePriceResultcollection)
Definition: IssuedTicketSegment.cpp:388
SYSTEM INCLUDES.
Definition: CardFacadeManagerXML.h:6
bool GetBulkVATValue(long &bulkVatValue) const
Definition: IssuedTicketSegment.cpp:360
bool SetDistanceForPay(const long distanceForPay)
Definition: IssuedTicketSegment.cpp:166
bool SetTicketNumber(unsigned long ticketNumber)
bool GetTimeTicketIndexOnCard(short &timeTicketIndexOnCard) const
Definition: IssuedTicketSegment.cpp:220
void PrintToLog()
Definition: IssuedTicketSegment.cpp:410
bool SetTravelTime(const long travelTime)
Definition: IssuedTicketSegment.cpp:190
bool SetBulkVATValue(long bulkVatValue)
Definition: IssuedTicketSegment.cpp:354
bool GetUsedCustomerProfileIndex(unsigned char &usedCustomerProfileIndex) const
Definition: IssuedTicketSegment.cpp:400
bool GetTravelledZones(const std::list< unsigned long > *&travelledZones) const
Definition: IssuedTicketSegment.cpp:184
bool SetVATRate(long vatRate)
Definition: IssuedTicketSegment.cpp:342
bool GetTariff(Strojcek::VstupneUdaje::TarifnySystem::ETarifa *&tariff) const
Definition: IssuedTicketSegment.cpp:126