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