Torc
0.1
|
A factory class for automatically running objects outside of the main loop. More...
#include <torcadminthread.h>
Public Member Functions | |
TorcAdminObject (int Priority=TORC_ADMIN_LOW_PRIORITY) | |
virtual | ~TorcAdminObject ()=default |
int | Priority (void) const |
TorcAdminObject * | GetNextObject (void) |
virtual void | Create (void)=0 |
virtual void | Destroy (void)=0 |
Static Public Member Functions | |
static void | CreateObjects (void) |
Iterates through the list of registered TorcAdminObject's and creates them. More... | |
static void | DestroyObjects (void) |
Destroys each created admin object. More... | |
static bool | HigherPriority (const TorcAdminObject *Object1, const TorcAdminObject *Object2) |
Sort TorcAdminObject's based on relative priorities. More... | |
A factory class for automatically running objects outside of the main loop.
TorcLocalContext creates a helper thread, TorcAdminThread, when the application is started. TorcAdminThread then calls Create on each static subclass of TorcAdminObject to automatically run certain core functionality outside of the main loop.
Items are created in priority order, with higher priority objects created first.
Example usage:
Definition at line 28 of file torcadminthread.h.
|
explicit |
Definition at line 104 of file torcadminthread.cpp.
|
virtualdefault |
|
pure virtual |
|
static |
Iterates through the list of registered TorcAdminObject's and creates them.
Definition at line 134 of file torcadminthread.cpp.
|
pure virtual |
|
static |
Destroys each created admin object.
Definition at line 167 of file torcadminthread.cpp.
TorcAdminObject * TorcAdminObject::GetNextObject | ( | void | ) |
Definition at line 118 of file torcadminthread.cpp.
|
static |
Sort TorcAdminObject's based on relative priorities.
Definition at line 126 of file torcadminthread.cpp.
int TorcAdminObject::Priority | ( | void | ) | const |
Definition at line 113 of file torcadminthread.cpp.