StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
NestingNode.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BOM_NESTINGNODE_HPP
2 #define __STDAIR_BOM_NESTINGNODE_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <cmath>
9 // StdAir
15 
17 namespace boost {
18  namespace serialization {
19  class access;
20  }
21 }
22 
23 namespace stdair {
24 
29  class NestingNode : public BomAbstract {
30  template <typename BOM> friend class FacBom;
31  friend class FacBomManager;
33 
34  public:
35  // ////////// Type definitions ////////////
40 
41  public:
42  // /////////////////// Getters ////////////////////////
44  const Key_T& getKey() const {
45  return _key;
46  }
47 
49  BomAbstract* const getParent() const {
50  return _parent;
51  }
52 
56  const HolderMap_T& getHolderMap() const {
57  return _holderMap;
58  }
59 
61  const Yield_T& getYield() const {
62  return _yield;
63  }
64 
65  public:
66  // ///////////////////// Setters /////////////////////
68  void setYield (const Yield_T& iYield) {
69  _yield = iYield;
70  }
71 
72 
73  public:
74  // /////////// Display support methods /////////
80  void toStream (std::ostream& ioOut) const {
81  ioOut << toString();
82  }
83 
89  void fromStream (std::istream& ioIn) {
90  }
91 
95  std::string toString() const;
96 
100  const std::string describeKey() const {
101  return _key.toString();
102  }
103 
104 
105  public:
106  // /////////// (Boost) Serialisation support methods /////////
110  template<class Archive>
111  void serialize (Archive& ar, const unsigned int iFileVersion);
112 
113  private:
121  void serialisationImplementationExport() const;
122  void serialisationImplementationImport();
123 
124 
125  protected:
126  // /////////// Constructors and destructor. ////////////
130  NestingNode (const Key_T&);
131 
135  virtual ~NestingNode();
136 
137  private:
141  NestingNode();
142 
146  NestingNode (const NestingNode&);
147 
148 
149  private:
150  // //////////// Attributes ////////////
154  Key_T _key;
155 
159  BomAbstract* _parent;
160 
164  HolderMap_T _holderMap;
165 
169  Yield_T _yield;
170 
171  };
172 }
173 #endif // __STDAIR_BOM_NESTINGNODE_HPP
void setYield(const Yield_T &iYield)
Definition: NestingNode.hpp:68
const std::string describeKey() const
BomAbstract *const getParent() const
Definition: NestingNode.hpp:49
const Key_T & getKey() const
Definition: NestingNode.hpp:44
Utility class for linking StdAir-based objects.
const HolderMap_T & getHolderMap() const
Definition: NestingNode.hpp:56
Handle on the StdAir library context.
std::map< const std::type_info *, BomAbstract * > HolderMap_T
Definition: BomAbstract.hpp:63
Base class for the Business Object Model (BOM) layer.
Definition: BomAbstract.hpp:24
const Yield_T & getYield() const
Definition: NestingNode.hpp:61
void serialize(Archive &ar, const unsigned int iFileVersion)
const std::string toString() const
std::string toString() const
Definition: NestingNode.cpp:39
Base class for Factory layer.
Definition: FacBom.hpp:22
void toStream(std::ostream &ioOut) const
Definition: NestingNode.hpp:80
Forward declarations.
virtual ~NestingNode()
Definition: NestingNode.cpp:35
friend class boost::serialization::access
Definition: NestingNode.hpp:32
Key of a given policy, made of a policy code.
void fromStream(std::istream &ioIn)
Definition: NestingNode.hpp:89
NestingNodeKey Key_T
Definition: NestingNode.hpp:39