StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
OnDDateKey.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BOM_ONDDATEKEY_HPP
2 #define __STDAIR_BOM_ONDDATEKEY_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <iosfwd>
9 #include <string>
10 // StdAir
15 
16 namespace stdair {
17 
23  struct OnDDateKey : public KeyAbstract {
25 
26  // /////////// Constructors and destructors ///////////
27  private:
31  OnDDateKey();
32 
33  public:
37  OnDDateKey (const OnDStringList_T&);
38 
42  OnDDateKey (const OnDDateKey&);
43 
47  ~OnDDateKey();
48 
49 
50  public:
51  // /////////// Getters //////////
55  const Date_T getDate() const;
56 
60  const AirportCode_T getOrigin() const;
61 
65  const AirportCode_T getDestination() const;
66 
70  const short getNbOfSegments () const {
71  return _OnDStringList.size();
72  }
73 
74  public:
75  // /////////// Display support methods /////////
81  void toStream (std::ostream& ioOut) const;
82 
88  void fromStream (std::istream& ioIn);
89 
99  const std::string toString() const;
100 
101 
102  public:
103  // /////////// (Boost) Serialisation support methods /////////
107  template<class Archive>
108  void serialize (Archive& ar, const unsigned int iFileVersion);
109 
110  private:
115  void serialisationImplementationExport() const;
116  void serialisationImplementationImport();
117 
118 
119  private:
120  // ///////////////// Attributes ///////////////
121  OnDStringList_T _OnDStringList;
122 
123  };
124 
125 }
126 #endif // __STDAIR_BOM_ONDDATEKEY_HPP
void toStream(std::ostream &ioOut) const
Definition: OnDDateKey.cpp:68
LocationCode_T AirportCode_T
Handle on the StdAir library context.
Base class for the keys of Business Object Model (BOM) layer.
Definition: KeyAbstract.hpp:27
void serialize(Archive &ar, const unsigned int iFileVersion)
Definition: OnDDateKey.cpp:102
Key of a given O&D-date, made of a list of OnD strings. a OnD string contains the airline code...
Definition: OnDDateKey.hpp:23
friend class boost::serialization::access
Definition: OnDDateKey.hpp:24
void fromStream(std::istream &ioIn)
Definition: OnDDateKey.cpp:73
const short getNbOfSegments() const
Definition: OnDDateKey.hpp:70
const std::string toString() const
Definition: OnDDateKey.cpp:77
boost::gregorian::date Date_T
const AirportCode_T getOrigin() const
Definition: OnDDateKey.cpp:54
const Date_T getDate() const
Definition: OnDDateKey.cpp:47
std::list< OnDString_T > OnDStringList_T
const AirportCode_T getDestination() const
Definition: OnDDateKey.cpp:61