1.01.17
C++ Simulated Airline Travel Solution Provider (TSP) Library
Toggle main menu visibility
Loading...
Searching...
No Matches
OriginDestinationSet.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/OriginDestinationSet.hpp
>
15
16
namespace
AIRTSP
{
17
18
// ////////////////////////////////////////////////////////////////////
19
OriginDestinationSet::OriginDestinationSet
()
20
: _key (stdair::DEFAULT_ORIGIN), _parent (NULL) {
21
assert (
false
);
22
}
23
24
// ////////////////////////////////////////////////////////////////////
25
OriginDestinationSet::OriginDestinationSet (
const
OriginDestinationSet&)
26
: _key (
stdair
::DEFAULT_ORIGIN), _parent (NULL) {
27
assert (
false
);
28
}
29
30
// ////////////////////////////////////////////////////////////////////
31
OriginDestinationSet::OriginDestinationSet
(
const
Key_T
& iKey)
32
:
_key
(iKey),
_parent
(NULL) {
33
}
34
35
// ////////////////////////////////////////////////////////////////////
36
OriginDestinationSet::~OriginDestinationSet
() {
37
}
38
39
// ////////////////////////////////////////////////////////////////////
40
std::string
OriginDestinationSet::toString
()
const
{
41
std::ostringstream oStr;
42
oStr <<
_key
.toString();
43
return
oStr.str();
44
}
45
46
// ////////////////////////////////////////////////////////////////////
47
void
OriginDestinationSet::serialisationImplementationExport()
const
{
48
std::ostringstream oStr;
49
boost::archive::text_oarchive oa (oStr);
50
oa << *
this
;
51
}
52
53
// ////////////////////////////////////////////////////////////////////
54
void
OriginDestinationSet::serialisationImplementationImport() {
55
std::istringstream iStr;
56
boost::archive::text_iarchive ia (iStr);
57
ia >> *
this
;
58
}
59
60
// ////////////////////////////////////////////////////////////////////
61
template
<
class
Archive>
62
void
OriginDestinationSet::serialize
(Archive& ioArchive,
63
const
unsigned
int
iFileVersion) {
64
ioArchive &
_key
;
65
}
66
67
// ////////////////////////////////////////////////////////////////////
68
// Explicit template instantiation
69
namespace
ba = boost::archive;
70
template
71
void
OriginDestinationSet::serialize<ba::text_oarchive>
(ba::text_oarchive&,
72
unsigned
int
);
73
template
74
void
OriginDestinationSet::serialize<ba::text_iarchive>
(ba::text_iarchive&,
75
unsigned
int
);
76
// ////////////////////////////////////////////////////////////////////
77
78
}
79
OriginDestinationSet.hpp
AIRTSP::OriginDestinationSet::~OriginDestinationSet
~OriginDestinationSet()
Definition
OriginDestinationSet.cpp:36
AIRTSP::OriginDestinationSet::_key
Key_T _key
Definition
OriginDestinationSet.hpp:168
AIRTSP::OriginDestinationSet::_parent
stdair::BomAbstract * _parent
Definition
OriginDestinationSet.hpp:173
AIRTSP::OriginDestinationSet::Key_T
OriginDestinationSetKey Key_T
Definition
OriginDestinationSet.hpp:57
AIRTSP::OriginDestinationSet::OriginDestinationSet
OriginDestinationSet(const Key_T &)
Definition
OriginDestinationSet.cpp:31
AIRTSP::OriginDestinationSet::serialize
void serialize(Archive &ar, const unsigned int iFileVersion)
Definition
OriginDestinationSet.cpp:62
AIRTSP::OriginDestinationSet::toString
std::string toString() const
Definition
OriginDestinationSet.cpp:40
AIRTSP
Definition
AIRTSP_Service.hpp:23
stdair
Forward declarations.
Definition
AIRTSP_Service.hpp:14
Generated on
for AirTSP by
1.17.0