StdAir Logo  0.45.0
C++ Standard Airline IT Object Library
PosChannel.hpp
Go to the documentation of this file.
00001 #ifndef __STDAIR_BOM_POSCHANNEL_HPP
00002 #define __STDAIR_BOM_POSCHANNEL_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STDAIR
00008 #include <stdair/bom/BomAbstract.hpp>
00009 #include <stdair/bom/PosChannelKey.hpp>
00010 #include <stdair/bom/PosChannelTypes.hpp>
00011 
00012 // Forward declaration
00013 namespace stdair {
00014 
00019   class PosChannel : public BomAbstract {
00020     template <typename BOM> friend class FacBom;
00021     friend class FacBomManager;
00022 
00023   public:
00024     // /////// Type definitions
00028     typedef PosChannelKey Key_T;
00029   
00030   public:
00031     // /////////// Display support methods /////////
00037     void toStream (std::ostream& ioOut) const {
00038       ioOut << toString();
00039     }
00040 
00046     void fromStream (std::istream& ioIn) {
00047     }
00048 
00052     std::string toString() const;
00053     
00057     const std::string describeKey() const {
00058       return _key.toString();
00059     }
00060 
00061   public:
00062     // ////////// Getters ////////////
00066     const Key_T& getKey() const {
00067       return _key;
00068     }
00069 
00073     BomAbstract* const getParent() const {
00074       return _parent;
00075     }
00076     
00080     const  stdair::HolderMap_T& getHolderMap() const {
00081       return _holderMap;
00082     }
00083     
00087     const CityCode_T& getPos() const {
00088       return _key.getPos();
00089     }
00090 
00094     const ChannelLabel_T& getChannel() const {
00095       return _key.getChannel();
00096     }
00097     
00098   protected:
00099     // ////////// Constructors and destructors /////////
00103     PosChannel (const Key_T&);
00104 
00108     virtual ~PosChannel();
00109 
00110   private:
00114     PosChannel ();
00115 
00119     PosChannel (const PosChannel&);
00120 
00121   protected:
00122     // ////////// Attributes /////////
00126     Key_T _key;
00127     
00131     BomAbstract* _parent;
00132 
00136     HolderMap_T _holderMap;
00137 
00138   };
00139 
00140 }
00141 #endif // __STDAIR_BOM_POSCHANNEL_HPP
00142