Mako 7.5.0 API
Loading...
Searching...
No Matches
JawsMako::IProgressTick Class Referenceabstract

An abstract class allowing a callback to monitor the progress of a task. The callback can either pass an integer (from 0 to a maximum value) or a float (0.0 to 1.0) which represents the progress of the task. The task needs to call the tick() method to indicate incremental progress. If the task has completed (even if it's premature) then tickMax() should be called instead of tick(). More...

#include <jawsmako.h>

Inheritance diagram for JawsMako::IProgressTick:

Public Types

typedef void(* FloatProgressCallbackFunc) (void *priv, float progress)
 A callback type for receiving progress information from 0.0 (starting) through 1.0 (complete)
 
typedef void(* IntProgressCallbackFunc) (void *priv, uint32 currentCount, uint32 maxCount)
 A callback type for receiving progress information as an integer. The value of currentCount goes from 1 to maxCount.
 

Public Member Functions

virtual void setCallback (IntProgressCallbackFunc cbFunc, void *cbPriv)=0
 Set the integer type callback function.
 
virtual void setCallback (FloatProgressCallbackFunc cbFunc, void *cbPriv)=0
 Set the integer type callback function.
 
virtual void tickReset ()=0
 Reset the internal counter to 0.
 
virtual void tick ()=0
 Increment the tick counter and optionally invoke the callback function.
 
virtual void tickMax ()=0
 Set the tick counter to the maximum value and invoke the callback function.
 
virtual void setTickMax (const uint32 tickMax)=0
 Set the maximum counter value.
 
- Public Member Functions inherited from IRCObject
virtual void addRef () const =0
 Increases the reference count of the actual object pointed to. This would take place during an assignment or copying.
 
virtual bool decRef () const =0
 Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to.
 
virtual int32 getRefCount () const =0
 Retrieve the current reference count of the actual object pointed to.
 

Static Public Member Functions

static JAWSMAKO_API IProgressTickPtr create (IntProgressCallbackFunc cbFunc, void *cbPriv)
 Create the IProgressTick object with an integer callback function.
 
static JAWSMAKO_API IProgressTickPtr create (FloatProgressCallbackFunc cbFunc, void *cbPriv)
 Create the IProgressTick object with an floating point callback function.
 

Additional Inherited Members

- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

An abstract class allowing a callback to monitor the progress of a task. The callback can either pass an integer (from 0 to a maximum value) or a float (0.0 to 1.0) which represents the progress of the task. The task needs to call the tick() method to indicate incremental progress. If the task has completed (even if it's premature) then tickMax() should be called instead of tick().

Member Function Documentation

◆ create() [1/2]

static JAWSMAKO_API IProgressTickPtr JawsMako::IProgressTick::create ( FloatProgressCallbackFunc cbFunc,
void * cbPriv )
static

Create the IProgressTick object with an floating point callback function.

Parameters
[in]cbFuncA floating point callback function that will be called on each tick.
[in]cbPrivThe parameter that will be passed to the callback function.
Returns
IProgressTickPtr The IProgressTick object

◆ create() [2/2]

static JAWSMAKO_API IProgressTickPtr JawsMako::IProgressTick::create ( IntProgressCallbackFunc cbFunc,
void * cbPriv )
static

Create the IProgressTick object with an integer callback function.

Parameters
[in]cbFuncAn integer callback function that will be called on each tick.
[in]cbPrivThe parameter that will be passed to the callback function.
Returns
IProgressTickPtr The IProgressTick object

◆ setCallback() [1/2]

virtual void JawsMako::IProgressTick::setCallback ( FloatProgressCallbackFunc cbFunc,
void * cbPriv )
pure virtual

Set the integer type callback function.

Parameters
[in]cbFuncThe integer type callback function to be invoked
[in]cbPrivThe parameter to be passed back to the callback whenever it is invoked.

◆ setCallback() [2/2]

virtual void JawsMako::IProgressTick::setCallback ( IntProgressCallbackFunc cbFunc,
void * cbPriv )
pure virtual

Set the integer type callback function.

Parameters
[in]cbFuncThe integer type callback function to be invoked
[in]cbPrivThe parameter to be passed back to the callback whenever it is invoked.

◆ setTickMax()

virtual void JawsMako::IProgressTick::setTickMax ( const uint32 tickMax)
pure virtual

Set the maximum counter value.

Parameters
[in]tickMaxThe maximum tick counter value.

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