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>
|
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.
|
|
|
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.
|
|
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.
|
|
|
virtual | ~IRCObject () |
| Virtual destructor.
|
|
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().
◆ create() [1/2]
Create the IProgressTick object with an floating point callback function.
- Parameters
-
[in] | cbFunc | A floating point callback function that will be called on each tick. |
[in] | cbPriv | The 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] | cbFunc | An integer callback function that will be called on each tick. |
[in] | cbPriv | The parameter that will be passed to the callback function. |
- Returns
- IProgressTickPtr The IProgressTick object
◆ setCallback() [1/2]
Set the integer type callback function.
- Parameters
-
[in] | cbFunc | The integer type callback function to be invoked |
[in] | cbPriv | The parameter to be passed back to the callback whenever it is invoked. |
◆ setCallback() [2/2]
Set the integer type callback function.
- Parameters
-
[in] | cbFunc | The integer type callback function to be invoked |
[in] | cbPriv | The 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] | tickMax | The maximum tick counter value. |
The documentation for this class was generated from the following file: