0.08.01
C++ Open Travel Request Parsing Library
Toggle main menu visibility
Loading...
Searching...
No Matches
World.cpp
Go to the documentation of this file.
1
// //////////////////////////////////////////////////////////////////////
2
// Import section
3
// //////////////////////////////////////////////////////////////////////
4
// C
5
#include <assert.h>
6
// STL
7
#include <sstream>
8
// OpenTrep
9
#include <
opentrep/bom/Place.hpp
>
10
#include <
opentrep/bom/World.hpp
>
11
#include <
opentrep/service/Logger.hpp
>
12
13
namespace
OPENTREP
{
14
15
// //////////////////////////////////////////////////////////////////////
16
World::World () {
17
}
18
19
// //////////////////////////////////////////////////////////////////////
20
World::World (
const
World
& iWorld) {
21
}
22
23
// //////////////////////////////////////////////////////////////////////
24
World::~World () {
25
}
26
27
// //////////////////////////////////////////////////////////////////////
28
std::string
World::describeShortKey
()
const
{
29
std::ostringstream oStr;
30
return
oStr.str();
31
}
32
33
// //////////////////////////////////////////////////////////////////////
34
std::string
World::describeKey
()
const
{
35
return
describeShortKey
();
36
}
37
38
// //////////////////////////////////////////////////////////////////////
39
std::string
World::toString
()
const
{
40
return
describeKey
();
41
}
42
43
// //////////////////////////////////////////////////////////////////////
44
void
World::toStream
(std::ostream& ioOut)
const
{
45
ioOut <<
toString
();
46
}
47
48
// //////////////////////////////////////////////////////////////////////
49
void
World::fromStream
(std::istream& ioIn) {
50
}
51
52
// //////////////////////////////////////////////////////////////////////
53
std::string
World::shortDisplay
()
const
{
54
std::ostringstream oStr;
55
oStr <<
describeKey
();
56
return
oStr.str();
57
}
58
59
// //////////////////////////////////////////////////////////////////////
60
std::string
World::display
()
const
{
61
std::ostringstream oStr;
62
63
oStr <<
shortDisplay
();
64
65
for
(PlaceOrderedList_T::const_iterator itPlace = _placeOrderedList.begin();
66
itPlace != _placeOrderedList.end(); ++itPlace) {
67
const
Place
* lPlace_ptr = *itPlace;
68
assert (lPlace_ptr != NULL);
69
70
oStr << lPlace_ptr->
display
();
71
}
72
73
return
oStr.str();
74
}
75
76
// //////////////////////////////////////////////////////////////////////
77
GenericBom_T
World::getGenericBom
(
const
XapianDocID_T
& iDocID)
const
{
78
BomType::EN_BomType
oBomType =
BomType::LAST_VALUE
;
79
BomAbstract
* oBom_ptr = NULL;
80
81
GenericBomList_T::const_iterator itBom = _genericBomList.find (iDocID);
82
if
(itBom != _genericBomList.end()) {
83
const
GenericBom_T
& lGenericBom = itBom->second;
84
oBomType = lGenericBom.first;
85
oBom_ptr = lGenericBom.second;
86
}
87
88
return
GenericBom_T
(oBomType, oBom_ptr);
89
}
90
91
}
Logger.hpp
Place.hpp
World.hpp
OPENTREP::BomAbstract::BomAbstract
BomAbstract()
Definition
BomAbstract.hpp:57
OPENTREP::Place
Class modelling a place/POR (point of reference).
Definition
Place.hpp:29
OPENTREP::Place::display
std::string display() const
Definition
Place.cpp:213
OPENTREP::World
Definition
World.hpp:20
OPENTREP::World::display
std::string display() const
Definition
World.cpp:60
OPENTREP::World::describeKey
std::string describeKey() const
Definition
World.cpp:34
OPENTREP::World::toString
std::string toString() const
Definition
World.cpp:39
OPENTREP::World::shortDisplay
std::string shortDisplay() const
Definition
World.cpp:53
OPENTREP::World::fromStream
void fromStream(std::istream &)
Definition
World.cpp:49
OPENTREP::World::toStream
void toStream(std::ostream &) const
Definition
World.cpp:44
OPENTREP::World::getGenericBom
GenericBom_T getGenericBom(const XapianDocID_T &iDocID) const
Definition
World.cpp:77
OPENTREP::World::describeShortKey
std::string describeShortKey() const
Definition
World.cpp:28
OPENTREP
Definition
BasChronometer.cpp:10
OPENTREP::GenericBom_T
std::pair< BomType::EN_BomType, BomAbstract * > GenericBom_T
Definition
GenericBom.hpp:19
OPENTREP::XapianDocID_T
unsigned int XapianDocID_T
Definition
OPENTREP_Types.hpp:650
OPENTREP::BomType::EN_BomType
EN_BomType
Definition
BomType.hpp:15
OPENTREP::BomType::LAST_VALUE
@ LAST_VALUE
Definition
BomType.hpp:23
Generated on
for OpenTREP by
1.17.0