1.00.26
C++ Standard Airline IT Object Library
Toggle main menu visibility
Loading...
Searching...
No Matches
SegmentDateKey.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
#include <
stdair/basic/BasConst_BomDisplay.hpp
>
14
#include <
stdair/bom/SegmentDateKey.hpp
>
15
16
namespace
stdair
{
17
18
// ////////////////////////////////////////////////////////////////////
19
SegmentDateKey::SegmentDateKey()
20
: _boardingPoint (
DEFAULT_ORIGIN
), _offPoint (
DEFAULT_DESTINATION
) {
21
assert (
false
);
22
}
23
24
// ////////////////////////////////////////////////////////////////////
25
SegmentDateKey::SegmentDateKey (
const
AirportCode_T
& iBoardingPoint,
26
const
AirportCode_T
& iOffPoint)
27
: _boardingPoint (iBoardingPoint), _offPoint (iOffPoint) {
28
}
29
30
// ////////////////////////////////////////////////////////////////////
31
SegmentDateKey::SegmentDateKey (
const
SegmentDateKey& iKey)
32
: _boardingPoint (iKey._boardingPoint), _offPoint (iKey._offPoint) {
33
}
34
35
// ////////////////////////////////////////////////////////////////////
36
SegmentDateKey::~SegmentDateKey
() {
37
}
38
39
// ////////////////////////////////////////////////////////////////////
40
void
SegmentDateKey::toStream
(std::ostream& ioOut)
const
{
41
ioOut <<
"SegmentDateKey: "
<<
toString
() << std::endl;
42
}
43
44
// ////////////////////////////////////////////////////////////////////
45
void
SegmentDateKey::fromStream
(std::istream& ioIn) {
46
}
47
48
// ////////////////////////////////////////////////////////////////////
49
const
std::string
SegmentDateKey::toString
()
const
{
50
std::ostringstream oStr;
51
oStr << _boardingPoint
52
<<
DEFAULT_KEY_SUB_FLD_DELIMITER
<<
" "
<< _offPoint;
53
return
oStr.str();
54
}
55
56
// ////////////////////////////////////////////////////////////////////
57
void
SegmentDateKey::serialisationImplementationExport()
const
{
58
std::ostringstream oStr;
59
boost::archive::text_oarchive oa (oStr);
60
oa << *
this
;
61
}
62
63
// ////////////////////////////////////////////////////////////////////
64
void
SegmentDateKey::serialisationImplementationImport() {
65
std::istringstream iStr;
66
boost::archive::text_iarchive ia (iStr);
67
ia >> *
this
;
68
}
69
70
// ////////////////////////////////////////////////////////////////////
71
template
<
class
Archive>
72
void
SegmentDateKey::serialize
(Archive& ioArchive,
73
const
unsigned
int
iFileVersion) {
74
ioArchive & _boardingPoint & _offPoint;
75
}
76
77
// ////////////////////////////////////////////////////////////////////
78
// Explicit template instantiation
79
namespace
ba =
boost::archive
;
80
template
void
SegmentDateKey::serialize<ba::text_oarchive>
(ba::text_oarchive&,
81
unsigned
int
);
82
template
void
SegmentDateKey::serialize<ba::text_iarchive>
(ba::text_iarchive&,
83
unsigned
int
);
84
// ////////////////////////////////////////////////////////////////////
85
86
}
BasConst_BomDisplay.hpp
BasConst_Inventory.hpp
SegmentDateKey.hpp
stdair
Handle on the StdAir library context.
Definition
BasChronometer.cpp:9
stdair::DEFAULT_KEY_SUB_FLD_DELIMITER
const std::string DEFAULT_KEY_SUB_FLD_DELIMITER
stdair::DEFAULT_DESTINATION
const AirportCode_T DEFAULT_DESTINATION
stdair::DEFAULT_ORIGIN
const AirportCode_T DEFAULT_ORIGIN
stdair::AirportCode_T
LocationCode_T AirportCode_T
Definition
stdair_basic_types.hpp:22
boost::archive
Definition
FlightDate.hpp:21
stdair::SegmentDateKey::fromStream
void fromStream(std::istream &ioIn)
Definition
SegmentDateKey.cpp:45
stdair::SegmentDateKey::toStream
void toStream(std::ostream &ioOut) const
Definition
SegmentDateKey.cpp:40
stdair::SegmentDateKey::toString
const std::string toString() const
Definition
SegmentDateKey.cpp:49
stdair::SegmentDateKey::~SegmentDateKey
~SegmentDateKey()
Definition
SegmentDateKey.cpp:36
stdair::SegmentDateKey::serialize
void serialize(Archive &ar, const unsigned int iFileVersion)
Definition
SegmentDateKey.cpp:72
Generated for StdAir by
1.17.0