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

stdair/bom/SimpleNestingStructure.hpp

Go to the documentation of this file.
00001 #ifndef __STDAIR_BOM_SIMPLENESTINGSTRUCTURE_HPP
00002 #define __STDAIR_BOM_SIMPLENESTINGSTRUCTURE_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // StdAir
00008 #include <stdair/stdair_basic_types.hpp>
00009 #include <stdair/bom/BomAbstract.hpp>
00010 #include <stdair/bom/NestingNodeTypes.hpp>
00011 #include <stdair/bom/SimpleNestingStructureTypes.hpp>
00012 #include <stdair/bom/NestingStructureKey.hpp>
00013 
00015 namespace boost {
00016   namespace serialization {
00017     class access;
00018   }
00019 }
00020 
00021 namespace stdair {    
00022 
00026   class SimpleNestingStructure : public BomAbstract {
00027     template <typename BOM> friend class FacBom;
00028     friend class FacBomManager;
00029     friend class boost::serialization::access;
00030 
00031   public:
00032     // ////////// Type definitions ////////////
00036     typedef NestingStructureKey Key_T;
00037       
00038   public:
00039     // /////////////////// Getters ////////////////////////
00041     const Key_T& getKey() const {
00042       return _key;
00043     }
00044 
00046     BomAbstract* const getParent() const {
00047       return _parent;
00048     }
00049 
00053     const HolderMap_T& getHolderMap() const {
00054       return _holderMap;
00055     }
00056     
00060     const NestingNodeList_T& getNestingNodeList() const;
00061     
00062   public:
00063     // /////////// Display support methods /////////
00069     void toStream (std::ostream& ioOut) const {
00070       ioOut << toString();
00071     }
00072 
00078     void fromStream (std::istream& ioIn) {
00079     }
00080 
00084     std::string toString() const;
00085     
00089     const std::string describeKey() const {
00090       return _key.toString();
00091     }
00092     
00093     
00094   public:
00095     // /////////// (Boost) Serialisation support methods /////////
00099     template<class Archive>
00100     void serialize (Archive& ar, const unsigned int iFileVersion);
00101 
00102   private:
00110     void serialisationImplementationExport() const;
00111     void serialisationImplementationImport();
00112 
00113       
00114   public:
00115     // /////////// Constructors and destructor. ////////////
00119     SimpleNestingStructure (const Key_T&);
00120       
00124     virtual ~SimpleNestingStructure();
00125 
00126   private:
00130     SimpleNestingStructure();
00131 
00135     SimpleNestingStructure (const SimpleNestingStructure&);
00136      
00137   private:
00141     Key_T _key;
00142 
00146     BomAbstract* _parent;
00147 
00151     HolderMap_T _holderMap;
00152   };
00153 }
00154 #endif // __STDAIR_BOM_SIMPLENESTINGSTRUCTURE_HPP