1.00.26
C++ Standard Airline IT Object Library
Toggle main menu visibility
Loading...
Searching...
No Matches
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
BomAbstract.hpp
BomRootKey.hpp
FFDisutilityCurveHolderStruct.hpp
FRAT5CurveHolderStruct.hpp
stdair
Handle on the StdAir library context.
Definition
BasChronometer.cpp:9
stdair::HolderMap_T
std::map< const std::type_info *, BomAbstract * > HolderMap_T
Definition
BomAbstract.hpp:63
stdair::FRAT5Curve_T
std::map< const DTD_T, FRAT5_T > FRAT5Curve_T
Definition
stdair_rm_types.hpp:52
stdair::FFDisutilityCurve_T
std::map< const DTD_T, double > FFDisutilityCurve_T
Definition
stdair_rm_types.hpp:55
boost
Forward declarations.
Definition
AirlineClassList.hpp:16
boost::serialization
Definition
AirlineClassList.hpp:17
stdair::BomAbstract::BomAbstract
BomAbstract()
Definition
BomAbstract.hpp:53
stdair::BomRoot
Class representing the actual attributes for the Bom root.
Definition
BomRoot.hpp:32
stdair::BomRoot::_key
Key_T _key
Definition
BomRoot.hpp:191
stdair::BomRoot::getHolderMap
const HolderMap_T & getHolderMap() const
Definition
BomRoot.hpp:53
stdair::BomRoot::Key_T
BomRootKey Key_T
Definition
BomRoot.hpp:42
stdair::BomRoot::describeKey
const std::string describeKey() const
Definition
BomRoot.hpp:131
stdair::BomRoot::~BomRoot
~BomRoot()
Definition
BomRoot.cpp:32
stdair::BomRoot::addFFDisutilityCurve
void addFFDisutilityCurve(const std::string &iKey, const FFDisutilityCurve_T &iCurve)
Definition
BomRoot.hpp:98
stdair::BomRoot::_frat5CurveHolder
FRAT5CurveHolderStruct _frat5CurveHolder
Definition
BomRoot.hpp:201
stdair::BomRoot::getInventory
Inventory * getInventory(const std::string &iInventoryKeyStr) const
Definition
BomRoot.cpp:43
stdair::BomRoot::_holderMap
HolderMap_T _holderMap
Definition
BomRoot.hpp:196
stdair::BomRoot::getFFDisutilityCurve
const FFDisutilityCurve_T & getFFDisutilityCurve(const std::string &iKey) const
Definition
BomRoot.hpp:63
stdair::BomRoot::toString
std::string toString() const
Definition
BomRoot.cpp:36
stdair::BomRoot::getFRAT5Curve
const FRAT5Curve_T & getFRAT5Curve(const std::string &iKey) const
Definition
BomRoot.hpp:58
stdair::BomRoot::getKey
const Key_T & getKey() const
Definition
BomRoot.hpp:48
stdair::BomRoot::addFRAT5Curve
void addFRAT5Curve(const std::string &iKey, const FRAT5Curve_T &iCurve)
Definition
BomRoot.hpp:93
stdair::BomRoot::fromStream
void fromStream(std::istream &ioIn)
Definition
BomRoot.hpp:120
stdair::BomRoot::serialize
void serialize(Archive &ar, const unsigned int iFileVersion)
Definition
CmdBomSerialiser.cpp:133
stdair::BomRoot::FacBom
friend class FacBom
Definition
BomRoot.hpp:33
stdair::BomRoot::FacCloneBom
friend class FacCloneBom
Definition
BomRoot.hpp:34
stdair::BomRoot::access
friend class boost::serialization::access
Definition
BomRoot.hpp:36
stdair::BomRoot::FacBomManager
friend class FacBomManager
Definition
BomRoot.hpp:35
stdair::BomRoot::BomRoot
BomRoot()
Definition
BomRoot.cpp:17
stdair::BomRoot::_ffDisutilityCurveHolder
FFDisutilityCurveHolderStruct _ffDisutilityCurveHolder
Definition
BomRoot.hpp:206
stdair::BomRoot::toStream
void toStream(std::ostream &ioOut) const
Definition
BomRoot.hpp:111
stdair::BomRootKey
Key of the BOM structure root.
Definition
BomRootKey.hpp:25
stdair::FFDisutilityCurveHolderStruct
Definition
FFDisutilityCurveHolderStruct.hpp:19
stdair::FRAT5CurveHolderStruct
Definition
FRAT5CurveHolderStruct.hpp:19
stdair::Inventory
Class representing the actual attributes for an airline inventory.
Definition
Inventory.hpp:41
stdair::InventoryKey
Key of a given inventory, made of the airline code.
Definition
InventoryKey.hpp:26
Generated for StdAir by
1.17.0