Developer Documentation
RPC Namespace Reference

Classes

class  RPCHelper
 

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

◆ callFunction() [1/8]

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 55 of file RPCWrappers.cc.

◆ callFunction() [2/8]

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 81 of file RPCWrappers.cc.

◆ callFunction() [3/8]

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 132 of file RPCWrappers.hh.

◆ callFunction() [4/8]

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 164 of file RPCWrappers.hh.

◆ callFunction() [5/8]

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 181 of file RPCWrappers.hh.

◆ callFunction() [6/8]

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 200 of file RPCWrappers.hh.

◆ callFunction() [7/8]

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 221 of file RPCWrappers.hh.

◆ callFunction() [8/8]

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 244 of file RPCWrappers.hh.

◆ callFunctionValue() [1/7]

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 273 of file RPCWrappers.hh.

◆ callFunctionValue() [2/7]

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 285 of file RPCWrappers.hh.

◆ callFunctionValue() [3/7]

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 301 of file RPCWrappers.hh.

◆ callFunctionValue() [4/7]

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 319 of file RPCWrappers.hh.

◆ callFunctionValue() [5/7]

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 339 of file RPCWrappers.hh.

◆ callFunctionValue() [6/7]

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 361 of file RPCWrappers.hh.

◆ callFunctionValue() [7/7]

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 385 of file RPCWrappers.hh.

◆ getScriptEngine()

DLLEXPORT QScriptEngine * RPC::getScriptEngine ( )

get a pointer to OpenFlippers core scripting engine

Definition at line 108 of file RPCWrappers.cc.

◆ setScriptEngine()

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 104 of file RPCWrappers.cc.