AppCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ETicketIssueLogicDataStorage.h
Go to the documentation of this file.
1 #ifndef EISSUELOGICDATASTORAGE_H
2 #define EISSUELOGICDATASTORAGE_H
3 
4 #include "../ETicketIssueLogicDefines.h"
5 #include <vector>
6 #include <list>
7 #include <set>
8 
9 class EHead;
10 class QString;
11 
12 namespace EM
13 {
14  namespace Strojcek
15  {
16  namespace VstupneUdaje
17  {
18  namespace CestovnePoriadky
19  {
20  class ELinka;
21  class ESpoj;
22  }
23 
24  namespace TarifnySystem
25  {
26  class ETarifa;
27  class ETarifnaSkupina;
28  }
29 
30  class EPrestupSpoj;
31  }
32 
33  namespace StatistikaStrojcek
34  {
35  struct VystupneData;
36  class ECestovnyListok;
37  }
38  }
39 
40  namespace TicketIssueLogic
41  {
42  class EModuleManager;
43  class IssuedTicket;
44  class EMultipleTicket;
45  class TripSection;
46  class EOutputDataInternalManager;
47  class EPurchasedTicketRegister;
48  class EAlternativeTrip;
49  class PriceListLogicDispatcher;
50 
52  {
54 
55  class DataClass;
56  DataClass *d;
57 
59  public:
60 
61  typedef std::vector<IssuedTicket *> IssuedTicketCollection;
62 
65 
71  void AutoClear();
72 
78  void Clear();
79 
80  bool GetActualLine( Strojcek::VstupneUdaje::CestovnePoriadky::ELinka *&line );
81  bool SetActualLine( const Strojcek::VstupneUdaje::CestovnePoriadky::ELinka *line );
82 
83  bool GetActualTrip( Strojcek::VstupneUdaje::CestovnePoriadky::ESpoj *&trip );
84  bool SetActualTrip( const Strojcek::VstupneUdaje::CestovnePoriadky::ESpoj *trip );
85 
86  bool GetActualLineNumber( long &lineNumber );
87  bool GetActualTripNumber( long &tripNumber );
88 
89  bool GetProtectNumber( long &protectNumber );
90 
91  bool GetTariffGroupNumber( unsigned short &tariffGroupNumber );
92 
93  bool GetTripOrderCheckInBusStop( long &checkInBusStopOrder );
94  bool SetTripOrderCheckInBusStop( const long checkInBusStopOrder );
95 
96  bool GetUrbanTransportNumberOnBusStop( long busStopLineOrder, long &urbanTransportIdentificationNumber );
97 
98  bool GetTripOrderCheckOutBusStop( long &checkOutBusStopOrder );
99  bool SetTripOrderCheckOutBusStop( const long checkOutBusStopOrder );
100 
101  bool GetTripOrderBusStopForCheckOut( long &busStopForCheckoutTripOrder );
102  bool SetTripOrderBusStopForCheckOut( const long busStopForCheckoutTripOrder );
103 
104  bool GetLineOrderCheckInBusStop( long &checkInBusStopOrder );
105 
106  bool GetLineOrderCheckOutBusStop( long &checkOutBusStopOrder );
107 
108  bool GetLineOrderBusStopForCheckOut( long &orderOfBusStopForCheckOut );
109 
110  bool GetCheckInZone( unsigned short &checkinZone );
111 
112  bool GetCheckOutZone( unsigned short &checkoutZone );
113 
119  bool GetCheckInZone2( unsigned short &checkInZone2 );
120 
121  bool GetCheckInBusStopID( unsigned long &checkInBusStopID );
122  bool SetCheckInBusStopID( const unsigned long checkInBusStopID );
123 
124  bool GetCheckOutBusStopID( unsigned long &checkOutBusStopID );
125  bool SetCheckOutBusStopID( const unsigned long checkOutBusStopID );
126 
127  bool GetBusStopForCheckOutID( unsigned long &busStopForCheckOutID );
128  bool SetBusStopForCheckOutID( const unsigned long busStopForCheckOutID );
129 
130  bool GetTariffGroup( Strojcek::VstupneUdaje::TarifnySystem::ETarifnaSkupina *&tariffGroup );
131  bool SetTariffGroup( const Strojcek::VstupneUdaje::TarifnySystem::ETarifnaSkupina *tariffGroup );
132 
133  bool GetTariff( Strojcek::VstupneUdaje::TarifnySystem::ETarifa *&tariff );
134  bool SetTariff( const Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff );
135 
136  bool GetPaymentType( EIssueLogicDefines::PaymentType &paymentType );
137  bool SetPaymentType( const EIssueLogicDefines::PaymentType paymentType );
138 
139  bool GetOperationType( EIssueLogicDefines::OperationType &operationType );
140  bool SetOperationType( const EIssueLogicDefines::OperationType operationType );
141 
142  bool GetCardWriteOperations( unsigned long &cardWriteOperations );
143  bool SetCardWriteOperations( unsigned long cardWriteOperations );
144 
145  bool GetTicketCount( short &ticketCount );
146  bool SetTicketCount( const short ticketCount );
147 
148  bool AddMultipleTicket( EMultipleTicket *multipleTicket );
149  bool GetMultipleTicketCount( unsigned char &ticketCount ) const;
150  bool PopMultipleTicket( EMultipleTicket *&multipleTicket );
151  bool GetMultipleTickets( std::list< EMultipleTicket * > &multipleTicketList ) const;
152  bool ClearMultipleTickets();
153 
154  bool SetIssueType( EIssueLogicDefines::IssueType issueType );
155  bool GetIssueType( EIssueLogicDefines::IssueType &issueType );
156 
157  bool GetValidTimeTicketIndexes( std::set<short> &validTimeTicketIndexes );
158  bool SetValidTimeTicketIndexes( const std::set<short> &validTimeTicketIndexes );
159 
160  bool SetCreditRecharge( unsigned long creditRecharge );
161  bool GetCreditRecharge( unsigned long &creditRecharge );
162 
163  bool SetCancelationStatisticTicketNumber( const long cancelationStatisticTicketNumber );
164  bool GetCancelationStatisticTicketNumber( long &cancelationStatisticTicketNumber ) const;
165 
166  bool GetIssuedTicketCollection( std::vector< IssuedTicket * > *&issuedTicketCollection );
167  bool AddIssuedTicket( IssuedTicket *issuedTicket );
168  bool GetActualIssuedTicket( IssuedTicket *&issuedTicket );
169 
170  bool SetDeviceSerialNumber( unsigned long serialNumber );
171  bool GetDeviceSerialNumber( unsigned long &serialNumber );
172 
173  bool SetDeviceOrderNumber( unsigned char orderNumber );
174  bool GetDeviceOrderNumber( unsigned char &orderNumber );
175 
176  bool SetAdvertisementEnabled( bool enableAdvertisement );
177  bool GetAdvertisementEnabled( bool &enableAdvertisement );
178 
179  bool SetTimeTicketValidityStart( unsigned long validityStart );
180  bool GetTimeTicketValidityStart( unsigned long &validityStart );
181 
182  bool SetTimeTicketValidityEnd( unsigned long validityEnd );
183  bool GetTimeTicketValidityEnd( unsigned long &validityEnd );
184 
185  bool SetCoinerOverfallValue( unsigned long coinerOverfallValue );
186  bool GetCoinerOverfallValue( unsigned long &coinerOverfallValue );
187 
188  bool SetTimeTicketCounter( unsigned char timeTicketCounter );
189  bool GetTimeTicketCounter( unsigned char &timeTicketCounter );
190 
191  bool SetTimeTicketPreviousCounter( unsigned char timeTicketCounter );
192  bool GetTimeTicketPreviousCounter( unsigned char &timeTicketCounter );
193 
199  bool SetZoneFrom( unsigned short zoneFrom );
200  bool GetZoneFrom( unsigned short &zoneFrom );
201 
207  bool SetZoneTo( unsigned short zoneTo );
208  bool GetZoneTo( unsigned short &zoneTo );
209 
210  bool SetKilometers( const unsigned char kilometers );
211  bool GetKilometers( unsigned char &kilometers ) const;
212 
213  bool SetZoneList( const std::list<unsigned long> &zoneList );
214  bool GetZoneList( std::list<unsigned long> &zoneList );
215 
216  bool SetAdditionalZones( const std::list<unsigned long> &additionalZones );
217  bool GetAdditionalZones( std::list<unsigned long> &additionalZones );
218 
219  bool SetTimeTicketExtensionIndex( short timeTicketIndex );
220  bool GetTimeTicketExtensionIndex( short &timeTicketIndex );
221 
222  bool SetSoldTimeTicketIndex( short timeTicketIndex );
223  bool GetSoldTimeTicketIndex( short &timeTicketIndex );
224 
225  bool GetModuleManager( EModuleManager *&moduleManager );
226  bool GetPriceListLogicDispatcher( PriceListLogicDispatcher *&priceListLogicDispatcher );
227  bool GetPurchasedTicketRegister( EPurchasedTicketRegister *&purchasedTicketRegister );
228  bool GetOutputDataManager( EOutputDataInternalManager *&outputDataManager );
229 
230  bool AddTripSection( const unsigned int starBusStop, const unsigned int endBusStop, const long oneWayTicketIndexToCard, const unsigned short tariffGroupOnSection, EIssueLogicDefines::TripSectionType sectionType, const std::list<unsigned long> &travelledZones = std::list<unsigned long>(), const short timeTicketIndex = -1 , const unsigned char continuousTripOrder = 0 );
231  bool ClearTripSections();
232  bool GetTripSectionCount( unsigned char &sectionCount ) const;
233  bool GetTripSectionList( const std::list< TripSection * > *&tripSectionList ) const ;
234 
235  void SetCrossTransfer( const EM::Strojcek::VstupneUdaje::EPrestupSpoj &crossTransfer );
236  void ClearCrossTransfer();
237  bool IsCrossTransfer();
238  bool GetCrossTransfer( EM::Strojcek::VstupneUdaje::EPrestupSpoj &crossTransfer ) const;
239 
240  bool GetCheckInZoneBusStopID( unsigned long &checkInZoneBusStopID );
241  bool SetCheckInZoneBusStopID( const unsigned long checkInZoneBusStopID );
242 
243  bool GetCheckOutZoneBusStopID( unsigned long &checkOutZoneBusStopID );
244  bool SetCheckOutZoneBusStopID( const unsigned long checkOutZoneBusStopID );
245 
246  bool GetDestinationZoneNumber( unsigned long &zoneNumber );
247  bool SetDestinationZoneNumber( const unsigned long zoneNumber );
248 
249  bool GetDestinationSubZoneNumber( unsigned short &subZoneNumber );
250  bool SetDestinationSubZoneNumber( const unsigned short subZoneNumber );
251 
252  bool GetPassNumber( unsigned long &passNumber );
253  bool SetPassNumber( const unsigned long passNumber );
254 
255  // FIXME: JPI - this supose to be returned by price calculation
256  bool SetPriceListRow( unsigned short priceListRow );
257  bool GetPriceListRow( unsigned short &priceListRow );
258 
259  bool SetFlagProlongTicketsTimeValidity( EIssueLogicDefines::ProlongTicketsTimeValidity prolongTicketTimeValidity );
260  bool GetFlagProlongTicketsTimeValidity( EIssueLogicDefines::ProlongTicketsTimeValidity &prolongTicketTimeValidity );
261 
262  bool SetFlagAllowIssueOnPortableEP( bool allowIssueOnPortableCard );
263  bool GetFlagAllowIssueOnPortableEP( bool &allowIssueOnPortableCard );
264 
265  bool SetFlagShowConfirmationMessageOnPortableEP( bool showConfirmationMessage );
266  bool GetFlagShowConfirmationMessageOnPortableEP( bool &showConfirmationMessage );
267 
268  bool SetFlagTransferForAllTicketsOnCard( EIssueLogicDefines::TransferForAllTicketsOnCard value );
269  bool GetFlagTransferForAllTicketsOnCard( EIssueLogicDefines::TransferForAllTicketsOnCard &value );
270 
271  bool SetFlagRepeatedCheckIn( bool repeatedCheckIn );
272  bool GetFlagRepeatedCheckIn( bool &repeatedCheckIn );
273 
274  bool GetIds( unsigned short &ids ); //set-method is not provided because it's set everytime when tariff group is
275 
276  bool SetCheckOutBusStopToActual();
277  bool SetCheckInBusStopFromCard( long lineOrderCheckInBussTop );
278 
279  void SetCardTicketIndexToUse( long ticketIndex, EIssueLogicDefines::TicketIndexDetail ticketIndexDetail = EIssueLogicDefines::TicketIndexDetailNoDetail );
280  bool GetCardTicketIndexToUse( long &ticketIndex, EIssueLogicDefines::TicketIndexDetail &ticketIndexDetail ) const;
281 
282  bool SetReclamationUID( long long uid );
283  bool GetReclamationUID( long long &uid );
284 
285  bool SetOneWayTicketCardPositioning( EIssueLogicDefines::OneWayTicketCardPositioning value );
286  bool GetOneWayTicketCardPositioning( EIssueLogicDefines::OneWayTicketCardPositioning &value );
287 
288  bool SetFlagUseSubstituteTariffGroup( const bool useSubstituteTariffGroup );
289  bool GetFlagUseSubstituteTariffGroup( bool &useSubstituteTariffGroup ) const;
290 
291  bool SetFlagExplicitlySelectedTariff( bool explicitlySelectedTariff );
292  bool GetFlagExplicitlySelectedTariff( bool &explicitlySelectedTariff ) const;
293 
294  bool SetFlagIsAnyTimeTicketTemporallyValid( bool isAnyTimeTicketTemporallyValid );
295  bool GetFlagIsAnyTimeTicketTemporallyValid( bool &isAnyTimeTicketTemporallyValid ) const;
296 
297  bool SetAlternativeTrip( unsigned long lineNumber, unsigned long tripNumber, long protectNumber, long lastBusStopTripOrder );
298  bool GetAlternativeTrip( EAlternativeTrip &alternativeTrip );
299 
300  bool SetServiceCounter( unsigned char serviceCounter );
301  bool GetServiceCounter( unsigned char &serviceCounter );
302 
303  bool SetPaperTicketID( long long paperTicketID );
304  bool GetPaperTicketID( long long &paperTicketID );
305 
306  bool SetUnpaidExpenseData( long receivedCashPayment, long ticketsPrice );
307  bool GetUnpaidExpenseData( long &receivedCashPayment, long &ticketsPrice );
308 
309  bool SetFlagForceNewOneWayTicket( bool forceNewOneWayTicket );
310  bool GetFlagForceNewOneWayTicket( bool &forceNewOneWayTicket );
311 
312  bool SetFlagUseValidTimeTicketsInPriceCalculation( bool flagUseValidTimeTicketsInPriceCalculation );
313  bool GetFlagUseValidTimeTicketsInPriceCalculation( bool &flagUseValidTimeTicketsInPriceCalculation );
314 
315  bool SetFlagUsePriceListRowWithLongestTimeValidity( bool usePriceListRowWithLongestTimeValidity );
316  bool GetFlagUsePriceListRowWithLongestTimeValidity( bool &usePriceListRowWithLongestTimeValidity );
317 
318  bool SetRegionalCodeForPriceCalculation( unsigned long regionalDiscountCodeForPriceCalculation );
319  bool GetRegionalCodeForPriceCalculation( unsigned long &regionalDiscountCodeForPriceCalculation );
320 
321  bool SetFlagCreditRechargeWithCardActivation( bool flagCreditRechargeWithCardActivation );
322  bool GetFlagCreditRechargeWithCardActivation( bool &flagCreditRechargeWithCardActivation );
323 
324  bool SetFlagUseUrbanZonesAsTravelledZones( bool flagUseUrbanZonesAsTravelledZones );
325  bool GetFlagUseUrbanZonesAsTravelledZones( bool &flagUseUrbanZonesAsTravelledZones );
326 
327  bool SetFlagDontCheckTimeValidityWhileCalculationLastValidBusStop( bool flagDontCheckTimeValidityWhileCalculationLastValidBusStop );
328  bool GetFlagDontCheckTimeValidityWhileCalculationLastValidBusStop( bool &flagDontCheckTimeValidityWhileCalculationLastValidBusStop );
329 
330  bool SetFlagUsePriceListRowFromFirstSegmentOnEverySegment( bool flagUsePriceListRowFromFirstSegmentOnEverySegment );
331  bool GetFlagUsePriceListRowFromFirstSegmentOnEverySegment( bool &flagUsePriceListRowFromFirstSegmentOnEverySegment );
332 
333  bool ClearActualTimetableData();
334 
335  bool SetEMVPaymentTransactionData( EIssueLogicDefines::EMVTransactionData emvTransactionDataId, QString data );
336  bool GetEMVPaymentTransactionData( EIssueLogicDefines::EMVTransactionData emvTransactionDataId, QString &data );
337 
338  bool SetFlagIgnoreAcceptanceTimeTickets( bool ignoreTimeTicketsInManualIssue );
339  bool GetFlagIgnoreAcceptanceTimeTickets( bool &ignoreTimeTicketsInManualIssue );
340 
341  bool SetMultiplePassengerCountOnTimeTicket( unsigned short multiplePassengerCountOnTimeTicket );
342  bool GetMultiplePassengerCountOnTimeTicket( unsigned short &multiplePassengerCountOnTimeTicket ) const;
343 
344  bool SetFlagPrintInterchangeTicket( bool flagPrintInterchangeTicket );
345  bool GetFlagPrintInterchangeTicket( bool &flagPrintInterchangeTicket ) const;
346 
347  bool SetFlagTripOptimization( bool flagTripOptimization );
348  bool GetFlagTripOptimization( bool &flagTripOptimization ) const;
349 
350  bool SetFlagIgnoreAcceptanceOfOneWayTicketsWithTimeValidity( bool ignoreAcceptanceOfOneWayTicketsWithTimeValidity );
351  bool GetFlagIgnoreAcceptanceOfOneWayTicketsWithTimeValidity( bool &ignoreAcceptanceOfOneWayTicketsWithTimeValidity ) const;
352  };
353  }
354 }
355 
356 #endif // EISSUELOGICDATASTORAGE_H
OneWayTicketCardPositioning
Definition: ETicketIssueLogicDefines.h:292
short GetZoneFrom()
Definition: EMultipleTicket.h:26
TransferForAllTicketsOnCard
Definition: ETicketIssueLogicDefines.h:278
EEventTripTicketPr __EDATAPTR d
Definition: EEventTripTicket.h:96
ProlongTicketsTimeValidity
Definition: ETicketIssueLogicDefines.h:285
std::vector< IssuedTicket * > IssuedTicketCollection
Definition: ETicketIssueLogicDataStorage.h:61
Definition: PriceListLogicDispatcher.h:25
IssueType
Definition: ETicketIssueLogicDefines.h:255
PaymentType
Definition: ETicketIssueLogicDefines.h:160
void SetZoneFrom(short zoneFrom)
Definition: EModuleManager.h:11
This class allows access to ETicketIssueLogicOutputData.
Definition: EOutputDataInternalManager.h:21
void SetZoneTo(short zoneTo)
__ECLASS DataClass
Definition: EEventUpdateCustomerData.h:35
OperationType
Definition: ETicketIssueLogicDefines.h:180
Definition: IssuedTicket.h:33
#define DLL_API
Definition: ECardFacadeDefines.h:8
TicketIndexDetail
Definition: ETicketIssueLogicDefines.h:358
Definition: ETicketIssueLogicDataStorage.h:51
EMVTransactionData
Definition: ETicketIssueLogicDefines.h:404
short GetZoneTo()
SYSTEM INCLUDES.
Definition: CardFacadeManagerXML.h:6
Definition: EAlternativeTrip.h:20
TripSectionType
Definition: ETicketIssueLogicDefines.h:262