1.00.26
C++ Standard Airline IT Object Library
Toggle main menu visibility
Loading...
Searching...
No Matches
Bucket.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/bom/Bucket.hpp
>
14
15
namespace
stdair
{
16
17
// ////////////////////////////////////////////////////////////////////
18
Bucket::Bucket
()
19
: _key (
DEFAULT_SEAT_INDEX
), _parent (NULL) {
20
assert (
false
);
21
}
22
23
// ////////////////////////////////////////////////////////////////////
24
Bucket::Bucket (
const
Bucket& iBucket) :
25
_key (iBucket._key),
26
_parent (NULL),
27
_yieldRangeUpperValue (iBucket._yieldRangeUpperValue),
28
_availability (iBucket._availability),
29
_soldSeats (iBucket._soldSeats) {
30
31
}
32
33
// ////////////////////////////////////////////////////////////////////
34
Bucket::Bucket
(
const
Key_T
& iKey) :
_key
(iKey),
_parent
(NULL) {
35
}
36
37
// ////////////////////////////////////////////////////////////////////
38
Bucket::~Bucket
() {
39
}
40
41
// ////////////////////////////////////////////////////////////////////
42
std::string
Bucket::toString
()
const
{
43
std::ostringstream oStr;
44
oStr <<
describeKey
();
45
return
oStr.str();
46
}
47
48
// ////////////////////////////////////////////////////////////////////
49
void
Bucket::serialisationImplementationExport()
const
{
50
std::ostringstream oStr;
51
boost::archive::text_oarchive oa (oStr);
52
oa << *
this
;
53
}
54
55
// ////////////////////////////////////////////////////////////////////
56
void
Bucket::serialisationImplementationImport() {
57
std::istringstream iStr;
58
boost::archive::text_iarchive ia (iStr);
59
ia >> *
this
;
60
}
61
62
// ////////////////////////////////////////////////////////////////////
63
template
<
class
Archive>
64
void
Bucket::serialize
(Archive& ioArchive,
const
unsigned
int
iFileVersion) {
65
ioArchive &
_key
;
66
}
67
68
}
69
BasConst_Inventory.hpp
Bucket.hpp
stdair
Handle on the StdAir library context.
Definition
BasChronometer.cpp:9
stdair::DEFAULT_SEAT_INDEX
const SeatIndex_T DEFAULT_SEAT_INDEX
stdair::Bucket::toString
std::string toString() const
Definition
Bucket.cpp:42
stdair::Bucket::describeKey
const std::string describeKey() const
Definition
Bucket.hpp:128
stdair::Bucket::_key
Key_T _key
Definition
Bucket.hpp:179
stdair::Bucket::Key_T
BucketKey Key_T
Definition
Bucket.hpp:40
stdair::Bucket::_parent
BomAbstract * _parent
Definition
Bucket.hpp:184
stdair::Bucket::~Bucket
virtual ~Bucket()
Definition
Bucket.cpp:38
stdair::Bucket::serialize
void serialize(Archive &ar, const unsigned int iFileVersion)
Definition
Bucket.cpp:64
stdair::Bucket::Bucket
Bucket(const Key_T &)
Definition
Bucket.cpp:34
Generated for StdAir by
1.17.0