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