StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
16 namespace stdair {
17 
18  // ////////////////////////////////////////////////////////////////////
19  AirlineClassList::AirlineClassList()
21  _parent (NULL) {
22  assert (false);
23  }
24 
25  // ////////////////////////////////////////////////////////////////////
26  AirlineClassList::AirlineClassList (const AirlineClassList& iACL)
27  : _key (iACL._key), _parent (NULL) {
28  assert (false);
29  }
30 
31  // ////////////////////////////////////////////////////////////////////
32  AirlineClassList::AirlineClassList (const Key_T& iKey)
33  : _key (iKey), _parent (NULL) {
34  }
35 
36  // ////////////////////////////////////////////////////////////////////
38  }
39 
40  // ////////////////////////////////////////////////////////////////////
41  std::string AirlineClassList::toString() const {
42  std::ostringstream oStr;
43  oStr << describeKey() << ", " << _yield << ", " << _fare;
44  return oStr.str();
45  }
46 
47  // ////////////////////////////////////////////////////////////////////
48  void AirlineClassList::serialisationImplementationExport() const {
49  std::ostringstream oStr;
50  boost::archive::text_oarchive oa (oStr);
51  oa << *this;
52  }
53 
54  // ////////////////////////////////////////////////////////////////////
55  void AirlineClassList::serialisationImplementationImport() {
56  std::istringstream iStr;
57  boost::archive::text_iarchive ia (iStr);
58  ia >> *this;
59  }
60 
61  // ////////////////////////////////////////////////////////////////////
62  template<class Archive>
63  void AirlineClassList::serialize (Archive& ioArchive,
64  const unsigned int iFileVersion) {
65  ioArchive & _key & _yield & _fare;
66  }
67 
68 }
69 
70 
71