StdAir Logo  1.00.16
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
AirlineClassList.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
15
16namespace stdair {
17
18 // ////////////////////////////////////////////////////////////////////
21 _parent (NULL) {
22 assert (false);
23 }
24
25 // ////////////////////////////////////////////////////////////////////
26 AirlineClassList::AirlineClassList (const AirlineClassList& iACL)
27 : _key (iACL._key),
28 _parent (NULL),
29 _yield(iACL._yield),
30 _fare(iACL._fare) {
31 }
32
33 // ////////////////////////////////////////////////////////////////////
35 : _key (iKey), _parent (NULL) {
36 }
37
38 // ////////////////////////////////////////////////////////////////////
41
42 // ////////////////////////////////////////////////////////////////////
43 std::string AirlineClassList::toString() const {
44 std::ostringstream oStr;
45 oStr << describeKey() << ", " << _yield << ", " << _fare;
46 return oStr.str();
47 }
48
49 // ////////////////////////////////////////////////////////////////////
50 void AirlineClassList::serialisationImplementationExport() const {
51 std::ostringstream oStr;
52 boost::archive::text_oarchive oa (oStr);
53 oa << *this;
54 }
55
56 // ////////////////////////////////////////////////////////////////////
57 void AirlineClassList::serialisationImplementationImport() {
58 std::istringstream iStr;
59 boost::archive::text_iarchive ia (iStr);
60 ia >> *this;
61 }
62
63 // ////////////////////////////////////////////////////////////////////
64 template<class Archive>
65 void AirlineClassList::serialize (Archive& ioArchive,
66 const unsigned int iFileVersion) {
67 ioArchive & _key & _yield & _fare;
68 }
69
70}
71
72
73
Handle on the StdAir library context.
const ClassList_StringList_T DEFAULT_CLASS_CODE_LIST
Definition BasConst.cpp:469
const AirlineCodeList_T DEFAULT_AIRLINE_CODE_LIST
Definition BasConst.cpp:427
std::string toString() const
AirlineClassListKey Key_T
void serialize(Archive &ar, const unsigned int iFileVersion)
const std::string describeKey() const