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

#include <stdair/bom/PeriodStruct.hpp>

+ Inheritance diagram for stdair::PeriodStruct:

List of all members.

Public Member Functions

const DatePeriod_TgetDateRange () const
const DoWStructgetDoW () const
void setDateRange (const DatePeriod_T &iDateRange)
void setDoW (const DoWStruct &iDoW)
const std::string describe () const
const std::string describeShort () const
PeriodStruct addDateOffset (const DateOffset_T &) const
PeriodStruct intersection (const PeriodStruct &) const
const bool isValid () const
 PeriodStruct (const DatePeriod_T &, const DoWStruct &)
 PeriodStruct ()
 PeriodStruct (const PeriodStruct &)
 ~PeriodStruct ()
void toStream (std::ostream &ioOut) const
virtual void fromStream (std::istream &ioIn)

Detailed Description

Define a departure period
A period is defined by a date range and a day-of-week struct.

Definition at line 19 of file PeriodStruct.hpp.

Constructor & Destructor Documentation

stdair::PeriodStruct::PeriodStruct ( const DatePeriod_T iDateRange,
const DoWStruct iDoW 


Definition at line 19 of file PeriodStruct.cpp.

stdair::PeriodStruct::PeriodStruct ( )

Default constructors.

Definition at line 14 of file PeriodStruct.cpp.

Referenced by addDateOffset(), and intersection().

stdair::PeriodStruct::PeriodStruct ( const PeriodStruct iPeriodStruct)

Definition at line 25 of file PeriodStruct.cpp.

stdair::PeriodStruct::~PeriodStruct ( )

Default destructor.

Definition at line 64 of file PeriodStruct.hpp.

Member Function Documentation

const DatePeriod_T& stdair::PeriodStruct::getDateRange ( ) const

Retrieve the attributes.

Definition at line 23 of file PeriodStruct.hpp.

Referenced by addDateOffset().

const DoWStruct& stdair::PeriodStruct::getDoW ( ) const

Definition at line 26 of file PeriodStruct.hpp.

Referenced by addDateOffset().

void stdair::PeriodStruct::setDateRange ( const DatePeriod_T iDateRange)

Set the new value for the attributes.

Definition at line 33 of file PeriodStruct.hpp.

void stdair::PeriodStruct::setDoW ( const DoWStruct iDoW)

Definition at line 36 of file PeriodStruct.hpp.

const std::string stdair::PeriodStruct::describe ( ) const

Display explicitly (e.g., "Mon.Tue.Wed.Thu.Fri.").

Implements stdair::StructAbstract.

Definition at line 38 of file PeriodStruct.cpp.

References stdair::DoWStruct::describe().

const std::string stdair::PeriodStruct::describeShort ( ) const

Display as a bit set (e.g., "1111100").

Definition at line 31 of file PeriodStruct.cpp.

References stdair::DoWStruct::describeShort().

Referenced by stdair::FlightPeriodKey::toString().

PeriodStruct stdair::PeriodStruct::addDateOffset ( const DateOffset_T iDateOffset) const

Build a period struct from this period struct by adding a date offset.

Definition at line 46 of file PeriodStruct.cpp.

References getDateRange(), getDoW(), PeriodStruct(), and stdair::DoWStruct::shift().

PeriodStruct stdair::PeriodStruct::intersection ( const PeriodStruct iPeriodStruct) const

Build a new period struct which is the intersection of two period structs.

Definition at line 63 of file PeriodStruct.cpp.

References stdair::DoWStruct::intersection(), and PeriodStruct().

const bool stdair::PeriodStruct::isValid ( ) const

Return if the period is valid (i.e., valid date range and valid DoW).

Definition at line 72 of file PeriodStruct.cpp.

References stdair::DoWStruct::isValid().

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