Clarisse 5.0 SP8 SDK
5.0.5.8.0
|
This class is a handler to a ClarisseEngine instance running in a background thread. More...
Public Types | |
enum | ExecMode { EXEC_MODE_SYNC, EXEC_MODE_ASYNC } |
Define Clarisse Engine callback's execution mode. More... | |
Public Member Functions | |
ClarisseEngineHandler (ClarisseEngineImpl *impl) | |
bool | execute (const ExecMode &mode, ClarisseEngineCallback cbk, void *data=0) |
Execute safely a callback by Clarisse Engine. | |
bool | is_running () const |
Return true if Clarisse Engine is running in the background. | |
void | quit () |
Quit Clarisse Engine application. Use ClarisseEngineHandler::quit only when the host application quits. | |
ClarisseEngineImpl * | get_impl () const |
This class is a handler to a ClarisseEngine instance running in a background thread.
bool ClarisseEngineHandler::execute | ( | const ExecMode & | mode, |
ClarisseEngineCallback | cbk, | ||
void * | data = 0 |
||
) |
Execute safely a callback by Clarisse Engine.
mode | Define the execution mode. If mode is set to ExecMode::EXEC_MODE_SYNC, ClarisseEngineHandler::execute returns only when cbk is actually executed. If mode is set to ExecMode::EXEC_MODE_ASYNC, ClarisseEngineHandler::execute returns immediately. The callback is stacked by Clarisse and is executed as soon as possible. |
data | Optional blind data passed as argument to the specified callback |