StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
BomHolder.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BOM_BOMHOLDER_HPP
2 #define __STDAIR_BOM_BOMHOLDER_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <iosfwd>
9 #include <string>
10 #include <list>
11 #include <map>
12 // StdAir
13 #include <stdair/bom/key_types.hpp>
16 
17 namespace stdair {
18 
23  template <typename BOM>
24  class BomHolder : public stdair::BomAbstract {
26  template <typename> friend class FacBom;
27  friend class FacBomManager;
28 
29  public:
30  // ///////////////// Type definitions ////////////////
35 
39  typedef std::list<BOM*> BomList_T;
40 
44  typedef std::map<const MapKey_T, BOM*> BomMap_T;
45 
46 
47  public:
48  // /////////// Display support methods /////////
54  void toStream (std::ostream& ioOut) const {
55  ioOut << toString();
56  }
57 
63  void fromStream (std::istream& ioIn) {
64  }
65 
69  std::string toString() const {
70  return "BomHolder";
71  }
72 
76  const std::string describeKey() const {
77  return "BomHolder";
78  }
79 
80  protected:
84  BomHolder();
85 
89  BomHolder (const BomHolder&);
90 
94  BomHolder (const Key_T& iKey) : _key (iKey) { }
95 
99  ~BomHolder() { };
100 
101  public:
102  // //////////////// Attributes //////////////////
106  Key_T _key;
107 
111  BomList_T _bomList;
112 
116  BomMap_T _bomMap;
117  };
118 
119 }
120 #endif // __STDAIR_BOM_BOMHOLDER_HPP
stdair::BomHolderKey Key_T
Definition: BomHolder.hpp:34
std::string toString() const
Definition: BomHolder.hpp:69
Utility class for linking StdAir-based objects.
Handle on the StdAir library context.
std::map< const MapKey_T, BOM * > BomMap_T
Definition: BomHolder.hpp:44
std::list< BOM * > BomList_T
Definition: BomHolder.hpp:39
Base class for the Business Object Model (BOM) layer.
Definition: BomAbstract.hpp:24
void fromStream(std::istream &ioIn)
Definition: BomHolder.hpp:63
const std::string describeKey() const
Definition: BomHolder.hpp:76
BomList_T _bomList
Definition: BomHolder.hpp:111
Base class for Factory layer.
Definition: FacBom.hpp:22
void toStream(std::ostream &ioOut) const
Definition: BomHolder.hpp:54
Class representing the holder of BOM object containers (list and map).
Definition: BomHolder.hpp:24
BomHolder(const Key_T &iKey)
Definition: BomHolder.hpp:94