#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 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.
Referenced by ProgressStatus().
Constructor.
As no current number is given, it is set to 0.
Definition at line 23 of file ProgressStatus.cpp.
References stdair::DEFAULT_PROGRESS_STATUS.
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.
References stdair::DEFAULT_PROGRESS_STATUS.
stdair::ProgressStatus::ProgressStatus | ( | ) |
Constructor.
All the numbers are set to 0.
Definition at line 36 of file ProgressStatus.cpp.
References stdair::DEFAULT_PROGRESS_STATUS.
stdair::ProgressStatus::ProgressStatus | ( | const ProgressStatus & | iProgressStatus | ) |
|
inline |
Get the current number.
Definition at line 29 of file ProgressStatus.hpp.
|
inline |
Get the current number.
Definition at line 34 of file ProgressStatus.hpp.
|
inline |
Get the expected number.
Definition at line 39 of file ProgressStatus.hpp.
|
inline |
Get the actual number.
Definition at line 44 of file ProgressStatus.hpp.
|
inline |
Get the progress as a percentage.
Definition at line 49 of file ProgressStatus.hpp.
References stdair::MAXIMUM_PROGRESS_STATUS.
Referenced by toString().
|
inline |
Set the current number.
Definition at line 63 of file ProgressStatus.hpp.
|
inline |
Set the expected number.
Definition at line 68 of file ProgressStatus.hpp.
|
inline |
Set the actual number.
Definition at line 73 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 81 of file ProgressStatus.hpp.
|
inline |
Increment the current number.
Definition at line 87 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. |
Definition at line 29 of file StructAbstract.hpp.
References describe().
|
inlinevirtualinherited |
Read a Business Object from an input stream.
istream& | the input stream. |
Reimplemented in stdair::AirlineStruct, stdair::BookingRequestStruct, stdair::BreakPointStruct, stdair::CancellationStruct, stdair::ClassAvailabilityStruct, stdair::ConfigHolderStruct, stdair::EventStruct, stdair::FareOptionStruct, stdair::FFDisutilityCurveHolderStruct, stdair::FRAT5CurveHolderStruct, stdair::OptimisationNotificationStruct, stdair::ProgressStatusSet, stdair::RMEventStruct, stdair::SnapshotStruct, stdair::TravelSolutionStruct, stdair::VirtualClassStruct, and stdair::YieldRange.
Definition at line 38 of file StructAbstract.hpp.
Referenced by operator>>().