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