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