1.00.16
C++ Simulated Travel Demand Generation Library
Toggle main menu visibility
Loading...
Searching...
No Matches
DemandStreamKey.cpp
Go to the documentation of this file.
1
// //////////////////////////////////////////////////////////////////////
2
// Import section
3
// //////////////////////////////////////////////////////////////////////
4
// STL
5
#include <cassert>
6
#include <sstream>
7
// StdAir
8
#include <stdair/basic/BasConst_Inventory.hpp>
9
// TraDemGen
10
#include <
trademgen/bom/DemandStreamKey.hpp
>
11
12
namespace
TRADEMGEN
{
13
14
// ////////////////////////////////////////////////////////////////////
15
DemandStreamKey::DemandStreamKey()
16
: _origin (stdair::DEFAULT_ORIGIN),
17
_destination (stdair::DEFAULT_DESTINATION),
18
_preferredDepartureDate (stdair::DEFAULT_DEPARTURE_DATE),
19
_preferredCabin (stdair::DEFAULT_CABIN_CODE) {
20
assert (
false
);
21
}
22
23
// ////////////////////////////////////////////////////////////////////
24
DemandStreamKey::
25
DemandStreamKey (
const
stdair::AirportCode_T& iOrigin,
26
const
stdair::AirportCode_T& iDestination,
27
const
stdair::Date_T& iPreferredDepartureDate,
28
const
stdair::CabinCode_T& iPreferredCabin)
29
: _origin (iOrigin), _destination (iDestination),
30
_preferredDepartureDate (iPreferredDepartureDate),
31
_preferredCabin (iPreferredCabin) {
32
}
33
34
// ////////////////////////////////////////////////////////////////////
35
DemandStreamKey::DemandStreamKey (
const
DemandStreamKey& iKey)
36
: _origin (iKey._origin), _destination (iKey._destination),
37
_preferredDepartureDate (iKey._preferredDepartureDate),
38
_preferredCabin (iKey._preferredCabin) {
39
}
40
41
// ////////////////////////////////////////////////////////////////////
42
DemandStreamKey::~DemandStreamKey
() {
43
}
44
45
// ////////////////////////////////////////////////////////////////////
46
void
DemandStreamKey::toStream
(std::ostream& ioOut)
const
{
47
ioOut <<
"DemandStreamKey: "
<<
toString
();
48
}
49
50
// ////////////////////////////////////////////////////////////////////
51
void
DemandStreamKey::fromStream
(std::istream& ioIn) {
52
}
53
54
// ////////////////////////////////////////////////////////////////////
55
const
std::string
DemandStreamKey::toString
()
const
{
56
std::ostringstream oStr;
57
oStr << _origin <<
"-"
<< _destination <<
" "
<< _preferredDepartureDate
58
<<
" "
<< _preferredCabin;
59
return
oStr.str();
60
}
61
62
}
DemandStreamKey.hpp
TRADEMGEN
Definition
BasConst.cpp:10
TRADEMGEN::DemandStreamKey::~DemandStreamKey
~DemandStreamKey()
Definition
DemandStreamKey.cpp:42
TRADEMGEN::DemandStreamKey::toString
const std::string toString() const
Definition
DemandStreamKey.cpp:55
TRADEMGEN::DemandStreamKey::fromStream
void fromStream(std::istream &ioIn)
Definition
DemandStreamKey.cpp:51
TRADEMGEN::DemandStreamKey::toStream
void toStream(std::ostream &ioOut) const
Definition
DemandStreamKey.cpp:46
Generated on
for TraDemGen by
1.17.0