StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
stdair::ProgressStatus Struct Reference

#include <stdair/basic/ProgressStatus.hpp>

+ Inheritance diagram for stdair::ProgressStatus:

List of all members.

Public Member Functions

const Count_Tcount () const
const Count_TgetCurrentNb () const
const Count_TgetExpectedNb () const
const Count_TgetActualNb () 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)

Detailed Description

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.


Constructor & Destructor Documentation

stdair::ProgressStatus::ProgressStatus ( const Count_T iCurrentNb,
const Count_T iExpectedNb,
const Count_T iActualNb 
)

Constructor.

Parameters:
constCount_T& The current number.
constCount_T& The expected number.
constCount_T& The actual number.

Definition at line 15 of file ProgressStatus.cpp.

stdair::ProgressStatus::ProgressStatus ( const Count_T iExpectedNb,
const Count_T iActualNb 
)

Constructor.

As no current number is given, it is set to 0.

Parameters:
constCount_T& The expected number.
constCount_T& The actual number.

Definition at line 23 of file ProgressStatus.cpp.

Constructor.

As no expected number is given, it is assumed to be equal to the actual one. The current number is set to 0.

Parameters:
constCount_T& The actual number.

Definition at line 30 of file ProgressStatus.cpp.

Constructor.

All the numbers are set to 0.

Definition at line 36 of file ProgressStatus.cpp.

Copy Constructor.

Definition at line 43 of file ProgressStatus.cpp.


Member Function Documentation

const Count_T& stdair::ProgressStatus::count ( ) const [inline]

Get the current number.

Definition at line 29 of file ProgressStatus.hpp.

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]

Reset the current number (to 0).

Definition at line 50 of file ProgressStatus.cpp.

References stdair::DEFAULT_PROGRESS_STATUS.

Referenced by stdair::EventQueue::reset().

Count_T stdair::ProgressStatus::operator+= ( Count_T  iIncrement) [inline]

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]
virtual void stdair::StructAbstract::fromStream ( std::istream &  ioIn) [inline, virtual, inherited]

The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines