AppCore
Loading...
Searching...
No Matches
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
8class EHead;
9
10namespace 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
51
52 bool SetTariffDataAndEvaluateTicketType( Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, Strojcek::VstupneUdaje::TarifnySystem::ETarifnaSkupina *tariffGroup );
53 bool GetTariff( Strojcek::VstupneUdaje::TarifnySystem::ETarifa *&tariff ) const;
54 bool GetTariffGroup( Strojcek::VstupneUdaje::TarifnySystem::ETarifnaSkupina *&tariffGroup ) const;
55
57
58 bool SetSegmentPrice( long segmentPrice );
59 bool GetSegmentPrice( long &segmentPrice ) const;
60
61 bool SetDistanceForPay( const long distanceForPay );
62 bool GetDistanceForPay( long &distanceForPay ) const;
63
64 bool SetTravelledZones( const std::list<unsigned long> &travelledZones );
65 bool GetTravelledZones( const std::list< unsigned long > *&travelledZones ) const;
66
67 bool SetTravelTime( const long travelTime );
68 bool GetTravelTime( long &travelTime );
69
70 bool SetPriceListRowNumber( const unsigned short priceListRow );
71 bool GetPriceListRowNumber( unsigned short &priceListRow ) const;
72
73 bool SetTimeTicketIndexOnCard( const short timeTicketIndexOnCard );
74 bool GetTimeTicketIndexOnCard( short &timeTicketIndexOnCard ) const;
75
76 bool SetValidOneWayTicketIndexOnCard( const signed char oneWayTicketIndex );
77 bool GetValidOneWayTicketIndexOnCard( signed char &oneWayTicketIndex ) const;
78
79 bool SetSegmentStartBusStopLineOrder( const unsigned long segmentStartBusStopLineOrder );
80 bool GetSegmentStartBusStopLineOrder( unsigned long &segmentStartBusStopLineOrder ) const;
81
82 bool SetSegmentEndBusStopLineOrder( const unsigned long segmentEndBusStopLineOrder );
83 bool GetSegmentEndBusStopLineOrder( unsigned long &segmentEndBusStopLineOrder ) const;
84
85 bool SetContinuousTripOrder( const unsigned char continuousTripOrder );
86 bool GetContinuousTripOrder( unsigned char &continuousTripOrder ) const;
87
88 bool IsNextSegmentContinuous( bool &isNextSegmentContinuous ) const;
89 bool ExistsNextSegment( bool &existsNextSegment ) const;
90
91 bool SetVATRate( long vatRate );
92 bool GetVATRate( long &vatRate ) const;
93
94 bool SetBulkVATValue( long bulkVatValue );
95 bool GetBulkVATValue( long &bulkVatValue ) const;
96
97 bool SetTicketNumber( unsigned long ticketNumber );
98
101
102 bool GetCalculatePriceResultCollection( EHead *&calculatePriceResultcollection ) const;
103 bool SetCalculatePriceResultCollection( const EHead *calculatePriceResultcollection );
104
105 bool GetUsedCustomerProfileIndex( unsigned char &usedCustomerProfileIndex ) const;
106
107 unsigned char GetCurrencyID();
108
109 void PrintToLog();
110
111 private:
112 class DataClass;
113 DataClass *d;
114 };
115 }
116}
117
118#endif // _ISSUEDTICKETSEGMENT_H_
Definition IssuedTicketSegment.h:29
bool IsNextSegmentContinuous(bool &isNextSegmentContinuous) const
Definition IssuedTicketSegment.cpp:279
bool GetTariff(Strojcek::VstupneUdaje::TarifnySystem::ETarifa *&tariff) const
Definition IssuedTicketSegment.cpp:131
bool GetVATRate(long &vatRate) const
Definition IssuedTicketSegment.cpp:353
bool GetValidOneWayTicketIndexOnCard(signed char &oneWayTicketIndex) const
Definition IssuedTicketSegment.cpp:237
IssuedTicketSegmentType
Definition IssuedTicketSegment.h:38
@ TypeUndefined
Definition IssuedTicketSegment.h:39
@ TypeCardUsingFee
Definition IssuedTicketSegment.h:43
@ TypeTimeTicket
Definition IssuedTicketSegment.h:41
@ TypeCreditRecharge
Definition IssuedTicketSegment.h:42
@ TypeCommon
Definition IssuedTicketSegment.h:40
@ TypeRegistrationTicket
Definition IssuedTicketSegment.h:44
bool GetSegmentEndBusStopLineOrder(unsigned long &segmentEndBusStopLineOrder) const
Definition IssuedTicketSegment.cpp:261
void PrintToLog()
Definition IssuedTicketSegment.cpp:415
bool GetSegmentPrice(long &segmentPrice) const
Definition IssuedTicketSegment.cpp:165
~IssuedTicketSegment()
Definition IssuedTicketSegment.cpp:98
bool GetTravelTime(long &travelTime)
Definition IssuedTicketSegment.cpp:201
bool GetSegmentStartBusStopLineOrder(unsigned long &segmentStartBusStopLineOrder) const
Definition IssuedTicketSegment.cpp:249
bool SetDistanceForPay(const long distanceForPay)
Definition IssuedTicketSegment.cpp:171
bool SetTicketNumber(unsigned long ticketNumber)
bool GetTimeTicketIndexOnCard(short &timeTicketIndexOnCard) const
Definition IssuedTicketSegment.cpp:225
bool GetPriceListRowNumber(unsigned short &priceListRow) const
Definition IssuedTicketSegment.cpp:213
bool GetTariffGroup(Strojcek::VstupneUdaje::TarifnySystem::ETarifnaSkupina *&tariffGroup) const
Definition IssuedTicketSegment.cpp:142
bool SetTimeTicketIndexOnCard(const short timeTicketIndexOnCard)
Definition IssuedTicketSegment.cpp:219
bool SetValidOneWayTicketIndexOnCard(const signed char oneWayTicketIndex)
Definition IssuedTicketSegment.cpp:231
bool SetPriceListRowNumber(const unsigned short priceListRow)
Definition IssuedTicketSegment.cpp:207
bool SetTariffDataAndEvaluateTicketType(Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, Strojcek::VstupneUdaje::TarifnySystem::ETarifnaSkupina *tariffGroup)
Definition IssuedTicketSegment.cpp:108
bool GetDistanceForPay(long &distanceForPay) const
Definition IssuedTicketSegment.cpp:177
bool SetSegmentPrice(long segmentPrice)
Definition IssuedTicketSegment.cpp:159
IssuedTicketSegmentFlags
Definition IssuedTicketSegment.h:32
@ TicketFlagKilometersFree
Definition IssuedTicketSegment.h:34
@ TicketFlagAdditionalZones
Definition IssuedTicketSegment.h:33
bool GetUsedCustomerProfileIndex(unsigned char &usedCustomerProfileIndex) const
Definition IssuedTicketSegment.cpp:405
bool SetTravelledZones(const std::list< unsigned long > &travelledZones)
Definition IssuedTicketSegment.cpp:183
bool SetBulkVATValue(long bulkVatValue)
Definition IssuedTicketSegment.cpp:359
void IsSetTicketSegmentFlag(IssuedTicketSegment::IssuedTicketSegmentFlags flag, bool &isSet) const
Definition IssuedTicketSegment.cpp:377
IssuedTicket * GetOwner()
Definition IssuedTicketSegment.cpp:103
bool SetSegmentEndBusStopLineOrder(const unsigned long segmentEndBusStopLineOrder)
Definition IssuedTicketSegment.cpp:255
bool ExistsNextSegment(bool &existsNextSegment) const
Definition IssuedTicketSegment.cpp:316
bool GetContinuousTripOrder(unsigned char &continuousTripOrder) const
Definition IssuedTicketSegment.cpp:273
bool GetBulkVATValue(long &bulkVatValue) const
Definition IssuedTicketSegment.cpp:365
bool SetTravelTime(const long travelTime)
Definition IssuedTicketSegment.cpp:195
bool GetTravelledZones(const std::list< unsigned long > *&travelledZones) const
Definition IssuedTicketSegment.cpp:189
bool SetCalculatePriceResultCollection(const EHead *calculatePriceResultcollection)
Definition IssuedTicketSegment.cpp:393
bool SetSegmentStartBusStopLineOrder(const unsigned long segmentStartBusStopLineOrder)
Definition IssuedTicketSegment.cpp:243
bool SetTicketSegmentFlag(IssuedTicketSegment::IssuedTicketSegmentFlags flag)
Definition IssuedTicketSegment.cpp:371
unsigned char GetCurrencyID()
Definition IssuedTicketSegment.cpp:410
bool GetSegmentType(IssuedTicketSegment::IssuedTicketSegmentType &segmentType)
Definition IssuedTicketSegment.cpp:153
bool GetCalculatePriceResultCollection(EHead *&calculatePriceResultcollection) const
Definition IssuedTicketSegment.cpp:382
bool SetVATRate(long vatRate)
Definition IssuedTicketSegment.cpp:347
bool SetContinuousTripOrder(const unsigned char continuousTripOrder)
Definition IssuedTicketSegment.cpp:267
Definition IssuedTicket.h:34
Definition IssuedTicketSegment.cpp:32
SYSTEM INCLUDES.
Definition CardFacadeManagerXML.h:7