$treeview $search $mathjax
00001 // ////////////////////////////////////////////////////////////////////// 00002 // Import section 00003 // ////////////////////////////////////////////////////////////////////// 00004 // STL 00005 #include <cassert> 00006 #include <sstream> 00007 // Boost.Serialization 00008 #include <boost/archive/text_iarchive.hpp> 00009 #include <boost/archive/text_oarchive.hpp> 00010 #include <boost/serialization/access.hpp> 00011 // StdAir 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& iFareFamily) 00024 : _key (iFareFamily._key), 00025 _parent (NULL), 00026 _frat5Curve (iFareFamily._frat5Curve), 00027 _disutilityCurve (iFareFamily._disutilityCurve), 00028 _meanStdDev (iFareFamily._meanStdDev) { 00029 } 00030 00031 // //////////////////////////////////////////////////////////////////// 00032 FareFamily::FareFamily (const Key_T& iKey) : _key (iKey), _parent (NULL) { 00033 } 00034 00035 // //////////////////////////////////////////////////////////////////// 00036 FareFamily::~FareFamily() { 00037 } 00038 00039 // //////////////////////////////////////////////////////////////////// 00040 std::string FareFamily::toString() const { 00041 std::ostringstream oStr; 00042 oStr << describeKey(); 00043 return oStr.str(); 00044 } 00045 00046 // //////////////////////////////////////////////////////////////////// 00047 void FareFamily::serialisationImplementationExport() const { 00048 std::ostringstream oStr; 00049 boost::archive::text_oarchive oa (oStr); 00050 oa << *this; 00051 } 00052 00053 // //////////////////////////////////////////////////////////////////// 00054 void FareFamily::serialisationImplementationImport() { 00055 std::istringstream iStr; 00056 boost::archive::text_iarchive ia (iStr); 00057 ia >> *this; 00058 } 00059 00060 // //////////////////////////////////////////////////////////////////// 00061 template<class Archive> 00062 void FareFamily::serialize (Archive& ioArchive, 00063 const unsigned int iFileVersion) { 00064 ioArchive & _key; 00065 } 00066 00067 } 00068 00069