1.01.17
C++ Simulated Airline Travel Solution Provider (TSP) Library
Toggle main menu visibility
Loading...
Searching...
No Matches
OriginDestinationSetKey.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/OriginDestinationSetKey.hpp
>
15
16
namespace
AIRTSP
{
17
18
// ////////////////////////////////////////////////////////////////////
19
OriginDestinationSetKey::OriginDestinationSetKey()
20
: _destination (stdair::DEFAULT_DESTINATION) {
21
assert (
false
);
22
}
23
24
// ////////////////////////////////////////////////////////////////////
25
OriginDestinationSetKey::
26
OriginDestinationSetKey (
const
stdair::AirportCode_T& iDestination)
27
: _destination (iDestination) {
28
}
29
30
// ////////////////////////////////////////////////////////////////////
31
OriginDestinationSetKey::
32
OriginDestinationSetKey (
const
OriginDestinationSetKey& iKey)
33
: _destination (iKey._destination) {
34
}
35
36
// ////////////////////////////////////////////////////////////////////
37
OriginDestinationSetKey::~OriginDestinationSetKey
() {
38
}
39
40
// ////////////////////////////////////////////////////////////////////
41
void
OriginDestinationSetKey::toStream
(std::ostream& ioOut)
const
{
42
ioOut <<
"OriginDestinationSetKey: "
<<
toString
() << std::endl;
43
}
44
45
// ////////////////////////////////////////////////////////////////////
46
void
OriginDestinationSetKey::fromStream
(std::istream& ioIn) {
47
}
48
49
// ////////////////////////////////////////////////////////////////////
50
const
std::string
OriginDestinationSetKey::toString
()
const
{
51
std::ostringstream oStr;
52
oStr << _destination;
53
return
oStr.str();
54
}
55
56
// ////////////////////////////////////////////////////////////////////
57
void
OriginDestinationSetKey::serialisationImplementationExport()
const
{
58
std::ostringstream oStr;
59
boost::archive::text_oarchive oa (oStr);
60
oa << *
this
;
61
}
62
63
// ////////////////////////////////////////////////////////////////////
64
void
OriginDestinationSetKey::serialisationImplementationImport() {
65
std::istringstream iStr;
66
boost::archive::text_iarchive ia (iStr);
67
ia >> *
this
;
68
}
69
70
// ////////////////////////////////////////////////////////////////////
71
template
<
class
Archive>
72
void
OriginDestinationSetKey::serialize
(Archive& ioArchive,
73
const
unsigned
int
iFileVersion) {
78
ioArchive & _destination;
79
}
80
81
// ////////////////////////////////////////////////////////////////////
82
// Explicit template instantiation
83
namespace
ba = boost::archive;
84
template
85
void
OriginDestinationSetKey::serialize<ba::text_oarchive>
(ba::text_oarchive&,
86
unsigned
int
);
87
template
88
void
OriginDestinationSetKey::serialize<ba::text_iarchive>
(ba::text_iarchive&,
89
unsigned
int
);
90
// ////////////////////////////////////////////////////////////////////
91
92
}
OriginDestinationSetKey.hpp
AIRTSP
Definition
AIRTSP_Service.hpp:23
AIRTSP::OriginDestinationSetKey::fromStream
void fromStream(std::istream &ioIn)
Definition
OriginDestinationSetKey.cpp:46
AIRTSP::OriginDestinationSetKey::serialize
void serialize(Archive &ar, const unsigned int iFileVersion)
Definition
OriginDestinationSetKey.cpp:72
AIRTSP::OriginDestinationSetKey::toString
const std::string toString() const
Definition
OriginDestinationSetKey.cpp:50
AIRTSP::OriginDestinationSetKey::~OriginDestinationSetKey
~OriginDestinationSetKey()
Definition
OriginDestinationSetKey.cpp:37
AIRTSP::OriginDestinationSetKey::toStream
void toStream(std::ostream &ioOut) const
Definition
OriginDestinationSetKey.cpp:41
Generated on
for AirTSP by
1.17.0