StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
FlightDateKey.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BOM_FLIGHTDATEKEY_HPP
2 #define __STDAIR_BOM_FLIGHTDATEKEY_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <iosfwd>
9 #include <string>
10 // StdAir
14 
16 namespace boost {
17  namespace serialization {
18  class access;
19  }
20 }
21 
22 namespace stdair {
23 
28  struct FlightDateKey : public KeyAbstract {
30 
31  // /////////// Constructors and destructors ///////////
32  private:
36  FlightDateKey();
37 
38  public:
42  FlightDateKey (const FlightNumber_T&, const Date_T&);
43 
48 
53 
54 
55  public:
56  // /////////// Getters //////////
59  return _flightNumber;
60  }
61 
63  const Date_T& getDepartureDate() const {
64  return _departureDate;
65  }
66 
67 
68  public:
69  // /////////// Display support methods /////////
75  void toStream (std::ostream& ioOut) const;
76 
82  void fromStream (std::istream& ioIn);
83 
93  const std::string toString() const;
94 
95 
96  public:
97  // /////////// (Boost) Serialisation support methods /////////
101  template<class Archive>
102  void serialize (Archive& ar, const unsigned int iFileVersion);
103 
104  private:
109  void serialisationImplementationExport() const;
110  void serialisationImplementationImport();
111 
112 
113  private:
114  // ///////////////// Attributes ///////////////
118  FlightNumber_T _flightNumber;
119 
123  Date_T _departureDate;
124  };
125 
126 }
127 #endif // __STDAIR_BOM_FLIGHTDATEKEY_HPP
unsigned short FlightNumber_T
Handle on the StdAir library context.
void toStream(std::ostream &ioOut) const
Base class for the keys of Business Object Model (BOM) layer.
Definition: KeyAbstract.hpp:27
friend class boost::serialization::access
Key of a given flight-date, made of a flight number and a departure date.
const Date_T & getDepartureDate() const
void fromStream(std::istream &ioIn)
Forward declarations.
void serialize(Archive &ar, const unsigned int iFileVersion)
boost::gregorian::date Date_T
const std::string toString() const
const FlightNumber_T & getFlightNumber() const