$treeview $search $mathjax
StdAir Logo  1.00.2
$projectbrief
$projectbrief
$searchbox

stdair/bom/NestingNode.hpp

Go to the documentation of this file.
00001 #ifndef __STDAIR_BOM_NESTINGNODE_HPP
00002 #define __STDAIR_BOM_NESTINGNODE_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <cmath>
00009 // StdAir
00010 #include <stdair/stdair_basic_types.hpp>
00011 #include <stdair/stdair_rm_types.hpp>
00012 #include <stdair/bom/BomAbstract.hpp>
00013 #include <stdair/bom/BookingClassTypes.hpp>
00014 #include <stdair/bom/NestingNodeKey.hpp>
00015 
00017 namespace boost {
00018   namespace serialization {
00019     class access;
00020   }
00021 }
00022 
00023 namespace stdair {    
00024 
00029   class NestingNode : public BomAbstract {
00030     template <typename BOM> friend class FacBom;
00031     friend class FacBomManager;
00032     friend class boost::serialization::access;
00033 
00034   public:
00035     // ////////// Type definitions ////////////
00039     typedef NestingNodeKey Key_T;
00040       
00041   public:
00042     // /////////////////// Getters ////////////////////////
00044     const Key_T& getKey() const {
00045       return _key;
00046     }
00047 
00049     BomAbstract* const getParent() const {
00050       return _parent;
00051     }
00052 
00056     const HolderMap_T& getHolderMap() const {
00057       return _holderMap;
00058     }
00059     
00061     const Yield_T& getYield() const {
00062       return _yield;
00063     }
00064     
00065   public:
00066     // ///////////////////// Setters /////////////////////    
00068     void setYield (const Yield_T& iYield) {
00069       _yield = iYield;
00070     }  
00071   
00072     
00073   public:
00074     // /////////// Display support methods /////////
00080     void toStream (std::ostream& ioOut) const {
00081       ioOut << toString();
00082     }
00083 
00089     void fromStream (std::istream& ioIn) {
00090     }
00091 
00095     std::string toString() const;
00096     
00100     const std::string describeKey() const {
00101       return _key.toString();
00102     }
00103     
00104     
00105   public:
00106     // /////////// (Boost) Serialisation support methods /////////
00110     template<class Archive>
00111     void serialize (Archive& ar, const unsigned int iFileVersion);
00112 
00113   private:
00121     void serialisationImplementationExport() const;
00122     void serialisationImplementationImport();
00123 
00124       
00125   protected:
00126     // /////////// Constructors and destructor. ////////////
00130     NestingNode (const Key_T&);
00131       
00135     virtual ~NestingNode();
00136 
00137   private:
00141     NestingNode();
00142 
00146     NestingNode (const NestingNode&);
00147     
00148       
00149   private:
00150     // //////////// Attributes ////////////
00154     Key_T _key;
00155 
00159     BomAbstract* _parent;
00160 
00164     HolderMap_T _holderMap;
00165 
00169     Yield_T _yield;
00170 
00171   };
00172 }
00173 #endif // __STDAIR_BOM_NESTINGNODE_HPP