StdAir Logo  1.00.16
C++ Standard Airline IT Object Library
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
15
17namespace boost {
18 namespace serialization {
19 class access;
20 }
21}
22
23namespace 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;
37
38 public:
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{
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 ////////////////
192
197
202
207 };
208
209}
210#endif // __STDAIR_BOM_BOMROOT_HPP
Handle on the StdAir library context.
std::map< const std::type_info *, BomAbstract * > HolderMap_T
std::map< const DTD_T, FRAT5_T > FRAT5Curve_T
std::map< const DTD_T, double > FFDisutilityCurve_T
Forward declarations.
Base class for the Business Object Model (BOM) layer.
Class representing the actual attributes for the Bom root.
Definition BomRoot.hpp:32
const HolderMap_T & getHolderMap() const
Definition BomRoot.hpp:53
const std::string describeKey() const
Definition BomRoot.hpp:131
void addFFDisutilityCurve(const std::string &iKey, const FFDisutilityCurve_T &iCurve)
Definition BomRoot.hpp:98
FRAT5CurveHolderStruct _frat5CurveHolder
Definition BomRoot.hpp:201
BomRootKey Key_T
Definition BomRoot.hpp:42
Inventory * getInventory(const std::string &iInventoryKeyStr) const
Definition BomRoot.cpp:43
HolderMap_T _holderMap
Definition BomRoot.hpp:196
const FFDisutilityCurve_T & getFFDisutilityCurve(const std::string &iKey) const
Definition BomRoot.hpp:63
std::string toString() const
Definition BomRoot.cpp:36
const FRAT5Curve_T & getFRAT5Curve(const std::string &iKey) const
Definition BomRoot.hpp:58
const Key_T & getKey() const
Definition BomRoot.hpp:48
void addFRAT5Curve(const std::string &iKey, const FRAT5Curve_T &iCurve)
Definition BomRoot.hpp:93
void fromStream(std::istream &ioIn)
Definition BomRoot.hpp:120
void serialize(Archive &ar, const unsigned int iFileVersion)
friend class boost::serialization::access
Definition BomRoot.hpp:36
FFDisutilityCurveHolderStruct _ffDisutilityCurveHolder
Definition BomRoot.hpp:206
void toStream(std::ostream &ioOut) const
Definition BomRoot.hpp:111
Key of the BOM structure root.
const std::string toString() const
const FFDisutilityCurve_T & getFFDisutilityCurve(const std::string &) const
void addCurve(const std::string &, const FFDisutilityCurve_T &)
void addCurve(const std::string &, const FRAT5Curve_T &)
const FRAT5Curve_T & getFRAT5Curve(const std::string &) const
Class representing the actual attributes for an airline inventory.
Definition Inventory.hpp:41
Key of a given inventory, made of the airline code.
Base class for Factory layer.
Definition FacBom.hpp:22
Utility class for linking StdAir-based objects.
Base class for Factory layer.