1.00.26
C++ Standard Airline IT Object Library
Toggle main menu visibility
Loading...
Searching...
No Matches
FareFeatures.hpp
Go to the documentation of this file.
1
#ifndef __STDAIR_BOM_FAREFEATURES_HPP
2
#define __STDAIR_BOM_FAREFEATURES_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// StdAir
8
#include <
stdair/bom/BomAbstract.hpp
>
9
#include <
stdair/bom/FareFeaturesKey.hpp
>
10
#include <
stdair/bom/FareFeaturesTypes.hpp
>
11
12
// Forward declaration
13
namespace
stdair
{
14
18
class
FareFeatures
:
public
BomAbstract
{
19
template
<
typename
BOM>
friend
class
FacBom
;
20
template
<
typename
BOM>
friend
class
FacCloneBom
;
21
friend
class
FacBomManager
;
22
23
public
:
24
// //////////// Type definitions //////////////
28
typedef
FareFeaturesKey
Key_T
;
29
30
public
:
31
// /////////// Display support methods /////////
37
void
toStream
(std::ostream& ioOut)
const
{
38
ioOut <<
toString
();
39
}
40
46
void
fromStream
(std::istream& ioIn) {
47
}
48
52
std::string
toString
()
const
;
53
57
const
std::string
describeKey
()
const
{
58
return
_key
.toString();
59
}
60
61
62
public
:
63
// ////////// Getters ////////////
67
const
Key_T
&
getKey
()
const
{
68
return
_key
;
69
}
70
74
BomAbstract
*
const
getParent
()
const
{
75
return
_parent
;
76
}
77
81
const
HolderMap_T
&
getHolderMap
()
const
{
82
return
_holderMap
;
83
}
84
88
const
TripType_T
&
getTripType
()
const
{
89
return
_key
.getTripType();
90
}
91
95
const
DayDuration_T
&
getAdvancePurchase
()
const
{
96
return
_key
.getAdvancePurchase();
97
}
98
102
const
SaturdayStay_T
&
getSaturdayStay
()
const
{
103
return
_key
.getSaturdayStay();
104
}
105
109
const
ChangeFees_T
&
getChangeFees
()
const
{
110
return
_key
.getChangeFees();
111
}
112
116
const
NonRefundable_T
&
getRefundableOption
()
const
{
117
return
_key
.getRefundableOption();
118
}
119
123
const
DayDuration_T
&
getMinimumStay
()
const
{
124
return
_key
.getMinimumStay();
125
}
126
127
128
public
:
129
// ////////////// Business methods ///////////////
134
bool
isTripTypeValid
(
const
TripType_T
&)
const
;
135
140
bool
isStayDurationValid
(
const
DayDuration_T
&)
const
;
141
146
bool
isAdvancePurchaseValid
(
const
DateTime_T
& iBookingRequestDateTime,
147
const
DateTime_T
& iFlightDateTime)
const
;
148
149
150
protected
:
151
// ////////// Constructors and destructors /////////
155
FareFeatures
(
const
Key_T
&);
159
virtual
~FareFeatures
();
160
161
private
:
165
FareFeatures
();
169
FareFeatures
(
const
FareFeatures
&);
170
171
protected
:
172
// ///////////// Attributes /////////////
176
Key_T
_key
;
177
181
BomAbstract
*
_parent
;
182
186
HolderMap_T
_holderMap
;
187
};
188
189
}
190
#endif
// __STDAIR_BOM_FAREFEATURES_HPP
191
BomAbstract.hpp
FareFeaturesKey.hpp
FareFeaturesTypes.hpp
stdair
Handle on the StdAir library context.
Definition
BasChronometer.cpp:9
stdair::DateTime_T
boost::posix_time::ptime DateTime_T
Definition
stdair_date_time_types.hpp:26
stdair::TripType_T
std::string TripType_T
Definition
stdair_basic_types.hpp:64
stdair::HolderMap_T
std::map< const std::type_info *, BomAbstract * > HolderMap_T
Definition
BomAbstract.hpp:63
stdair::SaturdayStay_T
bool SaturdayStay_T
Definition
stdair_date_time_types.hpp:41
stdair::NonRefundable_T
bool NonRefundable_T
Definition
stdair_demand_types.hpp:27
stdair::DayDuration_T
int DayDuration_T
Definition
stdair_date_time_types.hpp:38
stdair::ChangeFees_T
bool ChangeFees_T
Definition
stdair_demand_types.hpp:24
stdair::BomAbstract::BomAbstract
BomAbstract()
Definition
BomAbstract.hpp:53
stdair::FareFeatures
Class representing the actual attributes for a fare date-period.
Definition
FareFeatures.hpp:18
stdair::FareFeatures::getSaturdayStay
const SaturdayStay_T & getSaturdayStay() const
Definition
FareFeatures.hpp:102
stdair::FareFeatures::getChangeFees
const ChangeFees_T & getChangeFees() const
Definition
FareFeatures.hpp:109
stdair::FareFeatures::getHolderMap
const HolderMap_T & getHolderMap() const
Definition
FareFeatures.hpp:81
stdair::FareFeatures::getKey
const Key_T & getKey() const
Definition
FareFeatures.hpp:67
stdair::FareFeatures::toStream
void toStream(std::ostream &ioOut) const
Definition
FareFeatures.hpp:37
stdair::FareFeatures::~FareFeatures
virtual ~FareFeatures()
Definition
FareFeatures.cpp:38
stdair::FareFeatures::getParent
BomAbstract *const getParent() const
Definition
FareFeatures.hpp:74
stdair::FareFeatures::toString
std::string toString() const
Definition
FareFeatures.cpp:42
stdair::FareFeatures::_key
Key_T _key
Definition
FareFeatures.hpp:176
stdair::FareFeatures::isTripTypeValid
bool isTripTypeValid(const TripType_T &) const
Definition
FareFeatures.cpp:50
stdair::FareFeatures::describeKey
const std::string describeKey() const
Definition
FareFeatures.hpp:57
stdair::FareFeatures::Key_T
FareFeaturesKey Key_T
Definition
FareFeatures.hpp:28
stdair::FareFeatures::_holderMap
HolderMap_T _holderMap
Definition
FareFeatures.hpp:186
stdair::FareFeatures::isStayDurationValid
bool isStayDurationValid(const DayDuration_T &) const
Definition
FareFeatures.cpp:75
stdair::FareFeatures::getRefundableOption
const NonRefundable_T & getRefundableOption() const
Definition
FareFeatures.hpp:116
stdair::FareFeatures::fromStream
void fromStream(std::istream &ioIn)
Definition
FareFeatures.hpp:46
stdair::FareFeatures::isAdvancePurchaseValid
bool isAdvancePurchaseValid(const DateTime_T &iBookingRequestDateTime, const DateTime_T &iFlightDateTime) const
Definition
FareFeatures.cpp:88
stdair::FareFeatures::FacBom
friend class FacBom
Definition
FareFeatures.hpp:19
stdair::FareFeatures::FacCloneBom
friend class FacCloneBom
Definition
FareFeatures.hpp:20
stdair::FareFeatures::FacBomManager
friend class FacBomManager
Definition
FareFeatures.hpp:21
stdair::FareFeatures::getTripType
const TripType_T & getTripType() const
Definition
FareFeatures.hpp:88
stdair::FareFeatures::getMinimumStay
const DayDuration_T & getMinimumStay() const
Definition
FareFeatures.hpp:123
stdair::FareFeatures::getAdvancePurchase
const DayDuration_T & getAdvancePurchase() const
Definition
FareFeatures.hpp:95
stdair::FareFeatures::_parent
BomAbstract * _parent
Definition
FareFeatures.hpp:181
stdair::FareFeatures::FareFeatures
FareFeatures(const Key_T &)
Definition
FareFeatures.cpp:33
stdair::FareFeaturesKey
Key of date-period.
Definition
FareFeaturesKey.hpp:18
Generated for StdAir by
1.17.0