StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
13 
15 namespace boost {
16  namespace serialization {
17  class access;
18  }
19 }
20 
21 namespace stdair {
22 
24  struct InventoryKey;
25  class Inventory;
26 
30  class BomRoot : public BomAbstract {
31  template <typename BOM> friend class FacBom;
32  friend class FacBomManager;
34 
35  public:
39  typedef BomRootKey Key_T;
40 
41 
42  public:
43  // ////////// Getters ////////////
45  const Key_T& getKey() const {
46  return _key;
47  }
48 
50  const HolderMap_T& getHolderMap() const {
51  return _holderMap;
52  }
53 
64  Inventory* getInventory (const std::string& iInventoryKeyStr) const;
65 
76  Inventory* getInventory (const InventoryKey&) const;
77 
78 
79  public:
80  // /////////// Display support methods /////////
86  void toStream (std::ostream& ioOut) const {
87  ioOut << toString();
88  }
89 
95  void fromStream (std::istream& ioIn) {
96  }
97 
101  std::string toString() const;
102 
106  const std::string describeKey() const {
107  return _key.toString();
108  }
109 
110 
111  public:
112  // /////////// (Boost) Serialisation support methods /////////
123  template<class Archive>
124  void serialize (Archive& ar, const unsigned int iFileVersion);
125 
126  private:
134  void serialisationImplementationExport() const;
135  void serialisationImplementationImport();
136 
137 
138  protected:
139  // ////////// Constructors and destructors /////////
143  BomRoot();
144 
148  BomRoot (const BomRoot&);
149 
153  BomRoot (const Key_T& iKey);
154 
158  ~BomRoot();
159 
160 
161  protected:
162  // /////////////// Attributes ////////////////
167 
172  };
173 
174 }
175 #endif // __STDAIR_BOM_BOMROOT_HPP