StdAir Logo  1.00.17
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
FareFamily.cpp
Go to the documentation of this file.
1// //////////////////////////////////////////////////////////////////////
2// Import section
3// //////////////////////////////////////////////////////////////////////
4// STL
5#include <cassert>
6#include <sstream>
7// Boost.Serialization
8#include <boost/archive/text_iarchive.hpp>
9#include <boost/archive/text_oarchive.hpp>
10#include <boost/serialization/access.hpp>
11// StdAir
14
15namespace stdair {
16
17 // ////////////////////////////////////////////////////////////////////
18 FareFamily::FareFamily() : _key (DEFAULT_FARE_FAMILY_CODE), _parent (NULL) {
19 assert (false);
20 }
21
22 // ////////////////////////////////////////////////////////////////////
23 FareFamily::FareFamily (const FareFamily& iFareFamily)
24 : _key (iFareFamily._key),
25 _parent (NULL),
26 _frat5Curve (iFareFamily._frat5Curve),
27 _disutilityCurve (iFareFamily._disutilityCurve),
28 _meanStdDev (iFareFamily._meanStdDev) {
29 }
30
31 // ////////////////////////////////////////////////////////////////////
32 FareFamily::FareFamily (const Key_T& iKey) : _key (iKey), _parent (NULL) {
33 }
34
35 // ////////////////////////////////////////////////////////////////////
38
39 // ////////////////////////////////////////////////////////////////////
40 std::string FareFamily::toString() const {
41 std::ostringstream oStr;
42 oStr << describeKey();
43 return oStr.str();
44 }
45
46 // ////////////////////////////////////////////////////////////////////
47 void FareFamily::serialisationImplementationExport() const {
48 std::ostringstream oStr;
49 boost::archive::text_oarchive oa (oStr);
50 oa << *this;
51 }
52
53 // ////////////////////////////////////////////////////////////////////
54 void FareFamily::serialisationImplementationImport() {
55 std::istringstream iStr;
56 boost::archive::text_iarchive ia (iStr);
57 ia >> *this;
58 }
59
60 // ////////////////////////////////////////////////////////////////////
61 template<class Archive>
62 void FareFamily::serialize (Archive& ioArchive,
63 const unsigned int iFileVersion) {
64 ioArchive & _key;
65 }
66
67}
68
69
Handle on the StdAir library context.
const FamilyCode_T DEFAULT_FARE_FAMILY_CODE
FareFamily(const Key_T &)
virtual ~FareFamily()
const std::string describeKey() const
BomAbstract * _parent
std::string toString() const
FareFamilyKey Key_T
void serialize(Archive &ar, const unsigned int iFileVersion)