StdAir Logo  1.00.16
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
stdair::SegmentCabin Class Reference

Class representing the actual attributes for an airline segment-cabin. More...

#include <stdair/bom/SegmentCabin.hpp>

+ Inheritance diagram for stdair::SegmentCabin:

Public Types

typedef SegmentCabinKey Key_T
 

Public Member Functions

const Key_TgetKey () const
 
BomAbstract *const getParent () const
 
const HolderMap_TgetHolderMap () const
 
const CabinCode_TgetCabinCode () const
 
const MapKey_T getFullerKey () const
 
const SegmentSnapshotTablegetSegmentSnapshotTable () const
 
const CabinCapacity_TgetCapacity () const
 
const BlockSpace_TgetBlockSpace () const
 
const BlockSpace_TgetMIN () const
 
const UPR_TgetUPR () const
 
const NbOfBookings_TgetBookingCounter () const
 
const CommittedSpace_TgetCommittedSpace () const
 
const Availability_TgetAvailabilityPool () const
 
const BidPrice_TgetCurrentBidPrice () const
 
const BidPriceVector_TgetBidPriceVector () const
 
const bool getFareFamilyStatus () const
 
const PolicyList_TgetConvexHull () const
 
void setSegmentSnapshotTable (SegmentSnapshotTable &ioTable)
 
void setCapacity (const CabinCapacity_T &iCapacity)
 
void setBlockSpace (const BlockSpace_T &iBlockSpace)
 
void setMIN (const BlockSpace_T &iMIN)
 
void setUPR (const UPR_T &iUPR)
 
void setBookingCounter (const NbOfBookings_T &iBookingCounter)
 
void setCommittedSpace (const CommittedSpace_T &iCommittedSpace)
 
void setAvailabilityPool (const Availability_T &iAvailabilityPool)
 
void setBidPriceVector (const BidPriceVector_T &iBPV)
 
void activateFareFamily ()
 
void updateFromReservation (const NbOfBookings_T &)
 
void resetConvexHull ()
 
void addPolicy (Policy &)
 
void toStream (std::ostream &ioOut) const
 
void fromStream (std::istream &ioIn)
 
std::string toString () const
 
const std::string describeKey () const
 
const std::string describeConvexHull () const
 
template<class Archive>
void serialize (Archive &ar, const unsigned int iFileVersion)
 

Protected Member Functions

 SegmentCabin (const Key_T &)
 
virtual ~SegmentCabin ()
 

Protected Attributes

Key_T _key
 
BomAbstract_parent
 
HolderMap_T _holderMap
 
SegmentSnapshotTable_segmentSnapshotTable
 
CabinCapacity_T _capacity
 
BlockSpace_T _blockSpace
 
BlockSpace_T _min
 
UPR_T _upr
 
NbOfBookings_T _bookingCounter
 
CommittedSpace_T _committedSpace
 
Availability_T _availabilityPool
 
BidPriceVector_T _bidPriceVector
 
BidPrice_T _currentBidPrice
 
bool _fareFamilyActivation
 
PolicyList_T _convexHull
 

Friends

template<typename BOM>
class FacBom
 
template<typename BOM>
class FacCloneBom
 
class FacBomManager
 
class boost::serialization::access
 
template<class T>
struct boost::archive::detail::heap_allocation
 

Detailed Description

Class representing the actual attributes for an airline segment-cabin.

Definition at line 39 of file SegmentCabin.hpp.

Member Typedef Documentation

◆ Key_T

Definition allowing to retrieve the associated BOM key type.

Definition at line 51 of file SegmentCabin.hpp.

Constructor & Destructor Documentation

◆ SegmentCabin()

◆ ~SegmentCabin()

stdair::SegmentCabin::~SegmentCabin ( )
protectedvirtual

Destructor.

Definition at line 52 of file SegmentCabin.cpp.

Member Function Documentation

◆ getKey()

const Key_T & stdair::SegmentCabin::getKey ( ) const
inline

Get the segment-cabin key (cabin code).

Definition at line 59 of file SegmentCabin.hpp.

References _key.

◆ getParent()

BomAbstract *const stdair::SegmentCabin::getParent ( ) const
inline

Get the parent object.

Definition at line 66 of file SegmentCabin.hpp.

References _parent, and stdair::BomAbstract::BomAbstract().

◆ getHolderMap()

const HolderMap_T & stdair::SegmentCabin::getHolderMap ( ) const
inline

Get the map of children holders.

Definition at line 73 of file SegmentCabin.hpp.

References _holderMap.

◆ getCabinCode()

const CabinCode_T & stdair::SegmentCabin::getCabinCode ( ) const
inline

Get the cabin code (primary key).

Definition at line 80 of file SegmentCabin.hpp.

References _key.

Referenced by getFullerKey().

◆ getFullerKey()

const MapKey_T stdair::SegmentCabin::getFullerKey ( ) const

Get the (segment-date, segment-cabin) key (board point, off point and cabin code).

Note
That method assumes that the parent object derives from the SegmentDate class, as it needs to have access to the describeKey() method.

Definition at line 56 of file SegmentCabin.cpp.

References stdair::DEFAULT_KEY_FLD_DELIMITER, stdair::SegmentDate::describeKey(), getCabinCode(), and stdair::BomManager::getParent().

◆ getSegmentSnapshotTable()

const SegmentSnapshotTable & stdair::SegmentCabin::getSegmentSnapshotTable ( ) const
inline

Get the guilltine block.

Definition at line 95 of file SegmentCabin.hpp.

References _segmentSnapshotTable.

◆ getCapacity()

const CabinCapacity_T & stdair::SegmentCabin::getCapacity ( ) const
inline

Get the cabin capacity.

Definition at line 101 of file SegmentCabin.hpp.

References _capacity.

◆ getBlockSpace()

const BlockSpace_T & stdair::SegmentCabin::getBlockSpace ( ) const
inline

Get the blocked number of bookings.

Definition at line 106 of file SegmentCabin.hpp.

References _blockSpace.

◆ getMIN()

const BlockSpace_T & stdair::SegmentCabin::getMIN ( ) const
inline

Get the blocked number of bookings.

Definition at line 111 of file SegmentCabin.hpp.

References _min.

◆ getUPR()

const UPR_T & stdair::SegmentCabin::getUPR ( ) const
inline

Unsold Protection (UPR).

Definition at line 116 of file SegmentCabin.hpp.

References _upr.

◆ getBookingCounter()

const NbOfBookings_T & stdair::SegmentCabin::getBookingCounter ( ) const
inline

Get the booking counter.

Definition at line 121 of file SegmentCabin.hpp.

References _bookingCounter.

◆ getCommittedSpace()

const CommittedSpace_T & stdair::SegmentCabin::getCommittedSpace ( ) const
inline

Get the committed Space value.

Definition at line 126 of file SegmentCabin.hpp.

References _committedSpace.

◆ getAvailabilityPool()

const Availability_T & stdair::SegmentCabin::getAvailabilityPool ( ) const
inline

Get the availability pool value.

Definition at line 131 of file SegmentCabin.hpp.

References _availabilityPool.

◆ getCurrentBidPrice()

const BidPrice_T & stdair::SegmentCabin::getCurrentBidPrice ( ) const
inline

Retrieve the current Bid-Price.

Definition at line 136 of file SegmentCabin.hpp.

References _currentBidPrice.

◆ getBidPriceVector()

const BidPriceVector_T & stdair::SegmentCabin::getBidPriceVector ( ) const
inline

Retrieve the Bid-Price Vector.

Definition at line 141 of file SegmentCabin.hpp.

References _bidPriceVector.

◆ getFareFamilyStatus()

const bool stdair::SegmentCabin::getFareFamilyStatus ( ) const
inline

Retrieve the status of fare family.

Definition at line 146 of file SegmentCabin.hpp.

References _fareFamilyActivation.

◆ getConvexHull()

const PolicyList_T & stdair::SegmentCabin::getConvexHull ( ) const
inline

Retrieve the convex hull.

Definition at line 151 of file SegmentCabin.hpp.

References _convexHull.

◆ setSegmentSnapshotTable()

void stdair::SegmentCabin::setSegmentSnapshotTable ( SegmentSnapshotTable & ioTable)
inline

Set the snapshot table.

Definition at line 158 of file SegmentCabin.hpp.

References _segmentSnapshotTable.

◆ setCapacity()

void stdair::SegmentCabin::setCapacity ( const CabinCapacity_T & iCapacity)
inline

Set the cabin capacity.

Definition at line 163 of file SegmentCabin.hpp.

References _capacity.

◆ setBlockSpace()

void stdair::SegmentCabin::setBlockSpace ( const BlockSpace_T & iBlockSpace)
inline

Set the blocked number of seats.

Definition at line 168 of file SegmentCabin.hpp.

References _blockSpace.

◆ setMIN()

void stdair::SegmentCabin::setMIN ( const BlockSpace_T & iMIN)
inline

Set the blocked number of seats.

Definition at line 173 of file SegmentCabin.hpp.

References _min.

◆ setUPR()

void stdair::SegmentCabin::setUPR ( const UPR_T & iUPR)
inline

Set the Unsold Protection (UPR).

Definition at line 178 of file SegmentCabin.hpp.

References _upr.

◆ setBookingCounter()

void stdair::SegmentCabin::setBookingCounter ( const NbOfBookings_T & iBookingCounter)
inline

Set the total number of bookings.

Definition at line 183 of file SegmentCabin.hpp.

References _bookingCounter.

◆ setCommittedSpace()

void stdair::SegmentCabin::setCommittedSpace ( const CommittedSpace_T & iCommittedSpace)
inline

Set the value of committed space.

Definition at line 188 of file SegmentCabin.hpp.

References _committedSpace.

◆ setAvailabilityPool()

void stdair::SegmentCabin::setAvailabilityPool ( const Availability_T & iAvailabilityPool)
inline

Set the value of availability pool.

Definition at line 193 of file SegmentCabin.hpp.

References _availabilityPool.

◆ setBidPriceVector()

void stdair::SegmentCabin::setBidPriceVector ( const BidPriceVector_T & iBPV)
inline

Set the Bid-Price Vector.

Definition at line 198 of file SegmentCabin.hpp.

References _bidPriceVector.

◆ activateFareFamily()

void stdair::SegmentCabin::activateFareFamily ( )
inline

Activate fare family.

Definition at line 203 of file SegmentCabin.hpp.

References _fareFamilyActivation.

◆ updateFromReservation()

void stdair::SegmentCabin::updateFromReservation ( const NbOfBookings_T & iNbOfBookings)

Register a sale.

Definition at line 84 of file SegmentCabin.cpp.

References _committedSpace.

◆ resetConvexHull()

void stdair::SegmentCabin::resetConvexHull ( )
inline

Reset the convex hull.

Definition at line 213 of file SegmentCabin.hpp.

References _convexHull.

◆ addPolicy()

void stdair::SegmentCabin::addPolicy ( Policy & ioPolicy)

Add a policy to the convex hull. Note: we do not use the FacBomManager here because the convex hull is not a list of children but a temporary list of policies.

Definition at line 90 of file SegmentCabin.cpp.

References _convexHull.

◆ toStream()

void stdair::SegmentCabin::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 228 of file SegmentCabin.hpp.

References toString().

◆ fromStream()

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

Read a Business Object from an input stream.

Parameters
istream&the input stream.

Implements stdair::BomAbstract.

Definition at line 237 of file SegmentCabin.hpp.

◆ toString()

std::string stdair::SegmentCabin::toString ( ) const
virtual

Get the serialised version of the Business Object.

Implements stdair::BomAbstract.

Definition at line 65 of file SegmentCabin.cpp.

References describeKey().

Referenced by toStream().

◆ describeKey()

const std::string stdair::SegmentCabin::describeKey ( ) const
inline

Get a string describing the key.

Definition at line 248 of file SegmentCabin.hpp.

References _key.

Referenced by toString().

◆ describeConvexHull()

const std::string stdair::SegmentCabin::describeConvexHull ( ) const

Get a string describing the convex hull.

Definition at line 72 of file SegmentCabin.cpp.

References _convexHull, and stdair::Policy::toString().

◆ serialize()

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

Friends And Related Symbol Documentation

◆ FacBom

template<typename BOM>
friend class FacBom
friend

Definition at line 40 of file SegmentCabin.hpp.

References FacBom.

Referenced by FacBom.

◆ FacCloneBom

template<typename BOM>
friend class FacCloneBom
friend

Definition at line 41 of file SegmentCabin.hpp.

References FacCloneBom.

Referenced by FacCloneBom.

◆ FacBomManager

friend class FacBomManager
friend

Definition at line 42 of file SegmentCabin.hpp.

References FacBomManager.

Referenced by FacBomManager.

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 43 of file SegmentCabin.hpp.

References boost::serialization::access.

Referenced by boost::serialization::access.

◆ boost::archive::detail::heap_allocation

template<class T>
friend struct boost::archive::detail::heap_allocation
friend

Definition at line 44 of file SegmentCabin.hpp.

Member Data Documentation

◆ _key

Key_T stdair::SegmentCabin::_key
protected

Primary key (cabin code).

Definition at line 307 of file SegmentCabin.hpp.

Referenced by describeKey(), getCabinCode(), getKey(), SegmentCabin(), and serialize().

◆ _parent

BomAbstract* stdair::SegmentCabin::_parent
protected

Pointer on the parent class (SegmentDate).

Definition at line 312 of file SegmentCabin.hpp.

Referenced by getParent(), and SegmentCabin().

◆ _holderMap

HolderMap_T stdair::SegmentCabin::_holderMap
protected

Map holding the children (FareFamily or BookingClass objects).

Definition at line 317 of file SegmentCabin.hpp.

Referenced by getHolderMap().

◆ _segmentSnapshotTable

SegmentSnapshotTable* stdair::SegmentCabin::_segmentSnapshotTable
protected

The data table used for Revenue Management activities.

Definition at line 322 of file SegmentCabin.hpp.

Referenced by getSegmentSnapshotTable(), and setSegmentSnapshotTable().

◆ _capacity

CabinCapacity_T stdair::SegmentCabin::_capacity
protected

Capacity of the cabin.

Definition at line 325 of file SegmentCabin.hpp.

Referenced by getCapacity(), SegmentCabin(), and setCapacity().

◆ _blockSpace

BlockSpace_T stdair::SegmentCabin::_blockSpace
protected

Blocked capacity.

Definition at line 328 of file SegmentCabin.hpp.

Referenced by getBlockSpace(), SegmentCabin(), and setBlockSpace().

◆ _min

BlockSpace_T stdair::SegmentCabin::_min
protected

Blocked number of seats.

Definition at line 331 of file SegmentCabin.hpp.

Referenced by getMIN(), and setMIN().

◆ _upr

UPR_T stdair::SegmentCabin::_upr
protected

Unsold Protection (UPR).

Definition at line 334 of file SegmentCabin.hpp.

Referenced by getUPR(), and setUPR().

◆ _bookingCounter

NbOfBookings_T stdair::SegmentCabin::_bookingCounter
protected

Aggregated number of bookings.

Definition at line 337 of file SegmentCabin.hpp.

Referenced by getBookingCounter(), SegmentCabin(), and setBookingCounter().

◆ _committedSpace

CommittedSpace_T stdair::SegmentCabin::_committedSpace
protected

Aggreated committed space.

Definition at line 340 of file SegmentCabin.hpp.

Referenced by getCommittedSpace(), SegmentCabin(), setCommittedSpace(), and updateFromReservation().

◆ _availabilityPool

Availability_T stdair::SegmentCabin::_availabilityPool
protected

Aggregated availability pool.

Definition at line 343 of file SegmentCabin.hpp.

Referenced by getAvailabilityPool(), SegmentCabin(), and setAvailabilityPool().

◆ _bidPriceVector

BidPriceVector_T stdair::SegmentCabin::_bidPriceVector
protected

Bid-Price Vector (BPV).

Definition at line 346 of file SegmentCabin.hpp.

Referenced by getBidPriceVector(), SegmentCabin(), and setBidPriceVector().

◆ _currentBidPrice

BidPrice_T stdair::SegmentCabin::_currentBidPrice
protected

Current Bid-Price (BP).

Definition at line 349 of file SegmentCabin.hpp.

Referenced by getCurrentBidPrice(), and SegmentCabin().

◆ _fareFamilyActivation

bool stdair::SegmentCabin::_fareFamilyActivation
protected

Indicate if fare family is in use.

Definition at line 352 of file SegmentCabin.hpp.

Referenced by activateFareFamily(), getFareFamilyStatus(), and SegmentCabin().

◆ _convexHull

PolicyList_T stdair::SegmentCabin::_convexHull
protected

The convex hull of MRT.

Definition at line 355 of file SegmentCabin.hpp.

Referenced by addPolicy(), describeConvexHull(), getConvexHull(), and resetConvexHull().


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