#include <mn_tickhook_entry.hpp>
|
virtual void | onTick (const unsigned int ticks)=0 |
|
This is an abstract base class for a entry of base_tickhook.
To use this, you need to subclass it. All of your coroutines should be derived from the base_tickhook_entry class. Then implement the virtual on_hook function.
◆ base_tickhook_entry() [1/2]
mn::base_tickhook_entry::base_tickhook_entry |
( |
unsigned int |
iTicksToCall, |
|
|
bool |
bOneShoted = false , |
|
|
void * |
pUserData = 0 |
|
) |
| |
Constructor
- Parameters
-
iTicksToCall | The number of ticks left after this run |
bOneShoted | If the hook oneshoted ? |
pArgs | a array of arguments. |
numArgs | How many arguments are contains in the array pArgs. |
◆ base_tickhook_entry() [2/2]
◆ get_ticks()
unsigned int mn::base_tickhook_entry::get_ticks |
( |
| ) |
|
◆ is_oneshoted()
bool mn::base_tickhook_entry::is_oneshoted |
( |
| ) |
|
◆ is_ready()
bool mn::base_tickhook_entry::is_ready |
( |
| ) |
|
◆ onTick()
virtual void mn::base_tickhook_entry::onTick |
( |
const unsigned int |
ticks | ) |
|
|
protectedpure virtual |
◆ set_oneshot()
bool mn::base_tickhook_entry::set_oneshot |
( |
bool |
bIsOneShot | ) |
|
Set the is this entry oneshot?
- Parameters
-
bIsOneShot | If true then oneshoted this entry and removed after run. |
◆ set_ticks()
bool mn::base_tickhook_entry::set_ticks |
( |
unsigned int |
uiTicks | ) |
|
Set the number of ticks after this run. When param uiTicks 0 is, then run every tick.
- Parameters
-
uiTicks | The number of ticks left after this run |
◆ start()
void mn::base_tickhook_entry::start |
( |
| ) |
|
Marked the hook as ready, after this you can not modifitated the hook
◆ stop()
void mn::base_tickhook_entry::stop |
( |
| ) |
|
◆ base_tickhook
friend class base_tickhook |
|
friend |
◆ m_bOneShoted
bool mn::base_tickhook_entry::m_bOneShoted |
|
protected |
◆ m_bReady
bool mn::base_tickhook_entry::m_bReady |
|
protected |
◆ m_iTicksToCall
unsigned int mn::base_tickhook_entry::m_iTicksToCall |
|
protected |
◆ m_mutexEntry
mutex_t mn::base_tickhook_entry::m_mutexEntry |
|
protected |
◆ m_pUserData
void* mn::base_tickhook_entry::m_pUserData |
|
protected |
The documentation for this class was generated from the following file: