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/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 Key_T& iKey) : _key (iKey), _parent (NULL) {
00025 }
00026
00027
00028 Bucket::~Bucket() {
00029 }
00030
00031
00032 std::string Bucket::toString() const {
00033 std::ostringstream oStr;
00034 oStr << describeKey();
00035 return oStr.str();
00036 }
00037
00038
00039 void Bucket::serialisationImplementation() {
00040 std::ostringstream oStr;
00041 boost::archive::text_oarchive oa (oStr);
00042 oa << *this;
00043
00044 std::istringstream iStr;
00045 boost::archive::text_iarchive ia (iStr);
00046 ia >> *this;
00047 }
00048
00049
00050 template<class Archive>
00051 void Bucket::serialize (Archive& ioArchive, const unsigned int iFileVersion) {
00052 ioArchive & _key;
00053 }
00054
00055 }
00056