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 ()

Friends

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)
protected

Main constructor.

Definition at line 31 of file Policy.cpp.

stdair::Policy::~Policy ( )
protectedvirtual

Destructor.

Definition at line 35 of file Policy.cpp.


Member Function Documentation

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
inlinevirtual

Dump a Business Object into an output stream.

Parameters:
ostream&the output stream.

Implements stdair::BomAbstract.

Definition at line 116 of file Policy.hpp.

References toString().

void stdair::Policy::fromStream ( std::istream &  ioIn)
inlinevirtual

Read a Business Object from an input stream.

Parameters:
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().

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

Serialisation.


Friends And Related Function Documentation

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.


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