Go to the documentation of this file.00001
00002
00003
00004
00005 #include <cassert>
00006 #include <sstream>
00007
00008 #include <boost/archive/text_iarchive.hpp>
00009 #include <boost/archive/text_oarchive.hpp>
00010 #include <boost/serialization/access.hpp>
00011
00012 #include <stdair/basic/BasConst_Inventory.hpp>
00013 #include <stdair/service/Logger.hpp>
00014 #include <stdair/bom/AirlineClassList.hpp>
00015
00016 namespace stdair {
00017
00018
00019 AirlineClassList::AirlineClassList()
00020 : _key (DEFAULT_AIRLINE_CODE_LIST, DEFAULT_CLASS_CODE_LIST),
00021 _parent (NULL) {
00022 assert (false);
00023 }
00024
00025
00026 AirlineClassList::AirlineClassList (const AirlineClassList& iACL)
00027 : _key (iACL._key), _parent (NULL) {
00028 assert (false);
00029 }
00030
00031
00032 AirlineClassList::AirlineClassList (const Key_T& iKey)
00033 : _key (iKey), _parent (NULL) {
00034 }
00035
00036
00037 AirlineClassList::~AirlineClassList() {
00038 }
00039
00040
00041 std::string AirlineClassList::toString() const {
00042 std::ostringstream oStr;
00043 oStr << describeKey() << ", " << _yield << ", " << _fare;
00044 return oStr.str();
00045 }
00046
00047
00048 void AirlineClassList::serialisationImplementation() {
00049 std::ostringstream oStr;
00050 boost::archive::text_oarchive oa (oStr);
00051 oa << *this;
00052
00053 std::istringstream iStr;
00054 boost::archive::text_iarchive ia (iStr);
00055 ia >> *this;
00056 }
00057
00058
00059 template<class Archive>
00060 void AirlineClassList::serialize (Archive& ioArchive,
00061 const unsigned int iFileVersion) {
00062 ioArchive & _key & _yield & _fare;
00063 }
00064
00065 }
00066
00067
00068