|
typedef void(* | EventInfoFunction )(EventObject &, const EventInfo &, void *) |
| event callback signature for free functions / static methods.
|
|
typedef void(EventObject::* | EventInfoMethod )(EventObject &, const EventInfo &, void *) |
| event callback signature for methods.
|
|
typedef void(* | EventFunction )(EventObject &, const CoreString &, void *) |
|
typedef void(EventObject::* | EventMethod )(EventObject &, const CoreString &, void *) |
|
static ResourceID | declare_resource (const char *tag) |
|
static ResourceID | declare_resource (const CoreString &tag) |
|
static bool | declare_resource (ResourceID id, const char *tag) |
|
static bool | declare_resource (ResourceID id, const CoreString &tag) |
|
static ResourceID | get_resource_id (const char *tag) |
|
static ResourceID | get_resource_id (const CoreString &tag) |
|
static const char * | get_resource_tag (ResourceID id) |
|
static void | clear_unused_resources (SysThreadManager &thread_manager, const CoreBasicArray< OfObject * > &objects) |
|
static constexpr unsigned int | null_variation = 0 |
| Key of the null resource variation.
|
|
virtual void | module_constructor (OfObject &object) override |
|
ModuleProcess is the base class for implementing custom processes.
ModuleProcess::ModuleProcess |
( |
const bool & |
is_abortable = true | ) |
|
|
explicit |
Constructor. Initializes all callbacks with default implementations.
- Parameters
-
is_abortable | Defines if the process can be aborted. |
ModuleProcess::~ModuleProcess |
( |
| ) |
|
|
virtual |
Calls BeginProcessCallback. Intended for calling from a batch process.
- Warning
- Must not be used alone and must be called before run_process and end_process.
Consecutive calls to this method will not call BeginProcessCallback. This allows to save a lot of time when the process is called multiple times from a batch process.
- Returns
- On the first call, returns true if BeginProcessCallback succeeded, false if it failed. On intermediary calls, and if begin_process succeeded, always returns true.
Calls EndProcessCallback. Intended for calling from a batch process.
- Warning
- Must not be used alone and must be called between begin_process and end_process.
Intermediary calls to this method will not call EndProcessCallback.
- Returns
- On intermediary calls, always returns false. On the last call, returns true if EndProcessCallback succeeded, false if it failed.
bool ModuleProcess::has_begun |
( |
| ) |
const |
|
virtual |
Returns true if the process has succeeded to begin. Intended for calling from a batch process.
The batch process should not call run_process if this method returns false.
- Returns
- Returns true if begin_process was called, regardless of begin_process result. Returns false if the process hasn't begun yet or has finished (i.e. last end_process was called).
Calls ProcessAttrOverrideCallback.
- Parameters
-
attr | The overridden attribute. |
val | The override value. |
- Returns
- Returns the value of ProcessAttrOverrideCallback.
Runs the begin-run-end callback sequence, with a list of arguments to override the process attributes.
A progress bar is automatically created.
- Parameters
-
args | Optional arguments that will override the process attributes. |
is_abortable | Optional flag to define if the process can be aborted. |
- Returns
- Returns the return value of RunProcessCallback.
Runs the begin-run-end callback sequence, with a list of arguments to override the process attributes.
- Parameters
-
args | Arguments that will override the process attributes. |
- Returns
- Returns the return value of RunProcessCallback.
Runs the begin-run-end callback sequence.
- Parameters
-
progress | Process progress bar. |
- Returns
- Returns true if all 3 callbacks succeeded. Otherwise returns false and stops after the callback that failed.
Reimplemented in ModuleProcessScript.
Calls RunProcessCallback only. Intended for calling from a batch process.
- Warning
- Must not be used alone and must be called after begin_process and run_process.
- Returns
- Returns the return value of RunProcessCallback.