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