$treeview $search $mathjax
#include <stdair/bom/Policy.hpp>
Public Types | |
typedef PolicyKey | Key_T |
Public Member Functions | |
const Key_T & | getKey () const |
BomAbstract *const | getParent () const |
const HolderMap_T & | getHolderMap () const |
const BookingClassList_T & | getBookingClassList () const |
const NbOfBookings_T & | getDemand () const |
const StdDevValue_T & | getStdDev () const |
const Yield_T & | getYield () const |
const Revenue_T | getTotalRevenue () const |
void | setDemand (const NbOfBookings_T &iDemand) |
void | setStdDev (const StdDevValue_T &iStdDev) |
void | setYield (const Yield_T &iYield) |
void | resetDemandForecast () |
void | addYieldDemand (const Yield_T &, const NbOfBookings_T &) |
void | toStream (std::ostream &ioOut) const |
void | fromStream (std::istream &ioIn) |
std::string | toString () const |
const std::string | describeKey () const |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int iFileVersion) |
Protected Member Functions | |
Policy (const Key_T &) | |
virtual | ~Policy () |
Friends | |
class | FacBom |
class | FacBomManager |
class | boost::serialization::access |
Structure holding the elements of a policy. A policy is a set of booking classes, each booking class belongs to a different Fare Family.
Definition at line 30 of file Policy.hpp.
typedef PolicyKey stdair::Policy::Key_T |
Definition allowing to retrieve the associated BOM key type.
Definition at line 40 of file Policy.hpp.
stdair::Policy::Policy | ( | const Key_T & | iKey | ) | [protected] |
Main constructor.
Definition at line 31 of file Policy.cpp.
stdair::Policy::~Policy | ( | ) | [protected, virtual] |
Destructor.
Definition at line 35 of file Policy.cpp.
const Key_T& stdair::Policy::getKey | ( | ) | const [inline] |
Get the policy key.
Definition at line 45 of file Policy.hpp.
BomAbstract* const stdair::Policy::getParent | ( | ) | const [inline] |
Get the parent object.
Definition at line 50 of file Policy.hpp.
const HolderMap_T& stdair::Policy::getHolderMap | ( | ) | const [inline] |
Get the map of children holders.
Definition at line 57 of file Policy.hpp.
const BookingClassList_T & stdair::Policy::getBookingClassList | ( | ) | const |
Getter for the booking classes.
Definition at line 52 of file Policy.cpp.
const NbOfBookings_T& stdair::Policy::getDemand | ( | ) | const [inline] |
Getter for the demand.
Definition at line 65 of file Policy.hpp.
const StdDevValue_T& stdair::Policy::getStdDev | ( | ) | const [inline] |
Getter for the standard deviation demand.
Definition at line 70 of file Policy.hpp.
const Yield_T& stdair::Policy::getYield | ( | ) | const [inline] |
Getter for the yield.
Definition at line 75 of file Policy.hpp.
const Revenue_T stdair::Policy::getTotalRevenue | ( | ) | const |
Get the total revenue of the policy.
Definition at line 57 of file Policy.cpp.
void stdair::Policy::setDemand | ( | const NbOfBookings_T & | iDemand | ) | [inline] |
Setter for the unconstraining demand.
Definition at line 85 of file Policy.hpp.
void stdair::Policy::setStdDev | ( | const StdDevValue_T & | iStdDev | ) | [inline] |
Setter for standard deviation demand.
Definition at line 90 of file Policy.hpp.
void stdair::Policy::setYield | ( | const Yield_T & | iYield | ) | [inline] |
Setter for the yield.
Definition at line 95 of file Policy.hpp.
void stdair::Policy::resetDemandForecast | ( | ) | [inline] |
Reset demand forecast.
Definition at line 100 of file Policy.hpp.
void stdair::Policy::addYieldDemand | ( | const Yield_T & | iYield, | |
const NbOfBookings_T & | iDemand | |||
) |
Add the new pair (yield, demand) to the map.
Definition at line 70 of file Policy.cpp.
void stdair::Policy::toStream | ( | std::ostream & | ioOut | ) | const [inline, virtual] |
Dump a Business Object into an output stream.
ostream& | the output stream. |
Implements stdair::BomAbstract.
Definition at line 116 of file Policy.hpp.
References toString().
void stdair::Policy::fromStream | ( | std::istream & | ioIn | ) | [inline, virtual] |
Read a Business Object from an input stream.
istream& | the input stream. |
Implements stdair::BomAbstract.
Definition at line 125 of file Policy.hpp.
std::string stdair::Policy::toString | ( | ) | const [virtual] |
Get the serialised version of the Business Object.
Implements stdair::BomAbstract.
Definition at line 39 of file Policy.cpp.
References describeKey().
Referenced by stdair::SegmentCabin::describeConvexHull(), and toStream().
const std::string stdair::Policy::describeKey | ( | ) | const [inline] |
Get a string describing the key.
Definition at line 136 of file Policy.hpp.
References stdair::PolicyKey::toString().
Referenced by toString().
void stdair::Policy::serialize | ( | Archive & | ar, | |
const unsigned int | iFileVersion | |||
) | [inline] |
Serialisation.
friend class FacBom [friend] |
Definition at line 31 of file Policy.hpp.
friend class FacBomManager [friend] |
Definition at line 32 of file Policy.hpp.
friend class boost::serialization::access [friend] |
Definition at line 33 of file Policy.hpp.