Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | List of all members
ClarisseEngineHandler Class Reference

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
 

Detailed Description

This class is a handler to a ClarisseEngine instance running in a background thread.

Note
Embedding Clarisse Engine in 3rd party applications requires a special license agreement. Please contact sales.nosp@m.@iso.nosp@m.tropi.nosp@m.x.co.nosp@m.m for more information.

Member Enumeration Documentation

Define Clarisse Engine callback's execution mode.

Enumerator:
EXEC_MODE_SYNC 

Define a synchronous execution.

EXEC_MODE_ASYNC 

Define an asynchronous execution.

Member Function Documentation

bool ClarisseEngineHandler::execute ( const ExecMode mode,
ClarisseEngineCallback  cbk,
void *  data = 0 
)

Execute safely a callback by Clarisse Engine.

Parameters
modeDefine 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.
dataOptional blind data passed as argument to the specified callback
Note
As Clarisse Engine must run in a background thread, you must use this method to interact safely
with Clarisse scene, data and API. For example, you should never use a callback as a mean to retreive
a pointer to the AppObject in order to make direct Clarisse API calls in your host application.