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

#include <stdair/basic/ProgressStatus.hpp>

+ Inheritance diagram for stdair::ProgressStatus:

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
 
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)
 

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 27 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.

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.

Parameters
constCount_T& The actual number.

Definition at line 30 of file ProgressStatus.cpp.

stdair::ProgressStatus::ProgressStatus ( )

Constructor.

All the numbers are set to 0.

Definition at line 36 of file ProgressStatus.cpp.

stdair::ProgressStatus::ProgressStatus ( const ProgressStatus iProgressStatus)

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 31 of file ProgressStatus.hpp.

const Count_T& stdair::ProgressStatus::getCurrentNb ( ) const
inline

Get the current number.

Definition at line 36 of file ProgressStatus.hpp.

Referenced by stdair::ProgressStatusSet::describe().

const Count_T& stdair::ProgressStatus::getExpectedNb ( ) const
inline

Get the expected number.

Definition at line 41 of file ProgressStatus.hpp.

Referenced by stdair::ProgressStatusSet::describe().

const Count_T& stdair::ProgressStatus::getActualNb ( ) const
inline

Get the actual number.

Definition at line 46 of file ProgressStatus.hpp.

Referenced by stdair::ProgressStatusSet::describe().

const ProgressPercentage_T stdair::ProgressStatus::progress ( ) const
inline

Get the progress as a percentage.

Definition at line 51 of file ProgressStatus.hpp.

References stdair::MAXIMUM_PROGRESS_STATUS.

Referenced by toString().

void stdair::ProgressStatus::setCurrentNb ( const Count_T iCurrentNb)
inline

Set the current number.

Definition at line 65 of file ProgressStatus.hpp.

void stdair::ProgressStatus::setExpectedNb ( const Count_T iExpectedNb)
inline

Set the expected number.

Definition at line 70 of file ProgressStatus.hpp.

void stdair::ProgressStatus::setActualNb ( const Count_T iActualNb)
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.

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

Increment the current number.

Definition at line 83 of file ProgressStatus.hpp.

Count_T stdair::ProgressStatus::operator++ ( )
inline

Increment the current number.

Definition at line 89 of file ProgressStatus.hpp.

const std::string stdair::ProgressStatus::describe ( ) const
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().

void stdair::StructAbstract::toStream ( std::ostream &  ioOut) const
inlineinherited

Dump a Business Object into an output stream.

Parameters
ostream&the output stream.

Definition at line 29 of file StructAbstract.hpp.

References stdair::StructAbstract::describe().


The documentation for this struct was generated from the following files: