AppBase::ProgressDisplay Class Reference

#include <ProgressDisplay.h>

Inheritance diagram for AppBase::ProgressDisplay:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~ProgressDisplay ()
void setParentProgressOfNewSubtasks (double subtaskTotalProgress, bool propagatesProgress=false)
void startSubtask (const std::string &message, const double &maxProgress, const double &progressForParentTask, const bool &propagatesProgress=false)
void startSubtask (const std::string &message, const double &maxProgress=0)
void startSubtask (const double &maxProgress)
virtual void setSubtaskMessage (const std::string &message)
virtual std::string getSubtaskMessage () const
virtual double getSubtaskMaxProgress () const
virtual double getSubtaskProgress () const
virtual void updateSubtaskProgress (const double &newValue)
virtual void increaseSubtaskProgressBy (const double &deltaValue)
virtual void finishSubtask ()
virtual bool wasCancelled ()

Protected Member Functions

 ProgressDisplay ()
void startSubtaskWithTask (const ProgressSubtask &newSubtask)
virtual void cancelTask ()
virtual void updateProgressDisplay ()=0
 Template method, updates the display.
virtual void subtaskStarted ()
 Template method, called when subtask is started.
virtual void subtaskFinished ()
 Template method, called when subtask is finishing.
virtual void propagateProgress (const double &newProgress)
virtual ProgressSubtaskgetCurrentSubtask () const
virtual bool noSubtasksAvailable () const

Protected Attributes

std::vector< ProgressSubtasko_subtasks
bool o_canceled
double o_newSubtaskProgress
bool o_newSubtaskPropagates

Constructor & Destructor Documentation

AppBase::ProgressDisplay::ProgressDisplay  )  [inline, protected]
 

Definition at line 93 of file ProgressDisplay.h.

virtual AppBase::ProgressDisplay::~ProgressDisplay  )  [inline, virtual]
 

Definition at line 99 of file ProgressDisplay.h.


Member Function Documentation

void AppBase::ProgressDisplay::cancelTask  )  [protected, virtual]
 

Definition at line 148 of file ProgressDisplay.cpp.

References o_canceled.

void AppBase::ProgressDisplay::finishSubtask  )  [virtual]
 

Definition at line 135 of file ProgressDisplay.cpp.

References o_subtasks, AppBase::ProgressDisplay::ProgressSubtask::progress, AppBase::ProgressDisplay::ProgressSubtask::progressForParentTask, subtaskFinished(), and updateProgressDisplay().

Referenced by AppBase::ProgressReporterAdaptor::increaseProgress(), loadImgsAndExtractPoints(), main(), AppBase::MultiProgressDisplayAdaptor::taskRemove(), and AppBase::ProgressReporterAdaptor::~ProgressReporterAdaptor().

ProgressDisplay::ProgressSubtask & AppBase::ProgressDisplay::getCurrentSubtask  )  const [protected, virtual]
 

Definition at line 190 of file ProgressDisplay.cpp.

References o_subtasks.

Referenced by getSubtaskMaxProgress(), getSubtaskMessage(), getSubtaskProgress(), setSubtaskMessage(), and updateSubtaskProgress().

double AppBase::ProgressDisplay::getSubtaskMaxProgress  )  const [virtual]
 

Definition at line 95 of file ProgressDisplay.cpp.

References getCurrentSubtask(), AppBase::ProgressDisplay::ProgressSubtask::maxProgress, and noSubtasksAvailable().

std::string AppBase::ProgressDisplay::getSubtaskMessage  )  const [virtual]
 

Definition at line 89 of file ProgressDisplay.cpp.

References getCurrentSubtask(), and AppBase::ProgressDisplay::ProgressSubtask::message.

Referenced by AppBase::ProgressReporterAdaptor::increaseProgress().

double AppBase::ProgressDisplay::getSubtaskProgress  )  const [virtual]
 

Definition at line 102 of file ProgressDisplay.cpp.

References getCurrentSubtask(), noSubtasksAvailable(), and AppBase::ProgressDisplay::ProgressSubtask::progress.

Referenced by increaseSubtaskProgressBy().

void AppBase::ProgressDisplay::increaseSubtaskProgressBy const double &  deltaValue  )  [virtual]
 

Definition at line 129 of file ProgressDisplay.cpp.

References getSubtaskProgress(), and updateSubtaskProgress().

Referenced by AppBase::ProgressReporterAdaptor::increaseProgress().

bool AppBase::ProgressDisplay::noSubtasksAvailable  )  const [protected, virtual]
 

Definition at line 194 of file ProgressDisplay.cpp.

References o_subtasks.

Referenced by getSubtaskMaxProgress(), getSubtaskProgress(), and updateSubtaskProgress().

void AppBase::ProgressDisplay::propagateProgress const double &  newProgress  )  [protected, virtual]
 

Definition at line 161 of file ProgressDisplay.cpp.

References DEBUG_INFO, AppBase::ProgressDisplay::ProgressSubtask::maxProgress, o_subtasks, AppBase::ProgressDisplay::ProgressSubtask::progress, and AppBase::ProgressDisplay::ProgressSubtask::progressForParentTask.

Referenced by updateSubtaskProgress().

void AppBase::ProgressDisplay::setParentProgressOfNewSubtasks double  subtaskTotalProgress,
bool  propagatesProgress = false
 

Definition at line 48 of file ProgressDisplay.cpp.

References o_newSubtaskProgress, and o_newSubtaskPropagates.

Referenced by AppBase::MultiProgressDisplayAdaptor::taskAdded().

void AppBase::ProgressDisplay::setSubtaskMessage const std::string message  )  [virtual]
 

Definition at line 85 of file ProgressDisplay.cpp.

References getCurrentSubtask(), and AppBase::ProgressDisplay::ProgressSubtask::message.

Referenced by AppBase::ProgressReporterAdaptor::setMessage(), and AppBase::MultiProgressDisplayAdaptor::updateProgressDisplay().

void AppBase::ProgressDisplay::startSubtask const double &  maxProgress  ) 
 

Definition at line 79 of file ProgressDisplay.cpp.

References startSubtask().

void AppBase::ProgressDisplay::startSubtask const std::string message,
const double &  maxProgress = 0
 

Definition at line 69 of file ProgressDisplay.cpp.

References o_newSubtaskProgress, o_newSubtaskPropagates, and startSubtask().

void AppBase::ProgressDisplay::startSubtask const std::string message,
const double &  maxProgress,
const double &  progressForParentTask,
const bool &  propagatesProgress = false
 

Definition at line 58 of file ProgressDisplay.cpp.

References startSubtaskWithTask().

Referenced by AppBase::ProgressReporterAdaptor::increaseProgress(), loadImgsAndExtractPoints(), main(), AppBase::ProgressReporterAdaptor::ProgressReporterAdaptor(), startSubtask(), and AppBase::MultiProgressDisplayAdaptor::taskAdded().

void AppBase::ProgressDisplay::startSubtaskWithTask const ProgressSubtask newSubtask  )  [protected]
 

Definition at line 41 of file ProgressDisplay.cpp.

References o_subtasks, subtaskStarted(), and updateProgressDisplay().

Referenced by startSubtask().

virtual void AppBase::ProgressDisplay::subtaskFinished  )  [inline, protected, virtual]
 

Template method, called when subtask is finishing.

The default implementation does nothing.

Definition at line 171 of file ProgressDisplay.h.

References DEBUG_DEBUG.

Referenced by finishSubtask().

virtual void AppBase::ProgressDisplay::subtaskStarted  )  [inline, protected, virtual]
 

Template method, called when subtask is started.

The default implementation does nothing.

Definition at line 165 of file ProgressDisplay.h.

References DEBUG_DEBUG.

Referenced by startSubtaskWithTask().

virtual void AppBase::ProgressDisplay::updateProgressDisplay  )  [protected, pure virtual]
 

Template method, updates the display.

You should override this method with your code of updating the display.

Implemented in AppBase::DummyProgressDisplay, and AppBase::StreamProgressDisplay.

Referenced by finishSubtask(), startSubtaskWithTask(), and updateSubtaskProgress().

void AppBase::ProgressDisplay::updateSubtaskProgress const double &  newValue  )  [virtual]
 

Definition at line 109 of file ProgressDisplay.cpp.

References DEBUG_INFO, getCurrentSubtask(), noSubtasksAvailable(), AppBase::ProgressDisplay::ProgressSubtask::progress, propagateProgress(), and updateProgressDisplay().

Referenced by increaseSubtaskProgressBy(), and AppBase::MultiProgressDisplayAdaptor::updateProgressDisplay().

bool AppBase::ProgressDisplay::wasCancelled  )  [virtual]
 

Definition at line 155 of file ProgressDisplay.cpp.

Referenced by AppBase::ProgressReporterAdaptor::increaseProgress(), HuginBase::PointSampler::runAlgorithm(), HuginBase::SmartPhotometricOptimizer::runAlgorithm(), and HuginBase::PhotometricOptimizer::runAlgorithm().


Member Data Documentation

bool AppBase::ProgressDisplay::o_canceled [protected]
 

Definition at line 193 of file ProgressDisplay.h.

Referenced by cancelTask().

double AppBase::ProgressDisplay::o_newSubtaskProgress [protected]
 

Definition at line 196 of file ProgressDisplay.h.

Referenced by setParentProgressOfNewSubtasks(), and startSubtask().

bool AppBase::ProgressDisplay::o_newSubtaskPropagates [protected]
 

Definition at line 197 of file ProgressDisplay.h.

Referenced by setParentProgressOfNewSubtasks(), and startSubtask().

std::vector<ProgressSubtask> AppBase::ProgressDisplay::o_subtasks [protected]
 

Definition at line 192 of file ProgressDisplay.h.

Referenced by finishSubtask(), getCurrentSubtask(), noSubtasksAvailable(), propagateProgress(), and startSubtaskWithTask().


The documentation for this class was generated from the following files:
Generated on Wed Sep 24 01:25:51 2014 for Hugintrunk by  doxygen 1.3.9.1