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/basic/BasConst_BomDisplay.hpp>
00014 #include <stdair/bom/GuillotineBlockKey.hpp>
00015
00016 namespace stdair {
00017
00018
00019 GuillotineBlockKey::GuillotineBlockKey()
00020 : _guillotineNumber (DEFAULT_GUILLOTINE_NUMBER) {
00021 assert (false);
00022 }
00023
00024
00025 GuillotineBlockKey::
00026 GuillotineBlockKey (const GuillotineNumber_T& iGuillotineNumber)
00027 : _guillotineNumber (iGuillotineNumber) {
00028 }
00029
00030
00031 GuillotineBlockKey::GuillotineBlockKey (const GuillotineBlockKey& iKey)
00032 : _guillotineNumber (iKey._guillotineNumber) {
00033 }
00034
00035
00036 GuillotineBlockKey::~GuillotineBlockKey() {
00037 }
00038
00039
00040 void GuillotineBlockKey::toStream (std::ostream& ioOut) const {
00041 ioOut << "GuillotineBlockKey: " << toString();
00042 }
00043
00044
00045 void GuillotineBlockKey::fromStream (std::istream& ioIn) {
00046 }
00047
00048
00049 const std::string GuillotineBlockKey::toString() const {
00050 std::ostringstream oStr;
00051 oStr << _guillotineNumber;
00052 return oStr.str();
00053 }
00054
00055
00056 void GuillotineBlockKey::serialisationImplementationExport() const {
00057 std::ostringstream oStr;
00058 boost::archive::text_oarchive oa (oStr);
00059 oa << *this;
00060 }
00061
00062
00063 void GuillotineBlockKey::serialisationImplementationImport() {
00064 std::istringstream iStr;
00065 boost::archive::text_iarchive ia (iStr);
00066 ia >> *this;
00067 }
00068
00069
00070 template<class Archive>
00071 void GuillotineBlockKey::serialize (Archive& ioArchive,
00072 const unsigned int iFileVersion) {
00077 ioArchive & _guillotineNumber;
00078 }
00079
00080
00081
00082 namespace ba = boost::archive;
00083 template void GuillotineBlockKey::
00084 serialize<ba::text_oarchive> (ba::text_oarchive&, unsigned int);
00085 template void GuillotineBlockKey::
00086 serialize<ba::text_iarchive> (ba::text_iarchive&, unsigned int);
00087
00088
00089 }