#include <stdair/bom/DoWStruct.hpp>
Inheritance diagram for stdair::DoWStruct:Public Types | |
| typedef std::vector< bool > | BooleanList_T |
Public Member Functions | |
| bool | getDayOfWeek (const unsigned short i) const |
| bool | getStandardDayOfWeek (const unsigned short i) const |
| void | setDayOfWeek (const unsigned short, const bool) |
| const std::string | describe () const |
| const std::string | describeShort () const |
| DoWStruct | shift (const long &) const |
| DoWStruct | intersection (const DoWStruct &) const |
| const bool | isValid () const |
| DoWStruct (const std::string &iDowString) | |
| DoWStruct () | |
| DoWStruct (const DoWStruct &) | |
| ~DoWStruct () | |
| void | toStream (std::ostream &ioOut) const |
| virtual void | fromStream (std::istream &ioIn) |
Define a Day Of the Week (DoW) sequence.
For instance, 1..11.1 means that the period is active on Mon., Thu., Fri. and Sun.
Definition at line 18 of file DoWStruct.hpp.
| typedef std::vector<bool> stdair::DoWStruct::BooleanList_T |
Define the bit set representing the DoW.
Definition at line 21 of file DoWStruct.hpp.
| stdair::DoWStruct::DoWStruct | ( | const std::string & | iDowString | ) |
Constructor from a given bit set (e.g., "0000011" for the week-ends).
Definition at line 21 of file DoWStruct.cpp.
| stdair::DoWStruct::DoWStruct | ( | ) |
Default constructors.
Definition at line 14 of file DoWStruct.cpp.
| stdair::DoWStruct::DoWStruct | ( | const DoWStruct & | iDowStruct | ) |
Definition at line 34 of file DoWStruct.cpp.
|
inline |
Default destructor.
Definition at line 63 of file DoWStruct.hpp.
| bool stdair::DoWStruct::getDayOfWeek | ( | const unsigned short | i | ) | const |
Get the i-th day of the week (Monday being the first one).
Definition at line 66 of file DoWStruct.cpp.
Referenced by intersection(), and isValid().
| bool stdair::DoWStruct::getStandardDayOfWeek | ( | const unsigned short | i | ) | const |
Get the i-th day of the week (Sunday being the first one).
Definition at line 71 of file DoWStruct.cpp.
| void stdair::DoWStruct::setDayOfWeek | ( | const unsigned short | i, |
| const bool | iBool | ||
| ) |
Set the new value for the i-th day-of-week.
Definition at line 82 of file DoWStruct.cpp.
Referenced by intersection(), and shift().
|
virtual |
Display explicitly (e.g., "Mon.Tue.Wed.Thu.Fri.").
Implements stdair::StructAbstract.
Definition at line 52 of file DoWStruct.cpp.
References stdair::DOW_STR.
Referenced by stdair::PeriodStruct::describe().
| const std::string stdair::DoWStruct::describeShort | ( | ) | const |
Display as a bit set (e.g., "1111100").
Definition at line 40 of file DoWStruct.cpp.
Referenced by stdair::PeriodStruct::describeShort().
| DoWStruct stdair::DoWStruct::shift | ( | const long & | iNbOfDays | ) | const |
Build a new DoW struct by shifting the current DoW by a given number.
Definition at line 88 of file DoWStruct.cpp.
References stdair::DEFAULT_DOW_STRING, and setDayOfWeek().
Referenced by stdair::PeriodStruct::addDateOffset().
Build a new DoW struct by intersecting two DoW structs.
Definition at line 104 of file DoWStruct.cpp.
References stdair::DEFAULT_DOW_STRING, getDayOfWeek(), and setDayOfWeek().
Referenced by stdair::PeriodStruct::intersection().
| const bool stdair::DoWStruct::isValid | ( | ) | const |
Return if the DoW struct is valid (i.e., has at least one "true").
Definition at line 117 of file DoWStruct.cpp.
References getDayOfWeek().
Referenced by stdair::PeriodStruct::isValid().
|
inlineinherited |
Dump a Business Object into an output stream.
| ostream& | the output stream. |
Reimplemented in stdair::BookingRequestStruct, stdair::TravelSolutionStruct, stdair::VirtualClassStruct, stdair::ConfigHolderStruct, stdair::FareOptionStruct, stdair::OptimisationNotificationStruct, stdair::YieldRange, stdair::CancellationStruct, stdair::AirlineStruct, stdair::RMEventStruct, stdair::SnapshotStruct, stdair::FFDisutilityCurveHolderStruct, stdair::FRAT5CurveHolderStruct, and stdair::BreakPointStruct.
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>>().
1.8.1.1