StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
AirlineClassList.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BOM_AIRLINECLASSLIST_HPP
2 #define __STDAIR_BOM_AIRLINECLASSLIST_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 
27  class AirlineClassList : public BomAbstract {
28  template <typename BOM> friend class FacBom;
29  template <typename BOM> friend class FacCloneBom;
30  friend class FacBomManager;
32 
33  public:
34  // ////////// Type definitions ////////////
39 
40 
41  public:
42  // ////////// Getters ////////////
44  const Key_T& getKey() const {
45  return _key;
46  }
47 
49  BomAbstract* const getParent() const {
50  return _parent;
51  }
52 
55  return _key.getAirlineCodeList();
56  }
57 
60  return _key.getClassCodeList();
61  }
62 
64  const HolderMap_T& getHolderMap() const {
65  return _holderMap;
66  }
67 
69  const stdair::Yield_T& getYield() const {
70  return _yield;
71  }
72 
74  const stdair::Fare_T& getFare() const {
75  return _fare;
76  }
77 
78  public:
79  // /////////// Setters //////////////
80  void setYield (const Yield_T& iYield) {
81  _yield = iYield;
82  }
83 
84  void setFare (const Fare_T& iFare) {
85  _fare = iFare;
86  }
87 
88  public:
89  // /////////// Display support methods /////////
95  void toStream (std::ostream& ioOut) const {
96  ioOut << toString();
97  }
98 
104  void fromStream (std::istream& ioIn) {
105  }
106 
110  std::string toString() const;
111 
115  const std::string describeKey() const {
116  return _key.toString();
117  }
118 
119 
120  public:
121  // /////////// (Boost) Serialisation support methods /////////
125  template<class Archive>
126  void serialize (Archive& ar, const unsigned int iFileVersion);
127 
128  private:
133  void serialisationImplementationExport() const;
134  void serialisationImplementationImport();
135 
136 
137  protected:
138  // ////////// Constructors and destructors /////////
142  AirlineClassList (const Key_T&);
146  virtual ~AirlineClassList();
147 
148  private:
153 
158 
159 
160  protected:
161  // ////////// Attributes /////////
165  Key_T _key;
166 
171 
176 
177  /*
178  * Yield value.
179  */
181 
182  /*
183  * Fare value.
184  */
186  };
187 
188 }
189 #endif // __STDAIR_BOM_AIRLINECLASSLIST_HPP
190 
const ClassList_StringList_T & getClassCodeList() const
void setFare(const Fare_T &iFare)
Utility class for linking StdAir-based objects.
const stdair::Yield_T & getYield() const
std::vector< ClassList_String_T > ClassList_StringList_T
Handle on the StdAir library context.
BomAbstract *const getParent() const
const std::string toString() const
AirlineClassListKey Key_T
std::map< const std::type_info *, BomAbstract * > HolderMap_T
Definition: BomAbstract.hpp:63
Base class for the Business Object Model (BOM) layer.
Definition: BomAbstract.hpp:24
void toStream(std::ostream &ioOut) const
std::string toString() const
std::vector< AirlineCode_T > AirlineCodeList_T
const stdair::Fare_T & getFare() const
void fromStream(std::istream &ioIn)
const AirlineCodeList_T & getAirlineCodeList() const
const HolderMap_T & getHolderMap() const
const ClassList_StringList_T & getClassCodeList() const
const std::string describeKey() const
Base class for Factory layer.
Definition: FacBom.hpp:22
const AirlineCodeList_T & getAirlineCodeList() const
friend class boost::serialization::access
Forward declarations.
void serialize(Archive &ar, const unsigned int iFileVersion)
Class representing the actual attributes for a segment-features.
Base class for Factory layer.
Definition: FacCloneBom.hpp:22
void setYield(const Yield_T &iYield)
const Key_T & getKey() const