StdAir Logo  1.00.0
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FlightDate.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BOM_FLIGHTDATE_HPP
2 #define __STDAIR_BOM_FLIGHTDATE_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <iosfwd>
9 #include <string>
10 // StdAir
15 
17 namespace boost {
18  namespace serialization {
19  class access;
20  }
21 }
22 
23 namespace stdair {
24 
26  struct LegDateKey;
27  class LegDate;
28  struct SegmentDateKey;
29  class SegmentDate;
30 
35  class FlightDate : public BomAbstract {
36  template <typename BOM> friend class FacBom;
37  template <typename BOM> friend class FacCloneBom;
38  friend class FacBomManager;
40 
41  public:
42  // ////////// Type definitions ////////////
47 
48 
49  public:
50  // /////////// Getters ///////////////
52  const Key_T& getKey() const {
53  return _key;
54  }
55 
57  BomAbstract* const getParent() const {
58  return _parent;
59  }
60 
63  return _key.getFlightNumber();
64  }
65 
67  const Date_T& getDepartureDate() const {
68  return _key.getDepartureDate();
69  }
70 
78  const AirlineCode_T& getAirlineCode() const;
79 
83  const HolderMap_T& getHolderMap() const {
84  return _holderMap;
85  }
86 
97  LegDate* getLegDate (const std::string& iLegDateKeyStr) const;
98 
109  LegDate* getLegDate (const LegDateKey&) const;
110 
121  SegmentDate* getSegmentDate (const std::string& iSegmentDateKeyStr) const;
122 
133  SegmentDate* getSegmentDate (const SegmentDateKey&) const;
134 
135  public:
136  // /////////// Display support methods /////////
142  void toStream (std::ostream& ioOut) const {
143  ioOut << toString();
144  }
145 
151  void fromStream (std::istream& ioIn) {
152  }
153 
157  std::string toString() const;
158 
162  const std::string describeKey() const {
163  return _key.toString();
164  }
165 
166 
167  public:
168  // /////////// (Boost) Serialisation support methods /////////
172  template<class Archive>
173  void serialize (Archive& ar, const unsigned int iFileVersion);
174 
175  private:
183  void serialisationImplementationExport() const;
184  void serialisationImplementationImport();
185 
186 
187  protected:
188  // ////////// Constructors and destructors /////////
192  FlightDate (const Key_T&);
193 
197  virtual ~FlightDate();
198 
199  private:
203  FlightDate();
204 
208  FlightDate (const FlightDate&);
209 
210 
211  protected:
212  // ////////// Attributes /////////
217 
222 
227  };
228 
229 }
230 #endif // __STDAIR_BOM_FLIGHTDATE_HPP
231