1.00.0
C++ Standard Airline IT Object Library
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Inventory.hpp
Go to the documentation of this file.
1
#ifndef __STDAIR_BOM_INVENTORY_HPP
2
#define __STDAIR_BOM_INVENTORY_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/basic/BasConst_Inventory.hpp
>
13
#include <
stdair/bom/BomAbstract.hpp
>
14
#include <
stdair/bom/AirlineFeature.hpp
>
15
#include <
stdair/bom/InventoryKey.hpp
>
16
#include <
stdair/bom/InventoryTypes.hpp
>
17
19
namespace
boost {
20
namespace
serialization {
21
class
access;
22
}
23
}
24
25
namespace
stdair {
26
28
struct
FlightDateKey;
29
class
FlightDate;
30
34
class
Inventory
:
public
BomAbstract
{
35
template
<
typename
BOM>
friend
class
FacBom
;
36
template
<
typename
BOM>
friend
class
FacCloneBom
;
37
friend
class
FacBomManager
;
38
friend
class
boost::serialization::access
;
39
40
public
:
41
// ////////// Type definitions ////////////
45
typedef
InventoryKey
Key_T
;
46
47
48
public
:
49
// ////////// Getters ////////////
51
const
Key_T
&
getKey
()
const
{
52
return
_key
;
53
}
54
56
const
AirlineCode_T
&
getAirlineCode
()
const
{
57
return
_key
.
getAirlineCode
();
58
}
59
61
ForecastingMethod::EN_ForecastingMethod
getForecastingMethod
()
const
;
62
64
UnconstrainingMethod::EN_UnconstrainingMethod
getUnconstrainingMethod
()
const
;
65
67
PreOptimisationMethod::EN_PreOptimisationMethod
getPreOptimisationMethod
()
const
;
68
70
OptimisationMethod::EN_OptimisationMethod
getOptimisationMethod
()
const
;
71
73
PartnershipTechnique::EN_PartnershipTechnique
getPartnershipTechnique
()
const
;
74
76
BomAbstract
*
const
getParent
()
const
{
77
return
_parent
;
78
}
79
81
const
HolderMap_T
&
getHolderMap
()
const
{
82
return
_holderMap
;
83
}
84
95
FlightDate
*
getFlightDate
(
const
std::string& iFlightDateKeyStr)
const
;
96
107
FlightDate
*
getFlightDate
(
const
FlightDateKey
&)
const
;
108
112
AirlineFeature
*
getAirlineFeature
()
const
{
113
return
_airlineFeature
;
114
}
115
116
117
private
:
118
// /////////// Setters ////////////
120
void
setAirlineFeature (
AirlineFeature
& iAirlineFeature) {
121
_airlineFeature
= &iAirlineFeature;
122
}
123
124
125
public
:
126
// /////////// Display support methods /////////
132
void
toStream
(std::ostream& ioOut)
const
{
133
ioOut <<
toString
();
134
}
135
141
void
fromStream
(std::istream& ioIn) {
142
}
143
147
std::string
toString
()
const
;
148
152
const
std::string
describeKey
()
const
{
153
return
_key
.
toString
();
154
}
155
156
157
public
:
158
// /////////// (Boost) Serialisation support methods /////////
162
template
<
class
Archive>
163
void
serialize
(Archive& ar,
const
unsigned
int
iFileVersion);
164
165
private
:
173
void
serialisationImplementationExport()
const
;
174
void
serialisationImplementationImport();
175
176
177
protected
:
178
// ////////// Constructors and destructors /////////
182
Inventory
(
const
Key_T
&);
186
~Inventory
();
187
188
private
:
192
Inventory
();
196
Inventory
(
const
Inventory
&);
197
198
199
protected
:
200
// ////////// Attributes /////////
204
Key_T
_key
;
205
209
BomAbstract
*
_parent
;
210
214
AirlineFeature
*
_airlineFeature
;
215
219
HolderMap_T
_holderMap
;
220
};
221
222
}
223
#endif // __STDAIR_BOM_INVENTORY_HPP
224
Generated on Sat Dec 22 2012 16:51:53 for StdAir by
1.8.1.1