StdAir Logo  1.00.19
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
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
17
19namespace boost {
20 namespace serialization {
21 class access;
22 }
23 namespace archive {
24 namespace detail {
25 template <class T>
26 struct heap_allocation;
27 }
28 }
29}
30
31
32namespace stdair {
33
35 struct FlightDateKey;
36 class FlightDate;
37
41 class Inventory : public BomAbstract {
42 template <typename BOM> friend class FacBom;
43 template <typename BOM> friend class FacCloneBom;
44 friend class FacBomManager;
46 template <class T> friend struct boost::archive::detail::heap_allocation;
47
48 public :
49 // ////////// Type definitions ////////////
54
55
56 public:
57 // ////////// Getters ////////////
59 const Key_T& getKey() const {
60 return _key;
61 }
62
65 return _key.getAirlineCode();
66 }
67
70
73
76
79
82
84 BomAbstract* const getParent() const {
85 return _parent;
86 }
87
89 const HolderMap_T& getHolderMap() const {
90 return _holderMap;
91 }
92
103 FlightDate* getFlightDate (const std::string& iFlightDateKeyStr) const;
104
115 FlightDate* getFlightDate (const FlightDateKey&) const;
116
121 return _airlineFeature;
122 }
123
124
125 private:
126 // /////////// Setters ////////////
128 void setAirlineFeature (AirlineFeature& iAirlineFeature) {
129 _airlineFeature = &iAirlineFeature;
130 }
131
132
133 public:
134 // /////////// Display support methods /////////
140 void toStream (std::ostream& ioOut) const {
141 ioOut << toString();
142 }
143
149 void fromStream (std::istream& ioIn) {
150 }
151
155 std::string toString() const;
156
160 const std::string describeKey() const {
161 return _key.toString();
162 }
163
164
165 public:
166 // /////////// (Boost) Serialisation support methods /////////
170 template<class Archive>
171 void serialize (Archive& ar, const unsigned int iFileVersion);
172
173 private:
181 void serialisationImplementationExport() const;
182 void serialisationImplementationImport();
183
184
185 protected:
186 // ////////// Constructors and destructors /////////
190 Inventory (const Key_T&);
191
195 virtual ~Inventory();
196
197 private:
201 Inventory();
205 Inventory (const Inventory&);
206
207
208 protected:
209 // ////////// Attributes /////////
214
219
224
229 };
230
231}
232#endif // __STDAIR_BOM_INVENTORY_HPP
233
Handle on the StdAir library context.
std::map< const std::type_info *, BomAbstract * > HolderMap_T
std::string AirlineCode_T
Forward declarations.
Class representing various configuration parameters (e.g., revenue management methods such EMSRb or M...
Class representing the actual attributes for an airline flight-date.
Key of a given flight-date, made of a flight number and a departure date.
Class representing the actual attributes for an airline inventory.
Definition Inventory.hpp:41
AirlineFeature * _airlineFeature
AirlineFeature * getAirlineFeature() const
BomAbstract *const getParent() const
Definition Inventory.hpp:84
const AirlineCode_T & getAirlineCode() const
Definition Inventory.hpp:64
const Key_T & getKey() const
Definition Inventory.hpp:59
FlightDate * getFlightDate(const std::string &iFlightDateKeyStr) const
Definition Inventory.cpp:50
HolderMap_T _holderMap
std::string toString() const
Definition Inventory.cpp:42
void fromStream(std::istream &ioIn)
UnconstrainingMethod::EN_UnconstrainingMethod getUnconstrainingMethod() const
Definition Inventory.cpp:71
const HolderMap_T & getHolderMap() const
Definition Inventory.hpp:89
const std::string describeKey() const
Inventory(const Key_T &)
Definition Inventory.cpp:31
OptimisationMethod::EN_OptimisationMethod getOptimisationMethod() const
Definition Inventory.cpp:85
virtual ~Inventory()
Definition Inventory.cpp:38
ForecastingMethod::EN_ForecastingMethod getForecastingMethod() const
Definition Inventory.cpp:64
void serialize(Archive &ar, const unsigned int iFileVersion)
void toStream(std::ostream &ioOut) const
friend class FacBom
Definition Inventory.hpp:42
friend class FacCloneBom
Definition Inventory.hpp:43
friend class boost::serialization::access
Definition Inventory.hpp:45
friend class FacBomManager
Definition Inventory.hpp:44
PartnershipTechnique::EN_PartnershipTechnique getPartnershipTechnique() const
Definition Inventory.cpp:92
BomAbstract * _parent
InventoryKey Key_T
Definition Inventory.hpp:53
PreOptimisationMethod::EN_PreOptimisationMethod getPreOptimisationMethod() const
Definition Inventory.cpp:78
Key of a given inventory, made of the airline code.