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

lti::progressInfo Class Reference

Progress information interface. More...

#include <ltiProgressInfo.h>

Inheritance diagram for lti::progressInfo:
Inheritance graph
[legend]
Collaboration diagram for lti::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)=0
virtual void setMaxSteps (const int &maximalSteps)=0
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)
virtual void reset ()=0
virtual bool breakRequested () const =0
progressInfocopy (const progressInfo &other)
virtual progressInfoclone () const =0

Protected Attributes

int detailLevel

Detailed Description

Progress information interface.

This virtual class is the parent of all classes that can be used to display the progress of processes that may take long times, which include classifiers, evaluation methods, etc.

The interface is simple and involves a concept where you have:

A simple example class that only redirects the information to the std::cout (or other std::ostream) is streamProgressInfo.


Constructor & Destructor Documentation

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

Default constructor.

Parameters:
title the name of the progressInfo object
maximumSteps the maximum number of steps of the process
lti::progressInfo::progressInfo ( const progressInfo other  ) 

Copy constructor.

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

Destructor.


Member Function Documentation

virtual bool lti::progressInfo::breakRequested (  )  const [pure virtual]

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

Implemented in lti::streamProgressInfo.

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

The clone member.

Implemented in lti::streamProgressInfo.

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

The copy member.

Reimplemented in lti::streamProgressInfo.

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

Return the used detail level of substep information.

virtual void lti::progressInfo::reset (  )  [pure virtual]

Reset progress information.

Implemented in lti::streamProgressInfo.

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

Detail level of substep information.

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

Maximal number of steps.

Implemented in lti::streamProgressInfo.

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

Set the title of the progress info block.

Implemented in lti::streamProgressInfo.

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

Report one step done.

Parameters:
progressInfo string with some text information for the step

Implemented in lti::streamProgressInfo.

virtual void lti::progressInfo::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.

The default implementation is void.

Reimplemented in lti::streamProgressInfo.


Member Data Documentation

Detail level used for the substeps.


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