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
BomRoot.hpp
Go to the documentation of this file.
1
#ifndef __STDAIR_BOM_BOMROOT_HPP
2
#define __STDAIR_BOM_BOMROOT_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// STL
8
#include <iosfwd>
9
#include <string>
10
// StdAir
11
#include <
stdair/bom/BomAbstract.hpp
>
12
#include <
stdair/bom/BomRootKey.hpp
>
13
#include <
stdair/bom/FRAT5CurveHolderStruct.hpp
>
14
#include <
stdair/bom/FFDisutilityCurveHolderStruct.hpp
>
15
17
namespace
boost {
18
namespace
serialization {
19
class
access;
20
}
21
}
22
23
namespace
stdair {
24
26
struct
InventoryKey;
27
class
Inventory;
28
32
class
BomRoot
:
public
BomAbstract
{
33
template
<
typename
BOM>
friend
class
FacBom
;
34
template
<
typename
BOM>
friend
class
FacCloneBom
;
35
friend
class
FacBomManager
;
36
friend
class
boost::serialization::access
;
37
38
public
:
42
typedef
BomRootKey
Key_T
;
43
44
45
public
:
46
// ////////// Getters ////////////
48
const
Key_T
&
getKey
()
const
{
49
return
_key
;
50
}
51
53
const
HolderMap_T
&
getHolderMap
()
const
{
54
return
_holderMap
;
55
}
56
58
const
FRAT5Curve_T
&
getFRAT5Curve
(
const
std::string& iKey)
const
{
59
return
_frat5CurveHolder
.
getFRAT5Curve
(iKey);
60
}
61
63
const
FFDisutilityCurve_T
&
getFFDisutilityCurve
(
const
std::string& iKey)
const
{
64
return
_ffDisutilityCurveHolder
.
getFFDisutilityCurve
(iKey);
65
}
66
77
Inventory
*
getInventory
(
const
std::string& iInventoryKeyStr)
const
;
78
89
Inventory
*
getInventory
(
const
InventoryKey
&)
const
;
90
91
// ///////////// Business Methods //////////
93
void
addFRAT5Curve
(
const
std::string& iKey,
const
FRAT5Curve_T
& iCurve) {
94
_frat5CurveHolder
.
addCurve
(iKey, iCurve);
95
}
96
98
void
addFFDisutilityCurve
(
const
std::string& iKey,
99
const
FFDisutilityCurve_T
& iCurve) {
100
_ffDisutilityCurveHolder
.
addCurve
(iKey, iCurve);
101
}
102
103
104
public
:
105
// /////////// Display support methods /////////
111
void
toStream
(std::ostream& ioOut)
const
{
112
ioOut <<
toString
();
113
}
114
120
void
fromStream
(std::istream& ioIn) {
121
}
122
126
std::string
toString
()
const
;
127
131
const
std::string
describeKey
()
const
{
132
return
_key
.
toString
();
133
}
134
135
136
public
:
137
// /////////// (Boost) Serialisation support methods /////////
148
template
<
class
Archive>
149
void
serialize
(Archive& ar,
const
unsigned
int
iFileVersion);
150
151
private
:
159
void
serialisationImplementationExport()
const
;
160
void
serialisationImplementationImport();
161
162
163
protected
:
164
// ////////// Constructors and destructors /////////
168
BomRoot
();
169
173
BomRoot
(
const
BomRoot
&);
174
178
BomRoot
(
const
Key_T
& iKey);
179
183
~BomRoot
();
184
185
186
protected
:
187
// /////////////// Attributes ////////////////
191
Key_T
_key
;
192
196
HolderMap_T
_holderMap
;
197
201
FRAT5CurveHolderStruct
_frat5CurveHolder
;
202
206
FFDisutilityCurveHolderStruct
_ffDisutilityCurveHolder
;
207
};
208
209
}
210
#endif // __STDAIR_BOM_BOMROOT_HPP
Generated on Sat Dec 22 2012 16:51:53 for StdAir by
1.8.1.1