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