StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
FareFamily.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BOM_FAREFAMILY_HPP
2 #define __STDAIR_BOM_FAREFAMILY_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 
28  class FareFamily : public BomAbstract {
29  template <typename BOM> friend class FacBom;
30  template <typename BOM> friend class FacCloneBom;
31  friend class FacBomManager;
33 
34  public:
35  // ////////// Type definitions ////////////
40 
41 
42  public:
43  // /////////// Getters ////////////
45  const Key_T& getKey() const {
46  return _key;
47  }
48 
50  BomAbstract* const getParent() const {
51  return _parent;
52  }
53 
55  const FamilyCode_T& getFamilyCode() const {
56  return _key.getFamilyCode();
57  }
58 
60  const HolderMap_T& getHolderMap() const {
61  return _holderMap;
62  }
63 
65  const FRAT5Curve_T& getFrat5Curve () const {
66  return _frat5Curve;
67  }
68 
71  return _disutilityCurve;
72  }
73 
75  const MeanValue_T& getMean () const { return _mean; }
76  const StdDevValue_T& getStdDev () const {return _stdDev; }
77 
80 
81 
82  public:
83  // /////////// Setters ////////////
85  void setFrat5Curve (const FRAT5Curve_T& iFRAT5Curve) {
86  _frat5Curve = iFRAT5Curve;
87  }
88 
90  void setDisutilityCurve (const FFDisutilityCurve_T& iDisutilityCurve) {
91  _disutilityCurve = iDisutilityCurve;
92  }
93 
95  void setMean (const MeanValue_T& iMean) { _mean = iMean; }
96  void setStdDev (const StdDevValue_T& iStdDev) { _stdDev = iStdDev; }
97 
99  void setMeanStdDev (const MeanStdDevPairVector_T& iMeanStdDev){
100  _meanStdDev = iMeanStdDev;
101  }
102 
103 
104  public:
105  // /////////// Display support methods /////////
111  void toStream (std::ostream& ioOut) const {
112  ioOut << toString();
113  }
114 
120  void fromStream (std::istream& ioIn) {
121  }
122 
126  std::string toString() const;
127 
131  const std::string describeKey() const {
132  return _key.toString();
133  }
134 
135 
136  public:
137  // /////////// (Boost) Serialisation support methods /////////
141  template<class Archive>
142  void serialize (Archive& ar, const unsigned int iFileVersion);
143 
144 
145  private:
150  void serialisationImplementationExport() const;
151  void serialisationImplementationImport();
152 
153 
154  protected:
155  // ////////// Constructors and destructors /////////
159  FareFamily (const Key_T&);
160 
164  virtual ~FareFamily();
165 
166 
167  private:
171  FareFamily();
172 
176  FareFamily (const FareFamily&);
177 
178 
179  public:
180  // ////////// Attributes /////////
184  Key_T _key;
185 
190 
195 
200 
205 
209 
214  };
215 
216 }
217 #endif // __STDAIR_BOM_FAREFAMILY_HPP
218 
std::map< const DTD_T, FRAT5_T > FRAT5Curve_T
const FamilyCode_T & getFamilyCode() const
Definition: FareFamily.hpp:55
const std::string toString() const
std::vector< MeanStdDevPair_T > MeanStdDevPairVector_T
const MeanValue_T & getMean() const
Definition: FareFamily.hpp:75
std::map< const DTD_T, double > FFDisutilityCurve_T
const Key_T & getKey() const
Definition: FareFamily.hpp:45
Utility class for linking StdAir-based objects.
FareFamilyKey Key_T
Definition: FareFamily.hpp:39
Handle on the StdAir library context.
void fromStream(std::istream &ioIn)
Definition: FareFamily.hpp:120
std::map< const std::type_info *, BomAbstract * > HolderMap_T
Definition: BomAbstract.hpp:63
void setDisutilityCurve(const FFDisutilityCurve_T &iDisutilityCurve)
Definition: FareFamily.hpp:90
void setFrat5Curve(const FRAT5Curve_T &iFRAT5Curve)
Definition: FareFamily.hpp:85
Base class for the Business Object Model (BOM) layer.
Definition: BomAbstract.hpp:24
const FRAT5Curve_T & getFrat5Curve() const
Definition: FareFamily.hpp:65
Key of a given fare family, made of a fare family code.
MeanStdDevPairVector_T _meanStdDev
Definition: FareFamily.hpp:213
std::string FamilyCode_T
void setMeanStdDev(const MeanStdDevPairVector_T &iMeanStdDev)
Definition: FareFamily.hpp:99
virtual ~FareFamily()
Definition: FareFamily.cpp:36
std::string toString() const
Definition: FareFamily.cpp:40
double StdDevValue_T
Base class for Factory layer.
Definition: FacBom.hpp:22
double MeanValue_T
void setStdDev(const StdDevValue_T &iStdDev)
Definition: FareFamily.hpp:96
void serialize(Archive &ar, const unsigned int iFileVersion)
Definition: FareFamily.cpp:62
const FamilyCode_T & getFamilyCode() const
void setMean(const MeanValue_T &iMean)
Definition: FareFamily.hpp:95
void toStream(std::ostream &ioOut) const
Definition: FareFamily.hpp:111
const FFDisutilityCurve_T & getDisutilityCurve() const
Definition: FareFamily.hpp:70
Class representing the actual attributes for a family fare.
Definition: FareFamily.hpp:28
MeanValue_T _mean
Definition: FareFamily.hpp:207
const HolderMap_T & getHolderMap() const
Definition: FareFamily.hpp:60
Forward declarations.
BomAbstract * _parent
Definition: FareFamily.hpp:189
FRAT5Curve_T _frat5Curve
Definition: FareFamily.hpp:199
BomAbstract *const getParent() const
Definition: FareFamily.hpp:50
const StdDevValue_T & getStdDev() const
Definition: FareFamily.hpp:76
const MeanStdDevPairVector_T & getMeanStdDev() const
Definition: FareFamily.hpp:79
const std::string describeKey() const
Definition: FareFamily.hpp:131
HolderMap_T _holderMap
Definition: FareFamily.hpp:194
FFDisutilityCurve_T _disutilityCurve
Definition: FareFamily.hpp:204
friend class boost::serialization::access
Definition: FareFamily.hpp:32
Base class for Factory layer.
Definition: FacCloneBom.hpp:22
StdDevValue_T _stdDev
Definition: FareFamily.hpp:208