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

Class representing the actual attributes for a fare time-period. More...

#include <stdair/bom/TimePeriod.hpp>

+ Inheritance diagram for stdair::TimePeriod:

Public Types

typedef TimePeriodKey Key_T

Public Member Functions

void toStream (std::ostream &ioOut) const
void fromStream (std::istream &ioIn)
std::string toString () const
const std::string describeKey () const
const Key_TgetKey () const
BomAbstract *const getParent () const
const HolderMap_TgetHolderMap () const
const Time_TgetTimeRangeStart () const
const Time_TgetTimeRangeEnd () const
bool isDepartureTimeValid (const Time_T &) const

Protected Member Functions

 TimePeriod (const Key_T &)
virtual ~TimePeriod ()

Protected Attributes

Key_T _key
BomAbstract_parent
HolderMap_T _holderMap

Friends

class FacBom
class FacBomManager

Detailed Description

Class representing the actual attributes for a fare time-period.

Definition at line 18 of file TimePeriod.hpp.

Member Typedef Documentation

Definition allowing to retrieve the associated BOM key type.

Definition at line 27 of file TimePeriod.hpp.

Constructor & Destructor Documentation

stdair::TimePeriod::TimePeriod ( const Key_T iKey)
protected

Main constructor.

Definition at line 28 of file TimePeriod.cpp.

stdair::TimePeriod::~TimePeriod ( )
protectedvirtual

Destructor.

Definition at line 33 of file TimePeriod.cpp.

Member Function Documentation

void stdair::TimePeriod::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 37 of file TimePeriod.hpp.

References toString().

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

Read a Business Object from an input stream.

Parameters
istream&the input stream.

Implements stdair::BomAbstract.

Definition at line 46 of file TimePeriod.hpp.

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

Get the serialised version of the Business Object.

Implements stdair::BomAbstract.

Definition at line 37 of file TimePeriod.cpp.

References describeKey().

Referenced by toStream().

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

Get a string describing the key.

Definition at line 57 of file TimePeriod.hpp.

References _key, and stdair::TimePeriodKey::toString().

Referenced by toString().

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

Get the primary key (time range start, time range end).

Definition at line 66 of file TimePeriod.hpp.

References _key.

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

Get a reference on the parent object instance.

Definition at line 73 of file TimePeriod.hpp.

References _parent.

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

Get a reference on the children holder.

Definition at line 80 of file TimePeriod.hpp.

References _holderMap.

const Time_T& stdair::TimePeriod::getTimeRangeStart ( ) const
inline

Get the time range start.

Definition at line 87 of file TimePeriod.hpp.

References _key, and stdair::TimePeriodKey::getTimeRangeStart().

Referenced by isDepartureTimeValid().

const Time_T& stdair::TimePeriod::getTimeRangeEnd ( ) const
inline

Get the time range end

Definition at line 94 of file TimePeriod.hpp.

References _key, and stdair::TimePeriodKey::getTimeRangeEnd().

Referenced by isDepartureTimeValid().

bool stdair::TimePeriod::isDepartureTimeValid ( const Time_T iFlightTime) const

Check if the given departure time is included in the departure period of the segment path.

Definition at line 45 of file TimePeriod.cpp.

References getTimeRangeEnd(), getTimeRangeStart(), and STDAIR_LOG_DEBUG.

Friends And Related Function Documentation

friend class FacBom
friend

Definition at line 19 of file TimePeriod.hpp.

friend class FacBomManager
friend

Definition at line 20 of file TimePeriod.hpp.

Member Data Documentation

Key_T stdair::TimePeriod::_key
protected

Primary key (flight number and departure date).

Definition at line 132 of file TimePeriod.hpp.

Referenced by describeKey(), getKey(), getTimeRangeEnd(), and getTimeRangeStart().

BomAbstract* stdair::TimePeriod::_parent
protected

Pointer on the parent class (Inventory).

Definition at line 137 of file TimePeriod.hpp.

Referenced by getParent().

HolderMap_T stdair::TimePeriod::_holderMap
protected

Map holding the children.

Definition at line 142 of file TimePeriod.hpp.

Referenced by getHolderMap().


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