#include <stdair/bom/PeriodStruct.hpp>
Public Member Functions | |
const DatePeriod_T & | getDateRange () const |
const DoWStruct & | getDoW () 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) |
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.
stdair::PeriodStruct::PeriodStruct | ( | const DatePeriod_T & | iDateRange, |
const DoWStruct & | iDoW | ||
) |
Constructor.
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.
|
inline |
Default destructor.
Definition at line 64 of file PeriodStruct.hpp.
|
inline |
Retrieve the attributes.
Definition at line 23 of file PeriodStruct.hpp.
Referenced by addDateOffset().
|
inline |
Definition at line 26 of file PeriodStruct.hpp.
Referenced by addDateOffset().
|
inline |
Set the new value for the attributes.
Definition at line 33 of file PeriodStruct.hpp.
|
inline |
Definition at line 36 of file PeriodStruct.hpp.
|
virtual |
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().
|
inlineinherited |
Dump a Business Object into an output stream.
ostream& | the output stream. |
Definition at line 29 of file StructAbstract.hpp.
References stdair::StructAbstract::describe().
|
inlinevirtualinherited |
Read a Business Object from an input stream.
istream& | the input stream. |
Reimplemented in stdair::BookingRequestStruct, stdair::EventStruct, stdair::TravelSolutionStruct, stdair::VirtualClassStruct, stdair::ConfigHolderStruct, stdair::FareOptionStruct, stdair::OptimisationNotificationStruct, stdair::ProgressStatusSet, stdair::YieldRange, stdair::CancellationStruct, stdair::AirlineStruct, stdair::RMEventStruct, stdair::SnapshotStruct, stdair::FFDisutilityCurveHolderStruct, stdair::FRAT5CurveHolderStruct, and stdair::BreakPointStruct.
Definition at line 38 of file StructAbstract.hpp.
Referenced by operator>>().