Vesna
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
PassengerCountBusinessLogic.h
Go to the documentation of this file.
1 #ifndef PASSENGERCOUNTBUSINESSLOGIC_H
2 #define PASSENGERCOUNTBUSINESSLOGIC_H
3 
4 #include <vector>
5 
6 #include <QSharedPointer>
7 
10 
11 namespace EM
12 {
13  namespace TicketIssueLogic
14  {
15  class ETicketIssueLogicOutputData;
16  }
17 }
18 
20 {
21 public:
23 
26 
27  void IssueIn( const bool sameLineTrip, const bool isUrbanLine, const bool currentTripIsContinousForPrevisousTrip, const long continousTripOffset );
28 
29  void EvaluatePostIssueData( const std::vector<const EM::TicketIssueLogic::ETicketIssueLogicOutputData *> *outputDataCol );
30  void PassengersGotIn( const uint16_t count, const uint16_t checkOutBusStopTripOrder );
31  void CancelPassengersGotIn( const uint16_t count, const int32_t busStopLineOrder );
32 
39  PassengersCount GetPassengersCount( const PassengerCounterDefines::PassengerCounterType counterType, bool includeActualBusStop = false ) const;
40 
46 
51  std::vector<PassengersCount> GetManualPassengersGettingOutCounts() const;
52 
58  void OnAutomaticPassengerCountResultsArrived( const uint16_t boardedCount, const uint16_t alightedCount );
59 
63  void OnAutomaticPassengerCountResultsArrived( const uint8_t fullness, const uint16_t capacity, const uint16_t passengerCount, const QString &calculationTime, const uint32_t busStopID, const uint8_t busStopOrder );
64 
69  QString GetAutomaticCountingResult() const;
70 
71  void OnBusStopDeparture( const long busStopTripOrder );
72 
74 
76 
77 private:
79 
80  class DataClass;
81  QSharedPointer<DataClass> d;
82 
84 };
85 
86 #endif // PASSENGERCOUNTBUSINESSLOGIC_H
PassengerCounterType
Definition: PassengerCounterDefines.h:23
void OnBusStopDeparture(const long busStopTripOrder)
Definition: PassengerCountBusinessLogic.cpp:240
PassengerCounterDefines::AutomaticPassengerCounterType GetAutomaticPassengerCounterType() const
Definition: PassengerCountBusinessLogic.cpp:248
The BusinessLogic class is the base class of all business logic classes. Every inherited class has to...
Definition: BusinessLogic.h:11
PassengersCount GetPassengersCount(const PassengerCounterDefines::PassengerCounterType counterType, bool includeActualBusStop=false) const
GetPassengersCount - method returns passenger count.
Definition: PassengerCountBusinessLogic.cpp:204
Definition: PassengerCountBusinessLogic.h:19
void IssueIn(const bool sameLineTrip, const bool isUrbanLine, const bool currentTripIsContinousForPrevisousTrip, const long continousTripOffset)
Definition: PassengerCountBusinessLogic.cpp:158
PassengersCount GetManualPassengersGettingOutAtCurrentBusStop() const
GetManualPassengersGettingOutAtCurrentBusStop returns number of passengers who bought ticket to the b...
Definition: PassengerCountBusinessLogic.cpp:209
QString GetAutomaticCountingResult() const
GetAutomaticCountingResult - returns value based on AutomaticPassengerCountingResultMeaning in Projec...
Definition: PassengerCountBusinessLogic.cpp:235
AutomaticPassengerCounterType
Definition: PassengerCounterDefines.h:31
std::vector< PassengersCount > GetManualPassengersGettingOutCounts() const
GetGettingOutPassengersCounts returns number of passengers who are getting out at every bus stop of t...
Definition: PassengerCountBusinessLogic.cpp:214
void PassengersGotIn(const uint16_t count, const uint16_t checkOutBusStopTripOrder)
Definition: PassengerCountBusinessLogic.cpp:188
bool IsAutomaticPassengerCounterPresent()
Definition: PassengerCountBusinessLogic.cpp:253
long PassengersCount
Definition: PassengerCounterDefines.h:11
PassengerCountBusinessLogic()
Definition: PassengerCountBusinessLogic.cpp:148
Definition: ApplicationDefines.h:195
void CancelPassengersGotIn(const uint16_t count, const int32_t busStopLineOrder)
Definition: PassengerCountBusinessLogic.cpp:196
static const ApplicationDefines::BusinessLogicType mBusinessLogicType
Definition: PassengerCountBusinessLogic.h:22
void OnAutomaticPassengerCountResultsArrived(const uint16_t boardedCount, const uint16_t alightedCount)
OnAutomaticPassengerCountResultsArrived - method to process passenger count changes received from APC...
Definition: PassengerCountBusinessLogic.cpp:219
Definition: BusinessLogic.cpp:3
void EvaluatePostIssueData(const std::vector< const EM::TicketIssueLogic::ETicketIssueLogicOutputData * > *outputDataCol)
Definition: PassengerCountBusinessLogic.cpp:180
Definition: AutomaticCardHandlingBusinessLogic.h:6
BusinessLogicType
Definition: ApplicationDefines.h:186
virtual ~PassengerCountBusinessLogic()
Definition: PassengerCountBusinessLogic.cpp:154