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::serialisationImplementationExport() const {
00045 std::ostringstream oStr;
00046 boost::archive::text_oarchive oa (oStr);
00047 oa << *this;
00048 }
00049
00050
00051 void FareFamily::serialisationImplementationImport() {
00052 std::istringstream iStr;
00053 boost::archive::text_iarchive ia (iStr);
00054 ia >> *this;
00055 }
00056
00057
00058 template<class Archive>
00059 void FareFamily::serialize (Archive& ioArchive,
00060 const unsigned int iFileVersion) {
00061 ioArchive & _key;
00062 }
00063
00064 }
00065
00066