LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::streamProgressInfo Class Reference

Progress Information to stream. More...

#include <ltiProgressInfo.h>

Inheritance diagram for lti::streamProgressInfo:
Inheritance graph
[legend]
Collaboration diagram for lti::streamProgressInfo:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 streamProgressInfo (const std::string &title="", const int &maximumSteps=100)
 streamProgressInfo (std::ostream &outStream, const std::string &title="", const int &maximumSteps=100)
 streamProgressInfo (const streamProgressInfo &other)
virtual ~streamProgressInfo ()
virtual void setTitle (const std::string &theTitle)
virtual void setMaxSteps (const int &maximalSteps)
virtual void step (const std::string &progressInfo)
virtual void substep (const int detail, const std::string &info)
virtual void reset ()
virtual streamProgressInfocopy (const streamProgressInfo &other)
virtual progressInfoclone () const
virtual bool breakRequested () const

Protected Attributes

int maxSteps
int lastStep
std::string lastStepText
std::string title
std::ostream * out
std::string endline

Detailed Description

Progress Information to stream.

This is a simple implementation of the progressInfo concept. It dumps the progress information to a std::ostream, or std::cout if you do not give one.


Constructor & Destructor Documentation

lti::streamProgressInfo::streamProgressInfo ( const std::string &  title = "",
const int &  maximumSteps = 100 
)

Default constructor.

Redirect all information to the std::cout stream.

Parameters:
title the name of the progressInfo object
maximumSteps the maximum number of steps of the process
lti::streamProgressInfo::streamProgressInfo ( std::ostream &  outStream,
const std::string &  title = "",
const int &  maximumSteps = 100 
)

Constructor.

Parameters:
outStream output stream, where the progress information will be written.
title the name of the progressInfo object
maximumSteps the maximum number of steps of the process
lti::streamProgressInfo::streamProgressInfo ( const streamProgressInfo other  ) 

Copy constructor.

virtual lti::streamProgressInfo::~streamProgressInfo (  )  [virtual]

Destructor.


Member Function Documentation

virtual bool lti::streamProgressInfo::breakRequested (  )  const [virtual]

Returns true if someone wants the caller of this progress info object to terminate.

Implements lti::progressInfo.

virtual progressInfo* lti::streamProgressInfo::clone (  )  const [virtual]

The clone member.

Implements lti::progressInfo.

virtual streamProgressInfo& lti::streamProgressInfo::copy ( const streamProgressInfo other  )  [virtual]

The copy member.

Reimplemented from lti::progressInfo.

virtual void lti::streamProgressInfo::reset (  )  [virtual]

Reset progress information.

Implements lti::progressInfo.

virtual void lti::streamProgressInfo::setMaxSteps ( const int &  maximalSteps  )  [virtual]

Maximal number of steps.

Implements lti::progressInfo.

virtual void lti::streamProgressInfo::setTitle ( const std::string &  theTitle  )  [virtual]

Set the title of the progress info block.

Implements lti::progressInfo.

virtual void lti::streamProgressInfo::step ( const std::string &  progressInfo  )  [virtual]

Report one step done.

Parameters:
progressInfo string with some text information for the step

Implements lti::progressInfo.

virtual void lti::streamProgressInfo::substep ( const int  detail,
const std::string &  info 
) [virtual]

Report additional information for a step, with the given detail level.

The given information will be displayed only if the current detail level is higher or equal than the detail specified in this method.

Reimplemented from lti::progressInfo.


Member Data Documentation

std::string lti::streamProgressInfo::endline [protected]

The sequence that is used for end-of-line when emitting steps.

Last processed step.

std::string lti::streamProgressInfo::lastStepText [protected]

Text specified for the last step.

Maximum number of steps expected.

std::ostream* lti::streamProgressInfo::out [protected]

Stream being used.

std::string lti::streamProgressInfo::title [protected]

Title for this progress info.


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:26:56 2010 for LTI-Lib by Doxygen 1.6.1