StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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  friend class FacBomManager;
39 
40  public:
41  // ////////// Type definitions ////////////
46 
47 
48  public:
49  // /////////// Getters ///////////////
51  const Key_T& getKey() const {
52  return _key;
53  }
54 
56  BomAbstract* const getParent() const {
57  return _parent;
58  }
59 
62  return _key.getFlightNumber();
63  }
64 
66  const Date_T& getDepartureDate() const {
67  return _key.getDepartureDate();
68  }
69 
77  const AirlineCode_T& getAirlineCode() const;
78 
82  const HolderMap_T& getHolderMap() const {
83  return _holderMap;
84  }
85 
96  LegDate* getLegDate (const std::string& iLegDateKeyStr) const;
97 
108  LegDate* getLegDate (const LegDateKey&) const;
109 
120  SegmentDate* getSegmentDate (const std::string& iSegmentDateKeyStr) const;
121 
132  SegmentDate* getSegmentDate (const SegmentDateKey&) const;
133 
134  public:
135  // /////////// Display support methods /////////
141  void toStream (std::ostream& ioOut) const {
142  ioOut << toString();
143  }
144 
150  void fromStream (std::istream& ioIn) {
151  }
152 
156  std::string toString() const;
157 
161  const std::string describeKey() const {
162  return _key.toString();
163  }
164 
165 
166  public:
167  // /////////// (Boost) Serialisation support methods /////////
171  template<class Archive>
172  void serialize (Archive& ar, const unsigned int iFileVersion);
173 
174  private:
182  void serialisationImplementationExport() const;
183  void serialisationImplementationImport();
184 
185 
186  protected:
187  // ////////// Constructors and destructors /////////
191  FlightDate (const Key_T&);
192 
196  virtual ~FlightDate();
197 
198  private:
202  FlightDate();
203 
207  FlightDate (const FlightDate&);
208 
209 
210  protected:
211  // ////////// Attributes /////////
216 
221 
226  };
227 
228 }
229 #endif // __STDAIR_BOM_FLIGHTDATE_HPP
230