1.00.26
C++ Standard Airline IT Object Library
Toggle main menu visibility
Loading...
Searching...
No Matches
OptimisationNotificationStruct.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/bom/OptimisationNotificationStruct.hpp
>
9
10
namespace
stdair
{
11
12
// //////////////////////////////////////////////////////////////////////
13
OptimisationNotificationStruct::OptimisationNotificationStruct
()
14
: _partySize (0), _stayDuration (0), _wtp (0.0), _valueOfTime (0.0) {
15
assert (
false
);
16
}
17
18
// //////////////////////////////////////////////////////////////////////
19
OptimisationNotificationStruct::
20
OptimisationNotificationStruct (
const
OptimisationNotificationStruct
& iOptimisationNotification)
21
: _origin (iOptimisationNotification._origin),
22
_destination (iOptimisationNotification._destination),
23
_pos (iOptimisationNotification._pos),
24
_preferredDepartureDate (iOptimisationNotification._preferredDepartureDate),
25
_notificationDateTime (iOptimisationNotification._notificationDateTime),
26
_preferredCabin (iOptimisationNotification._preferredCabin),
27
_partySize (iOptimisationNotification._partySize),
28
_channel (iOptimisationNotification._channel),
29
_tripType (iOptimisationNotification._tripType),
30
_stayDuration (iOptimisationNotification._stayDuration),
31
_frequentFlyerType (iOptimisationNotification._frequentFlyerType),
32
_preferredDepartureTime (iOptimisationNotification._preferredDepartureTime),
33
_wtp (iOptimisationNotification._wtp),
34
_valueOfTime (iOptimisationNotification._valueOfTime) {
35
}
36
37
// //////////////////////////////////////////////////////////////////////
38
OptimisationNotificationStruct::
39
OptimisationNotificationStruct
(
const
AirportCode_T
& iOrigin,
40
const
AirportCode_T
& iDestination,
41
const
CityCode_T
& iPOS,
42
const
Date_T
& iDepartureDate,
43
const
DateTime_T
& iNotificationDateTime,
44
const
CabinCode_T
& iPreferredCabin,
45
const
NbOfSeats_T
& iPartySize,
46
const
ChannelLabel_T
& iChannel,
47
const
TripType_T
& iTripType,
48
const
DayDuration_T
& iStayDuration,
49
const
FrequentFlyer_T
& iFrequentFlyerType,
50
const
Duration_T
& iPreferredDepartureTime,
51
const
WTP_T
& iWTP,
52
const
PriceValue_T
& iValueOfTime)
53
: _origin (iOrigin), _destination (iDestination),
54
_pos (iPOS), _preferredDepartureDate (iDepartureDate),
55
_notificationDateTime (iNotificationDateTime),
56
_preferredCabin (iPreferredCabin), _partySize (iPartySize),
57
_channel (iChannel), _tripType (iTripType),
58
_stayDuration (iStayDuration), _frequentFlyerType (iFrequentFlyerType),
59
_preferredDepartureTime (iPreferredDepartureTime), _wtp (iWTP),
60
_valueOfTime (iValueOfTime) {
61
}
62
63
// //////////////////////////////////////////////////////////////////////
64
OptimisationNotificationStruct::~OptimisationNotificationStruct
() {
65
}
66
67
// //////////////////////////////////////////////////////////////////////
68
void
OptimisationNotificationStruct::toStream
(std::ostream& ioOut)
const
{
69
ioOut <<
describe
();
70
}
71
72
// //////////////////////////////////////////////////////////////////////
73
void
OptimisationNotificationStruct::fromStream
(std::istream& ioIn) {
74
}
75
76
// //////////////////////////////////////////////////////////////////////
77
const
std::string
OptimisationNotificationStruct::describe
()
const
{
78
std::ostringstream oStr;
79
oStr <<
"At "
<< _notificationDateTime
80
<<
", for ("
<< _pos <<
") "
<< _origin <<
"-"
<< _destination
81
<<
" "
<< _preferredDepartureDate <<
" "
<< _preferredCabin
82
<<
" "
<< _partySize <<
" "
<< _channel <<
" "
<< _tripType
83
<<
" "
<< _stayDuration <<
" "
<< _frequentFlyerType
84
<<
" "
<< _preferredDepartureTime <<
" "
<< _wtp
85
<<
" "
<< _valueOfTime;
86
return
oStr.str();
87
}
88
89
}
OptimisationNotificationStruct.hpp
stdair
Handle on the StdAir library context.
Definition
BasChronometer.cpp:9
stdair::Date_T
boost::gregorian::date Date_T
Definition
stdair_date_time_types.hpp:20
stdair::DateTime_T
boost::posix_time::ptime DateTime_T
Definition
stdair_date_time_types.hpp:26
stdair::WTP_T
double WTP_T
Definition
stdair_demand_types.hpp:71
stdair::PriceValue_T
double PriceValue_T
Definition
stdair_basic_types.hpp:76
stdair::ChannelLabel_T
std::string ChannelLabel_T
Definition
stdair_demand_types.hpp:92
stdair::TripType_T
std::string TripType_T
Definition
stdair_basic_types.hpp:64
stdair::FrequentFlyer_T
std::string FrequentFlyer_T
Definition
stdair_demand_types.hpp:95
stdair::Duration_T
boost::posix_time::time_duration Duration_T
Definition
stdair_date_time_types.hpp:17
stdair::DayDuration_T
int DayDuration_T
Definition
stdair_date_time_types.hpp:38
stdair::NbOfSeats_T
double NbOfSeats_T
Definition
stdair_basic_types.hpp:92
stdair::CityCode_T
LocationCode_T CityCode_T
Definition
stdair_basic_types.hpp:25
stdair::AirportCode_T
LocationCode_T AirportCode_T
Definition
stdair_basic_types.hpp:22
stdair::CabinCode_T
std::string CabinCode_T
Definition
stdair_basic_types.hpp:41
stdair::OptimisationNotificationStruct::describe
const std::string describe() const
Definition
OptimisationNotificationStruct.cpp:77
stdair::OptimisationNotificationStruct::OptimisationNotificationStruct
OptimisationNotificationStruct(const AirportCode_T &iOrigin, const AirportCode_T &iDestination, const CityCode_T &iPOS, const Date_T &iDepartureDate, const DateTime_T &iNotificationDateTime, const CabinCode_T &iPreferredCabin, const NbOfSeats_T &iPartySize, const ChannelLabel_T &iChannel, const TripType_T &iTripType, const DayDuration_T &iStayDuration, const FrequentFlyer_T &iFrequentFlyerType, const Duration_T &iPreferredDepartureTime, const WTP_T &iWTP, const PriceValue_T &iValueOfTime)
Definition
OptimisationNotificationStruct.cpp:39
stdair::OptimisationNotificationStruct::~OptimisationNotificationStruct
~OptimisationNotificationStruct()
Definition
OptimisationNotificationStruct.cpp:64
stdair::OptimisationNotificationStruct::fromStream
void fromStream(std::istream &ioIn)
Definition
OptimisationNotificationStruct.cpp:73
stdair::OptimisationNotificationStruct::toStream
void toStream(std::ostream &ioOut) const
Definition
OptimisationNotificationStruct.cpp:68
Generated for StdAir by
1.17.0