StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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
15 
17 namespace boost {
18  namespace serialization {
19  class access;
20  }
21 }
22 
23 namespace stdair {
24 
26  class AirlineFeature;
27  struct FlightDateKey;
28  class FlightDate;
29 
33  class Inventory : public BomAbstract {
34  template <typename BOM> friend class FacBom;
35  friend class FacBomManager;
37 
38  public :
39  // ////////// Type definitions ////////////
44 
45 
46  public:
47  // ////////// Getters ////////////
49  const Key_T& getKey() const {
50  return _key;
51  }
52 
54  const AirlineCode_T& getAirlineCode() const {
55  return _key.getAirlineCode();
56  }
57 
59  BomAbstract* const getParent() const {
60  return _parent;
61  }
62 
64  const HolderMap_T& getHolderMap() const {
65  return _holderMap;
66  }
67 
78  FlightDate* getFlightDate (const std::string& iFlightDateKeyStr) const;
79 
90  FlightDate* getFlightDate (const FlightDateKey&) const;
91 
92 
93  public:
94  // /////////// Setters ////////////
96  void setAirlineFeature (const AirlineFeature* ioAirlineFeaturePtr) {
97  _airlineFeature = ioAirlineFeaturePtr;
98  }
99 
100 
101  public:
102  // /////////// Display support methods /////////
108  void toStream (std::ostream& ioOut) const {
109  ioOut << toString();
110  }
111 
117  void fromStream (std::istream& ioIn) {
118  }
119 
123  std::string toString() const;
124 
128  const std::string describeKey() const {
129  return _key.toString();
130  }
131 
132 
133  public:
134  // /////////// (Boost) Serialisation support methods /////////
138  template<class Archive>
139  void serialize (Archive& ar, const unsigned int iFileVersion);
140 
141  private:
149  void serialisationImplementationExport() const;
150  void serialisationImplementationImport();
151 
152 
153  protected:
154  // ////////// Constructors and destructors /////////
158  Inventory (const Key_T&);
162  ~Inventory();
163 
164  private:
168  Inventory();
172  Inventory (const Inventory&);
173 
174 
175  protected:
176  // ////////// Attributes /////////
181 
186 
191 
196  };
197 
198 }
199 #endif // __STDAIR_BOM_INVENTORY_HPP
200