1.01.17
C++ Simulated Airline Travel Solution Provider (TSP) Library
Toggle main menu visibility
Loading...
Searching...
No Matches
ReachableUniverseKey.cpp
Go to the documentation of this file.
1
// //////////////////////////////////////////////////////////////////////
2
// Import section
3
// //////////////////////////////////////////////////////////////////////
4
// STL
5
#include <cassert>
6
#include <sstream>
7
// Boost.Serialization
8
#include <boost/archive/text_iarchive.hpp>
9
#include <boost/archive/text_oarchive.hpp>
10
#include <boost/serialization/access.hpp>
11
// StdAir
12
#include <stdair/basic/BasConst_Inventory.hpp>
13
// AirTSP
14
#include <
airtsp/bom/ReachableUniverseKey.hpp
>
15
16
namespace
AIRTSP
{
17
18
// ////////////////////////////////////////////////////////////////////
19
ReachableUniverseKey::ReachableUniverseKey()
20
: _origin (stdair::DEFAULT_ORIGIN) {
21
assert (
false
);
22
}
23
24
// ////////////////////////////////////////////////////////////////////
25
ReachableUniverseKey::
26
ReachableUniverseKey (
const
ReachableUniverseKey& iKey)
27
: _origin (iKey._origin) {
28
}
29
30
// ////////////////////////////////////////////////////////////////////
31
ReachableUniverseKey::
32
ReachableUniverseKey (
const
stdair::AirportCode_T& iAirportCode)
33
: _origin (iAirportCode) {
34
}
35
36
// ////////////////////////////////////////////////////////////////////
37
ReachableUniverseKey::~ReachableUniverseKey
() {
38
}
39
40
// ////////////////////////////////////////////////////////////////////
41
void
ReachableUniverseKey::toStream
(std::ostream& ioOut)
const
{
42
ioOut <<
"ReachableUniverseKey: "
<<
toString
() << std::endl;
43
}
44
45
// ////////////////////////////////////////////////////////////////////
46
void
ReachableUniverseKey::fromStream
(std::istream& ioIn) {
47
}
48
49
// ////////////////////////////////////////////////////////////////////
50
const
std::string
ReachableUniverseKey::toString
()
const
{
51
std::ostringstream oStr;
52
oStr << _origin;
53
return
oStr.str();
54
}
55
56
// ////////////////////////////////////////////////////////////////////
57
void
ReachableUniverseKey::serialisationImplementationExport()
const
{
58
std::ostringstream oStr;
59
boost::archive::text_oarchive oa (oStr);
60
oa << *
this
;
61
}
62
63
// ////////////////////////////////////////////////////////////////////
64
void
ReachableUniverseKey::serialisationImplementationImport() {
65
std::istringstream iStr;
66
boost::archive::text_iarchive ia (iStr);
67
ia >> *
this
;
68
}
69
70
// ////////////////////////////////////////////////////////////////////
71
template
<
class
Archive>
72
void
ReachableUniverseKey::serialize
(Archive& ioArchive,
73
const
unsigned
int
iFileVersion) {
78
ioArchive & _origin;
79
}
80
81
// ////////////////////////////////////////////////////////////////////
82
// Explicit template instantiation
83
namespace
ba = boost::archive;
84
template
85
void
ReachableUniverseKey::serialize<ba::text_oarchive>
(ba::text_oarchive&,
86
unsigned
int
);
87
template
88
void
ReachableUniverseKey::serialize<ba::text_iarchive>
(ba::text_iarchive&,
89
unsigned
int
);
90
// ////////////////////////////////////////////////////////////////////
91
92
}
ReachableUniverseKey.hpp
AIRTSP
Definition
AIRTSP_Service.hpp:23
AIRTSP::ReachableUniverseKey::toString
const std::string toString() const
Definition
ReachableUniverseKey.cpp:50
AIRTSP::ReachableUniverseKey::~ReachableUniverseKey
~ReachableUniverseKey()
Definition
ReachableUniverseKey.cpp:37
AIRTSP::ReachableUniverseKey::serialize
void serialize(Archive &ar, const unsigned int iFileVersion)
Definition
ReachableUniverseKey.cpp:72
AIRTSP::ReachableUniverseKey::fromStream
void fromStream(std::istream &ioIn)
Definition
ReachableUniverseKey.cpp:46
AIRTSP::ReachableUniverseKey::toStream
void toStream(std::ostream &ioOut) const
Definition
ReachableUniverseKey.cpp:41
Generated on
for AirTSP by
1.17.0