#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 |
const std::string | toString () 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 27 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.
|
inline |
Get the current number.
Definition at line 31 of file ProgressStatus.hpp.
|
inline |
Get the current number.
Definition at line 36 of file ProgressStatus.hpp.
Referenced by stdair::ProgressStatusSet::describe().
|
inline |
Get the expected number.
Definition at line 41 of file ProgressStatus.hpp.
Referenced by stdair::ProgressStatusSet::describe().
|
inline |
Get the actual number.
Definition at line 46 of file ProgressStatus.hpp.
Referenced by stdair::ProgressStatusSet::describe().
|
inline |
Get the progress as a percentage.
Definition at line 51 of file ProgressStatus.hpp.
References stdair::MAXIMUM_PROGRESS_STATUS.
Referenced by toString().
|
inline |
Set the current number.
Definition at line 65 of file ProgressStatus.hpp.
|
inline |
Set the expected number.
Definition at line 70 of file ProgressStatus.hpp.
|
inline |
Set the actual number.
Definition at line 75 of file ProgressStatus.hpp.
void stdair::ProgressStatus::reset | ( | ) |
Reset the current number (to 0).
Definition at line 50 of file ProgressStatus.cpp.
References stdair::DEFAULT_PROGRESS_STATUS.
Increment the current number.
Definition at line 83 of file ProgressStatus.hpp.
|
inline |
Increment the current number.
Definition at line 89 of file ProgressStatus.hpp.
|
virtual |
Give a description of the structure (e.g., "1 {99, 100}").
Implements stdair::StructAbstract.
Definition at line 56 of file ProgressStatus.cpp.
const std::string stdair::ProgressStatus::toString | ( | ) | const |
Give a description of the structure (e.g., "1% (1/ 100)").
Definition at line 63 of file ProgressStatus.cpp.
References progress().
|
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>>().