Vesna
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CommandSegmentsBusinessLogic.h
Go to the documentation of this file.
1 #ifndef COMMANDSEGMENTSBUSINESSLOGIC_H
2 #define COMMANDSEGMENTSBUSINESSLOGIC_H
3 
4 #include <QTime>
5 #include <QPair>
6 #include <QString>
7 
8 #include "BusinessLogic.h"
9 
10 namespace EM
11 {
12  namespace Strojcek
13  {
14  namespace VstupneUdaje
15  {
16  namespace CestovnePoriadky
17  {
18  class ESpojZastavka;
19  }
20 
21  namespace Turnusy
22  {
23  class EPrikazKurz;
24  }
25  }
26  }
27 }
28 
30 {
31 public:
33 
36 
43  void GetCommandSegmentTimes( EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, QTime &startTime, QTime &endTime );
44 
64  void CalculateCommandSegmentDateTimes( EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, QDateTime &startDateTime, QDateTime &endDateTime );
65 
79  void CalculateNextCommandSegmentDateTimes( EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *previousCommandSegment, EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *&nextCommandSegment, const QDate &previousSegmentStartDate, QDateTime &startDateTime, QDateTime &endDateTime );
80 
87  void GetCommandSegmentLineTripTexts( EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, QString &lineText, QString &tripText );
88 
95  bool GetCommandSegmentBusStopsInfo( EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, QStringList &times, QStringList &busStops );
96 
102  bool IsCrossingCommandSegment( EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment );
103 
110  bool GetNextCommandSegment( EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *actualCommandSegment, EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *&nextCommandSegment );
111 
119  bool GetCommandSegmentFirstAndLastBusStopID( EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, unsigned long &commandSegmentFirstBusStopId, unsigned long &commandSegmentLastBusStopId );
120 
128  bool GetCommandSegmentFirstTripBusStop( EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, EM::Strojcek::VstupneUdaje::CestovnePoriadky::ESpojZastavka *&tripBusStop );
135  bool GetCommandSegmentFirstBusStopPlatformName( EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, QString &commandSegmentFirstBusStopPlatformName );
136 
145  bool GetCommandSegmentFirstAndLastBusStopTripOrder( EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, int &firstBusStopTripOrder, int &lastBusStopTripOrder );
146 
153  bool GetCommandSegmentTripBusStopsCount( EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, int &tripBusStopsCount );
154 
162  bool FindCommandSegmentByLineAndTrip( EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *&foundCommandSegment, unsigned short tripNumber, unsigned short binaryLineIndex );
163 };
164 
165 #endif // COMMANDSEGMENTSBUSINESSLOGIC_H
void CalculateCommandSegmentDateTimes(EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, QDateTime &startDateTime, QDateTime &endDateTime)
CalculateCommandSegmentDateTimes - calculates command segment start and end date and time from "minut...
Definition: CommandSegmentsBusinessLogic.cpp:66
CommandSegmentsBusinessLogic()
Definition: CommandSegmentsBusinessLogic.cpp:42
bool GetCommandSegmentFirstAndLastBusStopID(EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, unsigned long &commandSegmentFirstBusStopId, unsigned long &commandSegmentLastBusStopId)
GetCommandSegmentFirstAndLastBusStopID.
Definition: CommandSegmentsBusinessLogic.cpp:325
virtual ~CommandSegmentsBusinessLogic()
Definition: CommandSegmentsBusinessLogic.cpp:47
Definition: ApplicationDefines.h:190
bool GetCommandSegmentFirstTripBusStop(EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, EM::Strojcek::VstupneUdaje::CestovnePoriadky::ESpojZastavka *&tripBusStop)
GetCommandSegmentFirstTripBusStop returns first bus stop platform on command segment.
Definition: CommandSegmentsBusinessLogic.cpp:353
bool GetCommandSegmentTripBusStopsCount(EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, int &tripBusStopsCount)
GetCommandSegmentTripBusStopsCount returns trip bus stops count.
Definition: CommandSegmentsBusinessLogic.cpp:576
bool GetCommandSegmentBusStopsInfo(EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, QStringList &times, QStringList &busStops)
GetCommandSegmentBusStopsInfo.
Definition: CommandSegmentsBusinessLogic.cpp:148
Definition: CommandSegmentsBusinessLogic.h:29
The BusinessLogic class is the base class of all business logic classes. Every inherited class has to...
Definition: BusinessLogic.h:11
bool GetCommandSegmentFirstBusStopPlatformName(EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, QString &commandSegmentFirstBusStopPlatformName)
GetCommandSegmentFirstBusStopPlatformName returns first bus stop platform name on command segment...
Definition: CommandSegmentsBusinessLogic.cpp:429
void GetCommandSegmentTimes(EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, QTime &startTime, QTime &endTime)
GetCommandSegmentTimes - converts command segment start and end time from "minutes from command start...
Definition: CommandSegmentsBusinessLogic.cpp:51
void GetCommandSegmentLineTripTexts(EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, QString &lineText, QString &tripText)
GetCommandSegmentLineTripTexts.
Definition: CommandSegmentsBusinessLogic.cpp:130
bool GetCommandSegmentFirstAndLastBusStopTripOrder(EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, int &firstBusStopTripOrder, int &lastBusStopTripOrder)
GetCommandSegmentFirstAndLastBusStopTripOrder returns first and last bus stop trip order...
Definition: CommandSegmentsBusinessLogic.cpp:462
bool IsCrossingCommandSegment(EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment)
IsCrossingCommandSegment.
Definition: CommandSegmentsBusinessLogic.cpp:288
bool GetNextCommandSegment(EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *actualCommandSegment, EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *&nextCommandSegment)
GetNextCommandSegment.
Definition: CommandSegmentsBusinessLogic.cpp:308
Definition: AutomaticCardHandlingBusinessLogic.h:6
BusinessLogicType
Definition: ApplicationDefines.h:186
void CalculateNextCommandSegmentDateTimes(EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *previousCommandSegment, EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *&nextCommandSegment, const QDate &previousSegmentStartDate, QDateTime &startDateTime, QDateTime &endDateTime)
CalculateNextCommandSegmentDateTimes - calculates command segment start and end date and time from "m...
Definition: CommandSegmentsBusinessLogic.cpp:111
bool FindCommandSegmentByLineAndTrip(EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *&foundCommandSegment, unsigned short tripNumber, unsigned short binaryLineIndex)
FindCommandSegmentByLineAndTrip returns commandSegment containing specified line and trip...
Definition: CommandSegmentsBusinessLogic.cpp:628
static const ApplicationDefines::BusinessLogicType mBusinessLogicType
Definition: CommandSegmentsBusinessLogic.h:32