libcommonc++  0.7
ProgressTrackerDelegate< T > Class Template Reference

An implementation of ProgressTracker that delegates to a method in an object. More...

#include <ProgressTracker.h++>

Inheritance diagram for ProgressTrackerDelegate< T >:
Collaboration diagram for ProgressTrackerDelegate< T >:

Public Member Functions

 ProgressTrackerDelegate (T *object, void(T::*func)(int, const String &))
 Construct a new ProgressTrackerDelegate for an object. More...
 

Protected Member Functions

void updateProgress (int percent, const String &status=String::null)
 Notify the tracker of an update in the progress of a task. More...
 

Detailed Description

template<class T>
class ccxx::ProgressTrackerDelegate< T >

An implementation of ProgressTracker that delegates to a method in an object.

Author
Mark Lindner

Constructor & Destructor Documentation

◆ ProgressTrackerDelegate()

ProgressTrackerDelegate ( T *  object,
void(T::*)(int, const String &)  func 
)
inline

Construct a new ProgressTrackerDelegate for an object.

Parameters
objectThe object.
funcA member function (method) in the object which will serve as the progress tracker.

Member Function Documentation

◆ updateProgress()

void updateProgress ( int  percent,
const String status = String::null 
)
inlineprotectedvirtual

Notify the tracker of an update in the progress of a task.

Parameters
percentThe percentage of the task that has been completed. A negative value indicates indeterminate progress.
statusAn optional status message.

Implements ProgressTracker.


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