StdAir Logo  1.00.0
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
stdair::Policy Class Reference

#include <stdair/bom/Policy.hpp>

+ Inheritance diagram for stdair::Policy:

List of all members.

Public Types

typedef PolicyKey Key_T

Public Member Functions

const Key_TgetKey () const
BomAbstract *const getParent () const
const HolderMap_TgetHolderMap () const
const BookingClassList_TgetBookingClassList () const
const NbOfBookings_TgetDemand () const
const StdDevValue_TgetStdDev () const
const Yield_TgetYield () 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 ()


class FacBom
class FacBomManager
class boost::serialization::access

Detailed Description

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.

Member Typedef Documentation

Definition allowing to retrieve the associated BOM key type.

Definition at line 40 of file Policy.hpp.

Constructor & Destructor Documentation

stdair::Policy::Policy ( const Key_T iKey)

Main constructor.

Definition at line 31 of file Policy.cpp.

stdair::Policy::~Policy ( )


Definition at line 35 of file Policy.cpp.

Member Function Documentation

const Key_T& stdair::Policy::getKey ( ) const

Get the policy key.

Definition at line 45 of file Policy.hpp.

BomAbstract* const stdair::Policy::getParent ( ) const

Get the parent object.

Definition at line 50 of file Policy.hpp.

const HolderMap_T& stdair::Policy::getHolderMap ( ) const

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

Getter for the demand.

Definition at line 65 of file Policy.hpp.

const StdDevValue_T& stdair::Policy::getStdDev ( ) const

Getter for the standard deviation demand.

Definition at line 70 of file Policy.hpp.

const Yield_T& stdair::Policy::getYield ( ) const

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)

Setter for the unconstraining demand.

Definition at line 85 of file Policy.hpp.

void stdair::Policy::setStdDev ( const StdDevValue_T iStdDev)

Setter for standard deviation demand.

Definition at line 90 of file Policy.hpp.

void stdair::Policy::setYield ( const Yield_T iYield)

Setter for the yield.

Definition at line 95 of file Policy.hpp.

void stdair::Policy::resetDemandForecast ( )

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

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)

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

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

Get a string describing the key.

Definition at line 136 of file Policy.hpp.

References stdair::PolicyKey::toString().

Referenced by toString().

template<class Archive >
void stdair::Policy::serialize ( Archive &  ar,
const unsigned int  iFileVersion 


Friends And Related Function Documentation

friend class FacBom

Definition at line 31 of file Policy.hpp.

friend class FacBomManager

Definition at line 32 of file Policy.hpp.

friend class boost::serialization::access

Definition at line 33 of file Policy.hpp.

The documentation for this class was generated from the following files: