Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
RPC Namespace Reference

Functions

Call functions across plugins (simple calls)

These functions can be used to call functions in other plugins.

QScriptValue callFunction (QString _plugin, QString _functionName, std::vector< QScriptValue > _parameters)
 Call a function provided by a plugin getting multiple parameters. More...
 
QScriptValue callFunction (QString _plugin, QString _functionName)
 call a function provided by a plugin More...
 
Script Engine Controls

Functions to get the scripting engine. Normally you don't need them. And RPC::setScriptEngine should never be used!

void setScriptEngine (QScriptEngine *_engine)
 DONT USE! (Function to set the internal reference to the script Engine) More...
 
QScriptEngine * getScriptEngine ()
 get a pointer to OpenFlippers core scripting engine More...
 
Call functions across plugins

These templates can be used to call functions in other plugins.

template<typename T0 >
void callFunction (QString _plugin, QString _functionName, T0 _t0)
 call a function in another plugin More...
 
template<typename T0 , typename T1 >
void callFunction (QString _plugin, QString _functionName, T0 _t0, T1 _t1)
 call a function in another plugin More...
 
template<typename T0 , typename T1 , typename T2 >
void callFunction (QString _plugin, QString _functionName, T0 _t0, T1 _t1, T2 _t2)
 call a function in another plugin More...
 
template<typename T0 , typename T1 , typename T2 , typename T3 >
void callFunction (QString _plugin, QString _functionName, T0 _t0, T1 _t1, T2 _t2, T3 _t3)
 call a function in another plugin More...
 
template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 >
void callFunction (QString _plugin, QString _functionName, T0 _t0, T1 _t1, T2 _t2, T3 _t3, T4 _t4)
 call a function in another plugin More...
 
template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
void callFunction (QString _plugin, QString _functionName, T0 _t0, T1 _t1, T2 _t2, T3 _t3, T4 _t4, T5 _t5)
 call a function in another plugin More...
 
Call functions across plugins which return a value

These templates can be used to call functions that return a value. You have to pass the type of return value as the first template parameter.

template<typename ReturnValue >
ReturnValue callFunctionValue (QString _plugin, QString _functionName)
 call a function in another plugin and get a return parameter More...
 
template<typename ReturnValue , typename T0 >
ReturnValue callFunctionValue (QString _plugin, QString _functionName, T0 _t0)
 call a function in another plugin and get a return parameter More...
 
template<typename ReturnValue , typename T0 , typename T1 >
ReturnValue callFunctionValue (QString _plugin, QString _functionName, T0 _t0, T1 _t1)
 call a function in another plugin and get a return parameter More...
 
template<typename ReturnValue , typename T0 , typename T1 , typename T2 >
ReturnValue callFunctionValue (QString _plugin, QString _functionName, T0 _t0, T1 _t1, T2 _t2)
 call a function in another plugin and get a return parameter More...
 
template<typename ReturnValue , typename T0 , typename T1 , typename T2 , typename T3 >
ReturnValue callFunctionValue (QString _plugin, QString _functionName, T0 _t0, T1 _t1, T2 _t2, T3 _t3)
 call a function in another plugin and get a return parameter More...
 
template<typename ReturnValue , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 >
ReturnValue callFunctionValue (QString _plugin, QString _functionName, T0 _t0, T1 _t1, T2 _t2, T3 _t3, T4 _t4)
 call a function in another plugin and get a return parameter More...
 
template<typename ReturnValue , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
ReturnValue callFunctionValue (QString _plugin, QString _functionName, T0 _t0, T1 _t1, T2 _t2, T3 _t3, T4 _t4, T5 _t5)
 call a function in another plugin and get a return parameter More...
 

Detailed Description

Namespace containing RPC helper functions used to call functions across plugins

Usage is described in RPC Interface

Function Documentation

DLLEXPORT QScriptValue RPC::callFunction ( QString  _plugin,
QString  _functionName,
std::vector< QScriptValue >  _parameters 
)

Call a function provided by a plugin getting multiple parameters.

This function gets the parameters which are converted to a QScriptValue on your own.

Parameters
_pluginPlugin name ( Scripting name of the plugin )
_functionNameName of the remote function
_parametersvector of scriptvalues containing the functions parameters in the right order

Definition at line 54 of file RPCWrappers.cc.

DLLEXPORT QScriptValue RPC::callFunction ( QString  _plugin,
QString  _functionName 
)

call a function provided by a plugin

Parameters
_pluginPlugin name ( Scripting name )
_functionNameName of the remote function

Definition at line 76 of file RPCWrappers.cc.

template<typename T0 >
void RPC::callFunction ( QString  _plugin,
QString  _functionName,
T0  _t0 
)

call a function in another plugin

Parameters
_pluginPlugin name ( Scripting name of the plugin )
_functionNameName of the remote function
_t0Parameter passed to the function

Definition at line 133 of file RPCWrappers.hh.

template<typename T0 , typename T1 >
void RPC::callFunction ( QString  _plugin,
QString  _functionName,
T0  _t0,
T1  _t1 
)

call a function in another plugin

Parameters
_pluginPlugin name ( Scripting name of the plugin )
_functionNameName of the remote function
_t0Parameter 1 passed to the function
_t1Parameter 2 passed to the function

Definition at line 165 of file RPCWrappers.hh.

template<typename T0 , typename T1 , typename T2 >
void RPC::callFunction ( QString  _plugin,
QString  _functionName,
T0  _t0,
T1  _t1,
T2  _t2 
)

call a function in another plugin

Parameters
_pluginPlugin name ( Scripting name of the plugin )
_functionNameName of the remote function
_t0Parameter 1 passed to the function
_t1Parameter 2 passed to the function
_t2Parameter 3 passed to the function

Definition at line 182 of file RPCWrappers.hh.

template<typename T0 , typename T1 , typename T2 , typename T3 >
void RPC::callFunction ( QString  _plugin,
QString  _functionName,
T0  _t0,
T1  _t1,
T2  _t2,
T3  _t3 
)

call a function in another plugin

Parameters
_pluginPlugin name ( Scripting name of the plugin )
_functionNameName of the remote function
_t0Parameter 1 passed to the function
_t1Parameter 2 passed to the function
_t2Parameter 3 passed to the function
_t3Parameter 4 passed to the function

Definition at line 201 of file RPCWrappers.hh.

template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 >
void RPC::callFunction ( QString  _plugin,
QString  _functionName,
T0  _t0,
T1  _t1,
T2  _t2,
T3  _t3,
T4  _t4 
)

call a function in another plugin

Parameters
_pluginPlugin name ( Scripting name of the plugin )
_functionNameName of the remote function
_t0Parameter 1 passed to the function
_t1Parameter 2 passed to the function
_t2Parameter 3 passed to the function
_t3Parameter 4 passed to the function
_t4Parameter 5 passed to the function

Definition at line 222 of file RPCWrappers.hh.

template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
void RPC::callFunction ( QString  _plugin,
QString  _functionName,
T0  _t0,
T1  _t1,
T2  _t2,
T3  _t3,
T4  _t4,
T5  _t5 
)

call a function in another plugin

Parameters
_pluginPlugin name ( Scripting name of the plugin )
_functionNameName of the remote function
_t0Parameter 1 passed to the function
_t1Parameter 2 passed to the function
_t2Parameter 3 passed to the function
_t3Parameter 4 passed to the function
_t4Parameter 5 passed to the function
_t5Parameter 6 passed to the function

Definition at line 245 of file RPCWrappers.hh.

template<typename ReturnValue >
ReturnValue RPC::callFunctionValue ( QString  _plugin,
QString  _functionName 
)

call a function in another plugin and get a return parameter

Parameters
_pluginPlugin name ( Scripting name of the plugin )
_functionNameName of the remote function
Returns
value returned by the called function

Definition at line 274 of file RPCWrappers.hh.

template<typename ReturnValue , typename T0 >
ReturnValue RPC::callFunctionValue ( QString  _plugin,
QString  _functionName,
T0  _t0 
)

call a function in another plugin and get a return parameter

Parameters
_pluginPlugin name ( Scripting name of the plugin )
_functionNameName of the remote function
_t0Parameter 1 passed to the function
Returns
value returned by the called function

Definition at line 286 of file RPCWrappers.hh.

template<typename ReturnValue , typename T0 , typename T1 >
ReturnValue RPC::callFunctionValue ( QString  _plugin,
QString  _functionName,
T0  _t0,
T1  _t1 
)

call a function in another plugin and get a return parameter

Parameters
_pluginPlugin name ( Scripting name of the plugin )
_functionNameName of the remote function
_t0Parameter 1 passed to the function
_t1Parameter 2 passed to the function
Returns
value returned by the called function

Definition at line 302 of file RPCWrappers.hh.

template<typename ReturnValue , typename T0 , typename T1 , typename T2 >
ReturnValue RPC::callFunctionValue ( QString  _plugin,
QString  _functionName,
T0  _t0,
T1  _t1,
T2  _t2 
)

call a function in another plugin and get a return parameter

Parameters
_pluginPlugin name ( Scripting name of the plugin )
_functionNameName of the remote function
_t0Parameter 1 passed to the function
_t1Parameter 2 passed to the function
_t2Parameter 3 passed to the function
Returns
value returned by the called function

Definition at line 320 of file RPCWrappers.hh.

template<typename ReturnValue , typename T0 , typename T1 , typename T2 , typename T3 >
ReturnValue RPC::callFunctionValue ( QString  _plugin,
QString  _functionName,
T0  _t0,
T1  _t1,
T2  _t2,
T3  _t3 
)

call a function in another plugin and get a return parameter

Parameters
_pluginPlugin name ( Scripting name of the plugin )
_functionNameName of the remote function
_t0Parameter 1 passed to the function
_t1Parameter 2 passed to the function
_t2Parameter 3 passed to the function
_t3Parameter 4 passed to the function
Returns
value returned by the called function

Definition at line 340 of file RPCWrappers.hh.

template<typename ReturnValue , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 >
ReturnValue RPC::callFunctionValue ( QString  _plugin,
QString  _functionName,
T0  _t0,
T1  _t1,
T2  _t2,
T3  _t3,
T4  _t4 
)

call a function in another plugin and get a return parameter

Parameters
_pluginPlugin name ( Scripting name of the plugin )
_functionNameName of the remote function
_t0Parameter 1 passed to the function
_t1Parameter 2 passed to the function
_t2Parameter 3 passed to the function
_t3Parameter 4 passed to the function
_t4Parameter 5 passed to the function
Returns
value returned by the called function

Definition at line 362 of file RPCWrappers.hh.

template<typename ReturnValue , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
ReturnValue RPC::callFunctionValue ( QString  _plugin,
QString  _functionName,
T0  _t0,
T1  _t1,
T2  _t2,
T3  _t3,
T4  _t4,
T5  _t5 
)

call a function in another plugin and get a return parameter

Parameters
_pluginPlugin name ( Scripting name of the plugin )
_functionNameName of the remote function
_t0Parameter 1 passed to the function
_t1Parameter 2 passed to the function
_t2Parameter 3 passed to the function
_t3Parameter 4 passed to the function
_t4Parameter 5 passed to the function
_t5Parameter 6 passed to the function
Returns
value returned by the called function

Definition at line 386 of file RPCWrappers.hh.

DLLEXPORT QScriptEngine * RPC::getScriptEngine ( )

get a pointer to OpenFlippers core scripting engine

Definition at line 95 of file RPCWrappers.cc.

DLLEXPORT void RPC::setScriptEngine ( QScriptEngine *  _engine)

DONT USE! (Function to set the internal reference to the script Engine)

Function to set the internal reference to the script engine from the core

Definition at line 91 of file RPCWrappers.cc.