0.45.1
C++ Standard Airline IT Object Library
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
GuillotineBlock.hpp
Go to the documentation of this file.
1
#ifndef __STDAIR_BOM_GUILLOTINEBLOCK_HPP
2
#define __STDAIR_BOM_GUILLOTINEBLOCK_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// STL
8
#include <iosfwd>
9
#include <string>
10
// StdAir
11
#include <
stdair/stdair_inventory_types.hpp
>
12
#include <
stdair/bom/BomAbstract.hpp
>
13
#include <
stdair/bom/GuillotineBlockKey.hpp
>
14
#include <
stdair/bom/GuillotineBlockTypes.hpp
>
15
17
namespace
boost {
18
namespace
serialization {
19
class
access;
20
}
21
}
22
23
namespace
stdair {
24
// Forward declarations
25
class
SegmentCabin;
26
31
class
GuillotineBlock
:
public
BomAbstract
{
32
template
<
typename
BOM>
friend
class
FacBom
;
33
friend
class
FacBomManager
;
34
friend
class
boost::serialization::access
;
35
36
public
:
37
// ////////// Type definitions ////////////
41
typedef
GuillotineBlockKey
Key_T
;
42
43
44
public
:
45
// /////////// Getters ///////////////
47
const
Key_T
&
getKey
()
const
{
48
return
_key
;
49
}
50
52
BomAbstract
*
const
getParent
()
const
{
53
return
_parent
;
54
}
55
57
const
GuillotineNumber_T
&
getGuillotineNumber
()
const
{
58
return
_key
.
getGuillotineNumber
();
59
}
60
64
const
HolderMap_T
&
getHolderMap
()
const
{
65
return
_holderMap
;
66
}
67
69
const
SegmentCabinIndexMap_T
&
getSegmentCabinIndexMap
()
const
{
70
return
_segmentCabinIndexMap
;
71
}
72
74
const
ValueTypeIndexMap_T
&
getValueTypeIndexMap
()
const
{
75
return
_valueTypesIndexMap
;
76
}
77
79
const
BlockIndex_T
&
getBlockIndex
(
const
MapKey_T
&)
const
;
80
82
const
BlockNumber_T
&
getBlockNumber
(
const
SegmentCabin
&)
const
;
83
86
ConstSegmentCabinDTDSnapshotView_T
87
getConstSegmentCabinDTDBookingSnapshotView
(
const
BlockNumber_T
,
88
const
BlockNumber_T
,
89
const
DTD_T
)
const
;
90
93
ConstSegmentCabinDTDRangeSnapshotView_T
94
getConstSegmentCabinDTDRangeBookingSnapshotView
(
const
BlockNumber_T
,
95
const
BlockNumber_T
,
96
const
DTD_T
,
97
const
DTD_T
)
const
;
98
101
SegmentCabinDTDSnapshotView_T
102
getSegmentCabinDTDBookingSnapshotView
(
const
BlockNumber_T
,
103
const
BlockNumber_T
,
const
DTD_T
);
104
107
SegmentCabinDTDRangeSnapshotView_T
108
getSegmentCabinDTDRangeBookingSnapshotView
(
const
BlockNumber_T
,
109
const
BlockNumber_T
,
110
const
DTD_T
,
const
DTD_T
);
111
114
ConstSegmentCabinDTDSnapshotView_T
115
getConstSegmentCabinDTDCancellationSnapshotView
(
const
BlockNumber_T
,
116
const
BlockNumber_T
,
117
const
DTD_T
)
const
;
118
121
ConstSegmentCabinDTDRangeSnapshotView_T
122
getConstSegmentCabinDTDRangeCancellationSnapshotView
(
const
BlockNumber_T
,
123
const
BlockNumber_T
,
124
const
DTD_T
,
125
const
DTD_T
)
const
;
126
129
SegmentCabinDTDSnapshotView_T
130
getSegmentCabinDTDCancellationSnapshotView
(
const
BlockNumber_T
,
131
const
BlockNumber_T
,
132
const
DTD_T
);
133
136
SegmentCabinDTDRangeSnapshotView_T
137
getSegmentCabinDTDRangeCancellationSnapshotView
(
const
BlockNumber_T
,
138
const
BlockNumber_T
,
139
const
DTD_T
,
const
DTD_T
);
140
143
ConstSegmentCabinDTDSnapshotView_T
144
getConstSegmentCabinDTDProductAndPriceOrientedBookingSnapshotView
145
(
const
BlockNumber_T
,
const
BlockNumber_T
,
const
DTD_T
)
const
;
146
149
ConstSegmentCabinDTDRangeSnapshotView_T
150
getConstSegmentCabinDTDRangeProductAndPriceOrientedBookingSnapshotView
151
(
const
BlockNumber_T
,
const
BlockNumber_T
,
const
DTD_T
,
const
DTD_T
)
const
;
152
155
SegmentCabinDTDSnapshotView_T
156
getSegmentCabinDTDProductAndPriceOrientedBookingSnapshotView
157
(
const
BlockNumber_T
,
const
BlockNumber_T
,
const
DTD_T
);
158
161
SegmentCabinDTDRangeSnapshotView_T
162
getSegmentCabinDTDRangeProductAndPriceOrientedBookingSnapshotView
163
(
const
BlockNumber_T
,
const
BlockNumber_T
,
const
DTD_T
,
const
DTD_T
);
164
167
ConstSegmentCabinDTDSnapshotView_T
168
getConstSegmentCabinDTDAvailabilitySnapshotView
(
const
BlockNumber_T
,
169
const
BlockNumber_T
,
170
const
DTD_T
)
const
;
171
174
ConstSegmentCabinDTDRangeSnapshotView_T
175
getConstSegmentCabinDTDRangeAvailabilitySnapshotView
(
const
BlockNumber_T
,
176
const
BlockNumber_T
,
177
const
DTD_T
,
178
const
DTD_T
)
const
;
179
182
SegmentCabinDTDSnapshotView_T
183
getSegmentCabinDTDAvailabilitySnapshotView
(
const
BlockNumber_T
,
184
const
BlockNumber_T
,
185
const
DTD_T
);
186
189
SegmentCabinDTDRangeSnapshotView_T
190
getSegmentCabinDTDRangeAvailabilitySnapshotView
(
const
BlockNumber_T
,
191
const
BlockNumber_T
,
192
const
DTD_T
,
const
DTD_T
);
193
194
195
public
:
196
// //////////// Setters /////////////
199
void
initSnapshotBlocks
(
const
SegmentCabinIndexMap_T
&,
200
const
ValueTypeIndexMap_T
&);
201
202
public
:
203
// /////////// Display support methods /////////
209
void
toStream
(std::ostream& ioOut)
const
{
210
ioOut <<
toString
();
211
}
212
218
void
fromStream
(std::istream& ioIn) {
219
}
220
224
std::string
toString
()
const
;
225
229
const
std::string
describeKey
()
const
{
230
return
_key
.
toString
();
231
}
232
233
234
public
:
235
// /////////// (Boost) Serialisation support methods /////////
239
template
<
class
Archive>
240
void
serialize
(Archive& ar,
const
unsigned
int
iFileVersion);
241
242
private
:
247
void
serialisationImplementationExport()
const
;
248
void
serialisationImplementationImport();
249
250
251
protected
:
252
// ////////// Constructors and destructors /////////
256
GuillotineBlock
(
const
Key_T
&);
257
261
virtual
~GuillotineBlock
();
262
263
private
:
267
GuillotineBlock
();
268
272
GuillotineBlock
(
const
GuillotineBlock
&);
273
274
275
protected
:
276
// ////////// Attributes /////////
278
Key_T
_key
;
279
281
BomAbstract
*
_parent
;
282
284
HolderMap_T
_holderMap
;
285
287
SegmentCabinIndexMap_T
_segmentCabinIndexMap
;
288
291
ValueTypeIndexMap_T
_valueTypesIndexMap
;
292
294
SnapshotBlock_T
_bookingSnapshotBlock
;
295
297
SnapshotBlock_T
_cancellationSnapshotBlock
;
298
300
SnapshotBlock_T
_productAndPriceOrientedBookingSnapshotBlock
;
301
303
SnapshotBlock_T
_availabilitySnapshotBlock
;
304
};
305
306
}
307
#endif // __STDAIR_BOM_GUILLOTINEBLOCK_HPP
308
Generated on Fri Aug 17 2012 16:00:32 for StdAir by
1.8.1.2