#include <stdair/basic/ProgressStatus.hpp>
Public Member Functions | |
const Count_T & | count () const |
const Count_T & | getCurrentNb () const |
const Count_T & | getExpectedNb () const |
const Count_T & | getActualNb () const |
const ProgressPercentage_T | progress () const |
void | setCurrentNb (const Count_T &iCurrentNb) |
void | setExpectedNb (const Count_T &iExpectedNb) |
void | setActualNb (const Count_T &iActualNb) |
void | reset () |
Count_T | operator+= (Count_T iIncrement) |
Count_T | operator++ () |
const std::string | describe () const |
ProgressStatus (const Count_T &iCurrentNb, const Count_T &iExpectedNb, const Count_T &iActualNb) | |
ProgressStatus (const Count_T &iExpectedNb, const Count_T &iActualNb) | |
ProgressStatus (const Count_T &iActualNb) | |
ProgressStatus () | |
ProgressStatus (const ProgressStatus &) | |
void | toStream (std::ostream &ioOut) const |
virtual void | fromStream (std::istream &ioIn) |
Structure holding the details of a progress status.
The progress status is given by the ratio between the "current" and the "expected" (or "actual") numbers. For instance, when the expected/actual number is 1000 and the current number is 200, then the progress status is 20% (= 200 / 1000).
Definition at line 25 of file ProgressStatus.hpp.
stdair::ProgressStatus::ProgressStatus | ( | const Count_T & | iCurrentNb, |
const Count_T & | iExpectedNb, | ||
const Count_T & | iActualNb | ||
) |
Constructor.
const | Count_T& The current number. |
const | Count_T& The expected number. |
const | Count_T& The actual number. |
Definition at line 15 of file ProgressStatus.cpp.
Constructor.
As no current number is given, it is set to 0.
const | Count_T& The expected number. |
const | Count_T& The actual number. |
Definition at line 23 of file ProgressStatus.cpp.
stdair::ProgressStatus::ProgressStatus | ( | const Count_T & | iActualNb | ) |
Constructor.
As no expected number is given, it is assumed to be equal to the actual one. The current number is set to 0.
const | Count_T& The actual number. |
Definition at line 30 of file ProgressStatus.cpp.
stdair::ProgressStatus::ProgressStatus | ( | ) |
stdair::ProgressStatus::ProgressStatus | ( | const ProgressStatus & | iProgressStatus | ) |
Copy Constructor.
Definition at line 43 of file ProgressStatus.cpp.
const Count_T& stdair::ProgressStatus::count | ( | ) | const [inline] |
Get the current number.
Definition at line 29 of file ProgressStatus.hpp.
const Count_T& stdair::ProgressStatus::getCurrentNb | ( | ) | const [inline] |
Get the current number.
Definition at line 34 of file ProgressStatus.hpp.
Referenced by stdair::ProgressStatusSet::describe(), stdair::EventQueue::getCurrentNbOfEvents(), stdair::EventQueue::toString(), and stdair::EventQueue::updateStatus().
const Count_T& stdair::ProgressStatus::getExpectedNb | ( | ) | const [inline] |
Get the expected number.
Definition at line 39 of file ProgressStatus.hpp.
Referenced by stdair::EventQueue::addStatus(), stdair::ProgressStatusSet::describe(), stdair::EventQueue::getExpectedTotalNbOfEvents(), stdair::EventQueue::toString(), and stdair::EventQueue::updateStatus().
const Count_T& stdair::ProgressStatus::getActualNb | ( | ) | const [inline] |
Get the actual number.
Definition at line 44 of file ProgressStatus.hpp.
Referenced by stdair::EventQueue::addStatus(), stdair::ProgressStatusSet::describe(), stdair::EventQueue::getActualTotalNbOfEvents(), stdair::EventQueue::toString(), and stdair::EventQueue::updateStatus().
const ProgressPercentage_T stdair::ProgressStatus::progress | ( | ) | const [inline] |
Get the progress as a percentage.
Definition at line 49 of file ProgressStatus.hpp.
Referenced by stdair::EventQueue::calculateProgress().
void stdair::ProgressStatus::setCurrentNb | ( | const Count_T & | iCurrentNb | ) | [inline] |
Set the current number.
Definition at line 60 of file ProgressStatus.hpp.
Referenced by stdair::EventQueue::setCurrentNbOfEvents(), stdair::EventQueue::setStatus(), and stdair::EventQueue::updateStatus().
void stdair::ProgressStatus::setExpectedNb | ( | const Count_T & | iExpectedNb | ) | [inline] |
Set the expected number.
Definition at line 65 of file ProgressStatus.hpp.
Referenced by stdair::EventQueue::addStatus(), stdair::EventQueue::setExpectedTotalNbOfEvents(), stdair::EventQueue::setStatus(), and stdair::EventQueue::updateStatus().
void stdair::ProgressStatus::setActualNb | ( | const Count_T & | iActualNb | ) | [inline] |
Set the actual number.
Definition at line 70 of file ProgressStatus.hpp.
Referenced by stdair::EventQueue::addStatus(), stdair::EventQueue::setActualTotalNbOfEvents(), stdair::EventQueue::setStatus(), and stdair::EventQueue::updateStatus().
void stdair::ProgressStatus::reset | ( | ) |
Reset the current number (to 0).
Definition at line 50 of file ProgressStatus.cpp.
References stdair::DEFAULT_PROGRESS_STATUS.
Referenced by stdair::EventQueue::reset().
Increment the current number.
Definition at line 78 of file ProgressStatus.hpp.
Count_T stdair::ProgressStatus::operator++ | ( | ) | [inline] |
Increment the current number.
Definition at line 84 of file ProgressStatus.hpp.
const std::string stdair::ProgressStatus::describe | ( | ) | const [virtual] |
Give a description of the structure (e.g., "4 / 100 / 101").
Implements stdair::StructAbstract.
Definition at line 56 of file ProgressStatus.cpp.
void stdair::StructAbstract::toStream | ( | std::ostream & | ioOut | ) | const [inline, inherited] |
Dump a Business Object into an output stream.
ostream& | the output stream. |
Reimplemented in stdair::YieldRange, stdair::AirlineStruct, stdair::BookingRequestStruct, stdair::CancellationStruct, stdair::FareOptionStruct, stdair::OptimisationNotificationStruct, stdair::RMEventStruct, stdair::SnapshotStruct, stdair::TravelSolutionStruct, and stdair::VirtualClassStruct.
Definition at line 29 of file StructAbstract.hpp.
References stdair::StructAbstract::describe().
Referenced by operator<<().
virtual void stdair::StructAbstract::fromStream | ( | std::istream & | ioIn | ) | [inline, virtual, inherited] |
Read a Business Object from an input stream.
istream& | the input stream. |
Reimplemented in stdair::ProgressStatusSet, stdair::YieldRange, stdair::AirlineStruct, stdair::BookingRequestStruct, stdair::CancellationStruct, stdair::EventStruct, stdair::FareOptionStruct, stdair::OptimisationNotificationStruct, stdair::RMEventStruct, stdair::SnapshotStruct, stdair::TravelSolutionStruct, and stdair::VirtualClassStruct.
Definition at line 38 of file StructAbstract.hpp.
Referenced by operator>>().