StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
YieldStore.hpp
Go to the documentation of this file.
00001 #ifndef __STDAIR_BOM_YIELDSTORE_HPP
00002 #define __STDAIR_BOM_YIELDSTORE_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <string>
00009 // StdAir
00010 #include <stdair/stdair_inventory_types.hpp>
00011 #include <stdair/bom/BomAbstract.hpp>
00012 #include <stdair/bom/YieldStoreKey.hpp>
00013 #include <stdair/bom/YieldStoreTypes.hpp>
00014 
00015 namespace stdair {
00016 
00018   class YieldStore : public BomAbstract {
00019     template <typename BOM> friend class FacBom;
00020     friend class FacBomManager;
00021 
00022   public :
00023     // Type definitions
00025     typedef YieldStoreKey Key_T;
00026 
00027   public:
00028     // /////////// Display support methods /////////
00031     void toStream (std::ostream& ioOut) const { ioOut << toString(); }
00032 
00034     BomAbstract* const getParent() const { return _parent; }
00035 
00038     void fromStream (std::istream& ioIn) { }
00039 
00041     std::string toString() const;
00042     
00044     const std::string describeKey() const { return _key.toString(); }
00045 
00046   public:
00047     // ////////// Getters ////////////
00049     const Key_T& getKey() const { return _key; }
00050 
00052     const AirlineCode_T& getAirlineCode () const {
00053       return _key.getAirlineCode();
00054     }
00055     
00056   protected:
00058     YieldStore (const Key_T&);
00059     YieldStore (const YieldStore&);
00061     ~YieldStore();
00062 
00063   protected:
00064     // Attributes
00066     Key_T _key;
00067     BomAbstract* _parent;
00068   };
00069 
00070 }
00071 #endif // __STDAIR_BOM_YIELDSTORE_HPP
00072