StdAir Logo  1.00.0
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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
17 
19 namespace boost {
20  namespace serialization {
21  class access;
22  }
23 }
24 
25 namespace stdair {
26 
28  struct FlightDateKey;
29  class FlightDate;
30 
34  class Inventory : public BomAbstract {
35  template <typename BOM> friend class FacBom;
36  template <typename BOM> friend class FacCloneBom;
37  friend class FacBomManager;
39 
40  public :
41  // ////////// Type definitions ////////////
46 
47 
48  public:
49  // ////////// Getters ////////////
51  const Key_T& getKey() const {
52  return _key;
53  }
54 
56  const AirlineCode_T& getAirlineCode() const {
57  return _key.getAirlineCode();
58  }
59 
62 
65 
68 
71 
74 
76  BomAbstract* const getParent() const {
77  return _parent;
78  }
79 
81  const HolderMap_T& getHolderMap() const {
82  return _holderMap;
83  }
84 
95  FlightDate* getFlightDate (const std::string& iFlightDateKeyStr) const;
96 
107  FlightDate* getFlightDate (const FlightDateKey&) const;
108 
113  return _airlineFeature;
114  }
115 
116 
117  private:
118  // /////////// Setters ////////////
120  void setAirlineFeature (AirlineFeature& iAirlineFeature) {
121  _airlineFeature = &iAirlineFeature;
122  }
123 
124 
125  public:
126  // /////////// Display support methods /////////
132  void toStream (std::ostream& ioOut) const {
133  ioOut << toString();
134  }
135 
141  void fromStream (std::istream& ioIn) {
142  }
143 
147  std::string toString() const;
148 
152  const std::string describeKey() const {
153  return _key.toString();
154  }
155 
156 
157  public:
158  // /////////// (Boost) Serialisation support methods /////////
162  template<class Archive>
163  void serialize (Archive& ar, const unsigned int iFileVersion);
164 
165  private:
173  void serialisationImplementationExport() const;
174  void serialisationImplementationImport();
175 
176 
177  protected:
178  // ////////// Constructors and destructors /////////
182  Inventory (const Key_T&);
186  ~Inventory();
187 
188  private:
192  Inventory();
196  Inventory (const Inventory&);
197 
198 
199  protected:
200  // ////////// Attributes /////////
205 
210 
215 
220  };
221 
222 }
223 #endif // __STDAIR_BOM_INVENTORY_HPP
224