StdAir Logo  1.00.20
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
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
17namespace boost {
18 namespace serialization {
19 class access;
20 }
21 namespace archive {
22 namespace detail {
23 template <class T>
25 }
26 }
27}
28
29
30namespace stdair {
31
33 struct LegDateKey;
34 class LegDate;
35 struct SegmentDateKey;
36 class SegmentDate;
37
42 class FlightDate : public BomAbstract {
43 template <typename BOM> friend class FacBom;
44 template <typename BOM> friend class FacCloneBom;
45 friend class FacBomManager;
47 template <class T> friend struct boost::archive::detail::heap_allocation;
48
49 public:
50 // ////////// Type definitions ////////////
55
56
57 public:
58 // /////////// Getters ///////////////
60 const Key_T& getKey() const {
61 return _key;
62 }
63
65 BomAbstract* const getParent() const {
66 return _parent;
67 }
68
71 return _key.getFlightNumber();
72 }
73
75 const Date_T& getDepartureDate() const {
76 return _key.getDepartureDate();
77 }
78
86 const AirlineCode_T& getAirlineCode() const;
87
91 const HolderMap_T& getHolderMap() const {
92 return _holderMap;
93 }
94
105 LegDate* getLegDate (const std::string& iLegDateKeyStr) const;
106
117 LegDate* getLegDate (const LegDateKey&) const;
118
129 SegmentDate* getSegmentDate (const std::string& iSegmentDateKeyStr) const;
130
142
143 public:
144 // /////////// Display support methods /////////
150 void toStream (std::ostream& ioOut) const {
151 ioOut << toString();
152 }
153
159 void fromStream (std::istream& ioIn) {
160 }
161
165 std::string toString() const;
166
170 const std::string describeKey() const {
171 return _key.toString();
172 }
173
174
175 public:
176 // /////////// (Boost) Serialisation support methods /////////
180 template<class Archive>
181 void serialize (Archive& ar, const unsigned int iFileVersion);
182
183 private:
191 void serialisationImplementationExport() const;
192 void serialisationImplementationImport();
193
194
195 protected:
196 // ////////// Constructors and destructors /////////
200 FlightDate (const Key_T&);
201
205 virtual ~FlightDate();
206
207 private:
211 FlightDate();
212
216 FlightDate (const FlightDate&);
217
218
219 protected:
220 // ////////// Attributes /////////
225
230
235 };
236
237}
238#endif // __STDAIR_BOM_FLIGHTDATE_HPP
239
Handle on the StdAir library context.
boost::gregorian::date Date_T
std::map< const std::type_info *, BomAbstract * > HolderMap_T
unsigned short FlightNumber_T
std::string AirlineCode_T
Forward declarations.
Class representing the actual attributes for an airline flight-date.
HolderMap_T _holderMap
const std::string describeKey() const
SegmentDate * getSegmentDate(const std::string &iSegmentDateKeyStr) const
const HolderMap_T & getHolderMap() const
virtual ~FlightDate()
void serialize(Archive &ar, const unsigned int iFileVersion)
const AirlineCode_T & getAirlineCode() const
const FlightNumber_T & getFlightNumber() const
BomAbstract *const getParent() const
void fromStream(std::istream &ioIn)
LegDate * getLegDate(const std::string &iLegDateKeyStr) const
BomAbstract * _parent
friend class FacBom
FlightDateKey Key_T
friend class FacCloneBom
friend class boost::serialization::access
friend class FacBomManager
std::string toString() const
void toStream(std::ostream &ioOut) const
const Date_T & getDepartureDate() const
FlightDate(const Key_T &)
const Key_T & getKey() const
Key of a given flight-date, made of a flight number and a departure date.
Class representing the actual attributes for an airline segment-date.
Key of a given segment-date, made of an origin and a destination airports.