TraDemGen Logo  1.00.0
C++ Simulated Travel Demand Generation Library
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
DemandStreamKey.hpp
Go to the documentation of this file.
1 #ifndef __TRADEMGEN_BOM_DEMANDSTREAMKEY_HPP
2 #define __TRADEMGEN_BOM_DEMANDSTREAMKEY_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // StdAir
8 #include <stdair/stdair_basic_types.hpp>
9 #include <stdair/stdair_date_time_types.hpp>
10 #include <stdair/bom/KeyAbstract.hpp>
11 
12 namespace TRADEMGEN {
13 
20  struct DemandStreamKey : public stdair::KeyAbstract {
21 
22  // /////////// Constructors and destructors ///////////
23  private:
26 
27  public:
29  DemandStreamKey (const stdair::AirportCode_T& iOrigin,
30  const stdair::AirportCode_T& iDestination,
31  const stdair::Date_T& iPreferredDepartureDate,
32  const stdair::CabinCode_T& iPreferredCabin);
35 
38 
39 
40  public:
41  // /////////// Getters //////////
43  const stdair::AirportCode_T& getOrigin() const {
44  return _origin;
45  }
46 
48  const stdair::AirportCode_T& getDestination() const {
49  return _destination;
50  }
51 
53  const stdair::Date_T& getPreferredDepartureDate () const {
54  return _preferredDepartureDate;
55  }
56 
58  const stdair::CabinCode_T& getPreferredCabin() const {
59  return _preferredCabin;
60  }
61 
62 
63  // /////////// Display support methods /////////
66  void toStream (std::ostream& ioOut) const;
67 
70  void fromStream (std::istream& ioIn);
71 
77  const std::string toString() const;
78 
79 
80  private:
81  // ///////////////// Attributes ///////////////
83  stdair::AirportCode_T _origin;
84 
86  stdair::AirportCode_T _destination;
87 
89  stdair::Date_T _preferredDepartureDate;
90 
92  stdair::CabinCode_T _preferredCabin;
93  };
94 
95 }
96 #endif // __TRADEMGEN_BOM_DEMANDSTREAMKEY_HPP