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/bom/FareFamily.hpp>
00014
00015 namespace stdair {
00016
00017
00018 FareFamily::FareFamily() : _key (DEFAULT_FARE_FAMILY_CODE), _parent (NULL) {
00019 assert (false);
00020 }
00021
00022
00023 FareFamily::FareFamily (const FareFamily&)
00024 : _key (DEFAULT_FARE_FAMILY_CODE), _parent (NULL) {
00025 assert (false);
00026 }
00027
00028
00029 FareFamily::FareFamily (const Key_T& iKey) : _key (iKey), _parent (NULL) {
00030 }
00031
00032
00033 FareFamily::~FareFamily() {
00034 }
00035
00036
00037 std::string FareFamily::toString() const {
00038 std::ostringstream oStr;
00039 oStr << describeKey();
00040 return oStr.str();
00041 }
00042
00043
00044 void FareFamily::serialisationImplementation() {
00045 std::ostringstream oStr;
00046 boost::archive::text_oarchive oa (oStr);
00047 oa << *this;
00048
00049 std::istringstream iStr;
00050 boost::archive::text_iarchive ia (iStr);
00051 ia >> *this;
00052 }
00053
00054
00055 template<class Archive>
00056 void FareFamily::serialize (Archive& ioArchive,
00057 const unsigned int iFileVersion) {
00058 ioArchive & _key;
00059 }
00060
00061 }
00062
00063