TraDemGen Logo  0.2.2
C++ Simulated Travel Demand Generation Library
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines
DemandStreamKey.hpp
Go to the documentation of this file.
00001 #ifndef __TRADEMGEN_BOM_DEMANDSTREAMKEY_HPP
00002 #define __TRADEMGEN_BOM_DEMANDSTREAMKEY_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // StdAir
00008 #include <stdair/stdair_basic_types.hpp>
00009 #include <stdair/stdair_date_time_types.hpp>
00010 #include <stdair/bom/KeyAbstract.hpp>
00011 
00012 namespace TRADEMGEN {
00013 
00020   struct DemandStreamKey : public stdair::KeyAbstract {
00021 
00022     // /////////// Constructors and destructors ///////////
00023   private:
00025     DemandStreamKey();
00026 
00027   public:
00029     DemandStreamKey (const stdair::AirportCode_T& iOrigin,
00030                      const stdair::AirportCode_T& iDestination,
00031                      const stdair::Date_T& iPreferredDepartureDate,
00032                      const stdair::CabinCode_T& iPreferredCabin);
00034     DemandStreamKey (const DemandStreamKey&);
00035 
00037     ~DemandStreamKey();
00038 
00039     
00040   public:
00041     // /////////// Getters //////////
00043     const stdair::AirportCode_T& getOrigin() const {
00044       return _origin;
00045     }
00046 
00048     const stdair::AirportCode_T& getDestination() const {
00049       return _destination;
00050     }
00051 
00053     const stdair::Date_T& getPreferredDepartureDate () const {
00054       return _preferredDepartureDate;
00055     }
00056     
00058     const stdair::CabinCode_T& getPreferredCabin() const {
00059       return _preferredCabin;
00060     }
00061 
00062     
00063     // /////////// Display support methods /////////
00066     void toStream (std::ostream& ioOut) const;
00067 
00070     void fromStream (std::istream& ioIn);
00071 
00077     const std::string toString() const;
00078     
00079 
00080   private:
00081     // ///////////////// Attributes ///////////////
00083     stdair::AirportCode_T _origin;
00084 
00086     stdair::AirportCode_T _destination;
00087 
00089     stdair::Date_T _preferredDepartureDate;
00090 
00092     stdair::CabinCode_T _preferredCabin;
00093   };
00094 
00095 }
00096 #endif // __TRADEMGEN_BOM_DEMANDSTREAMKEY_HPP