CVR-Lib last update 20 Sep 2009

cvr::progressInfo Class Reference

This class can be overloaded to display the training progress of a process. More...

#include <cvrProgressInfo.h>

Inheritance diagram for cvr::progressInfo:

Inheritance graph
[legend]
Collaboration diagram for cvr::progressInfo:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 progressInfo (const std::string &title="", const int maximumSteps=100)
 progressInfo (const progressInfo &other)
virtual ~progressInfo ()
virtual void setTitle (const std::string &theTitle)
virtual void setMaxSteps (const int maximalSteps)
virtual void setDetailLevel (const int level)
virtual int getDetailLevel () const
virtual void step (const std::string &progressInfo)=0
virtual void substep (const int detail, const std::string &info)=0
virtual void reset ()
virtual bool breakRequested () const
progressInfocopy (const progressInfo &other)
const std::string & name () const
virtual progressInfoclone () const =0
virtual progressInfonewInstance () const =0

Protected Attributes

std::string title_
int maxSteps_
int detailLevel_
int lastStep_


Detailed Description

This class can be overloaded to display the training progress of a process.

It is mostly used for classifiers, where training can take a long time.


Constructor & Destructor Documentation

cvr::progressInfo::progressInfo ( const std::string &  title = "",
const int  maximumSteps = 100 
)

Default constructor.

The default are empty title and 100 maximum steps. These are rarely the correct settings. For informative progress information set these values either with the constructor or the setMaximumSteps() and setTitle() functions.

Parameters:
title the name of the progressInfo object
maximumSteps the maximum number of steps of the process

cvr::progressInfo::progressInfo ( const progressInfo other  ) 

Copy constructor.

virtual cvr::progressInfo::~progressInfo (  )  [virtual]

Destructor.


Member Function Documentation

virtual bool cvr::progressInfo::breakRequested (  )  const [virtual]

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

This function is mostly useful for GUI progressInfo implementations.

This default implementation always returns false.

virtual progressInfo* cvr::progressInfo::clone (  )  const [pure virtual]

The clone member.

Implements cvr::object.

Implemented in cvr::streamProgressInfo.

progressInfo& cvr::progressInfo::copy ( const progressInfo other  ) 

The copy member.

virtual int cvr::progressInfo::getDetailLevel (  )  const [virtual]

Return the used detail level of substep information.

const std::string& cvr::progressInfo::name (  )  const [virtual]

Returns the name of the class.

Implements cvr::object.

Reimplemented in cvr::streamProgressInfo.

virtual progressInfo* cvr::progressInfo::newInstance (  )  const [pure virtual]

The new instance member.

Implements cvr::object.

Implemented in cvr::streamProgressInfo.

virtual void cvr::progressInfo::reset (  )  [virtual]

Reset progress information.

virtual void cvr::progressInfo::setDetailLevel ( const int  level  )  [virtual]

Detail level of substep information.

Level 1 is equal to that of normal steps.

virtual void cvr::progressInfo::setMaxSteps ( const int  maximalSteps  )  [virtual]

Maximal number of steps.

virtual void cvr::progressInfo::setTitle ( const std::string &  theTitle  )  [virtual]

Set the title of the progress info block.

virtual void cvr::progressInfo::step ( const std::string &  progressInfo  )  [pure virtual]

Report one step done.

Parameters:
progressInfo string with some text information for the step

Implemented in cvr::streamProgressInfo.

virtual void cvr::progressInfo::substep ( const int  detail,
const std::string &  info 
) [pure 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.

Parameters:
detail is the detail level. The lowest (as in step()) is 1.
info the string displayed for the substep

Implemented in cvr::streamProgressInfo.


Member Data Documentation

Detail level used for the substeps.

Last processed step.

Maximum number of steps expected.

std::string cvr::progressInfo::title_ [protected]

Title for this progress info.


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

Generated on Sun Sep 20 22:08:40 2009 for CVR-Lib by Doxygen 1.5.8