1.01.0
C++ Simulated Airline Travel Solution Provider Library
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
SegmentPathPeriod.hpp
Go to the documentation of this file.
1
#ifndef __AIRTSP_BOM_SEGMENTPATHPERIOD_HPP
2
#define __AIRTSP_BOM_SEGMENTPATHPERIOD_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// STL
8
#include <iosfwd>
9
#include <string>
10
// StdAir
11
#include <stdair/bom/BomAbstract.hpp>
12
// AirTSP
13
#include <
airtsp/bom/SegmentPathPeriodKey.hpp
>
14
#include <
airtsp/bom/SegmentPathPeriodTypes.hpp
>
15
17
namespace
boost {
18
namespace
serialization {
19
class
access;
20
}
21
}
22
24
namespace
stdair {
25
template
<
typename
BOM>
class
FacBom;
26
class
FacBomManager;
27
class
SegmentPeriod;
28
}
29
30
namespace
AIRTSP {
31
39
class
SegmentPathPeriod
:
public
stdair::BomAbstract {
43
template
<
typename
BOM>
friend
class
stdair::FacBom
;
44
friend
class
stdair::FacBomManager
;
45
friend
class
boost::serialization::access
;
46
47
public
:
48
// ////////// Type definitions ////////////
52
typedef
SegmentPathPeriodKey
Key_T
;
53
54
55
public
:
56
// /////////// Getters /////////////
60
const
Key_T
&
getKey
()
const
{
61
return
_key
;
62
}
63
67
stdair::BomAbstract*
const
getParent
()
const
{
68
return
_parent
;
69
}
70
72
const
stdair::PeriodStruct&
getDeparturePeriod
()
const
{
73
return
_key
.
getPeriod
();
74
}
75
77
const
DateOffsetList_T
&
getBoardingDateOffsetList
()
const
{
78
return
_key
.
getBoardingDateOffsetList
();
79
}
80
82
const
stdair::NbOfSegments_T
getNbOfSegments
()
const
{
83
return
_key
.
getNbOfSegments
();
84
}
85
87
const
stdair::NbOfAirlines_T&
getNbOfAirlines
()
const
{
88
return
_key
.
getNbOfAirlines
();
89
}
90
92
const
stdair::Duration_T&
getElapsedTime
()
const
{
93
return
_key
.
getElapsedTime
();
94
}
95
97
const
stdair::Duration_T&
getBoardingTime
()
const
{
98
return
_key
.
getBoardingTime
();
99
}
100
104
const
stdair::HolderMap_T&
getHolderMap
()
const
{
105
return
_holderMap
;
106
}
107
113
stdair::SegmentPeriod*
getLastSegmentPeriod
()
const
;
114
120
stdair::SegmentPeriod*
getFirstSegmentPeriod
()
const
;
121
126
const
stdair::AirportCode_T&
getDestination
()
const
;
127
128
129
public
:
130
// ////////////// Business methods ////////////////
148
Key_T
connectWithAnotherSegment
(
const
SegmentPathPeriod
&)
const
;
149
155
bool
checkCircle
(
const
stdair::AirportCode_T&)
const
;
156
161
bool
isAirlineFlown
(
const
stdair::AirlineCode_T&)
const
;
162
167
bool
isDepartureDateValid
(
const
stdair::Date_T&)
const
;
168
169
public
:
170
// /////////// Display support methods /////////
176
void
toStream
(std::ostream& ioOut)
const
{
177
ioOut <<
toString
();
178
}
179
185
void
fromStream
(std::istream& ioIn) {
186
}
187
191
std::string
toString
()
const
;
192
196
const
std::string
describeKey
()
const
{
197
return
_key
.
toString
();
198
}
199
200
201
public
:
202
// /////////// (Boost) Serialisation support methods /////////
206
template
<
class
Archive>
207
void
serialize
(Archive& ar,
const
unsigned
int
iFileVersion);
208
209
private
:
214
void
serialisationImplementationExport()
const
;
215
void
serialisationImplementationImport();
216
217
218
protected
:
219
// ////////// Constructors and destructors /////////
223
SegmentPathPeriod
(
const
Key_T
&);
224
228
~SegmentPathPeriod
();
229
230
private
:
234
SegmentPathPeriod
();
235
239
SegmentPathPeriod
(
const
SegmentPathPeriod
&);
240
241
242
protected
:
243
// ////////// Attributes /////////
249
Key_T
_key
;
250
254
stdair::BomAbstract*
_parent
;
255
262
stdair::HolderMap_T
_holderMap
;
263
};
264
265
}
266
#endif // __AIRTSP_BOM_SEGMENTPATHPERIOD_HPP
267
Generated on Sun Jun 9 2013 12:36:19 for AirTSP by
1.8.3.1