StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
DatePeriod.hpp
Go to the documentation of this file.
00001 #ifndef __STDAIR_BOM_DATEPERIOD_HPP
00002 #define __STDAIR_BOM_DATEPERIOD_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STDAIR
00008 #include <stdair/bom/BomAbstract.hpp>
00009 #include <stdair/bom/DatePeriodKey.hpp>
00010 #include <stdair/bom/DatePeriodTypes.hpp>
00011 
00012 // Forward declaration
00013 namespace stdair {
00014 
00018   class DatePeriod : public BomAbstract {
00019     template <typename BOM> friend class FacBom;
00020     friend class FacBomManager;
00021 
00022   public:
00023     // //////////// Type definitions //////////////
00027     typedef DatePeriodKey Key_T;
00028   
00029   public:
00030     // /////////// Display support methods /////////
00036     void toStream (std::ostream& ioOut) const {
00037       ioOut << toString();
00038     }
00039 
00045     void fromStream (std::istream& ioIn) {
00046     }
00047 
00051     std::string toString() const;
00052     
00056     const std::string describeKey() const {
00057       return _key.toString();
00058     }
00059 
00060   public: 
00061     // ////////// Getters ////////////
00065     const Key_T& getKey() const {
00066       return _key;
00067     }
00068 
00072     BomAbstract* const getParent() const {
00073       return _parent;
00074     }
00075 
00079     const  HolderMap_T& getHolderMap() const {
00080       return _holderMap;
00081     }
00082     
00086     const DatePeriod_T& getDatePeriod() const {
00087       return _key.getDatePeriod();
00088     }
00089 
00090 
00091   public:
00092     // ////////////// Business methods ///////////////
00097     bool isDepartureDateValid (const Date_T&) const;
00098     
00099   protected:
00100     // ////////// Constructors and destructors /////////
00104     DatePeriod (const Key_T&);
00108     virtual ~DatePeriod ();
00109 
00110   private:
00114     DatePeriod ();
00118     DatePeriod (const DatePeriod&);
00119 
00120   protected:
00121     // ///////////// Attributes /////////////
00125     Key_T _key;
00126 
00130     BomAbstract* _parent;
00131 
00135     HolderMap_T _holderMap;
00136 
00137   };
00138 
00139 }
00140 #endif // __STDAIR_BOM_DATEPERIOD_HPP
00141