Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes
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

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

  _plugin | Plugin name ( Scripting name of the plugin )
  _functionName | Name of the remote function
  _parameters | vector of scriptvalues containing the functions parameters in the right order

Definition at line 63 of file RPCWrappers.cc.

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

call a function provided by a plugin

Parameters

  _plugin | Plugin name ( Scripting name )
  _functionName | Name of the remote function

Definition at line 89 of file RPCWrappers.cc.

template<typename T0 >

void RPC::callFunction | ( | QString | _plugin,
|  | QString | _functionName,
|  | T0 | _t0
| ) |  |

call a function in another plugin

Parameters

  _plugin | Plugin name ( Scripting name of the plugin )
  _functionName | Name of the remote function
  _t0 | Parameter passed to the function

Definition at line 140 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

  _plugin | Plugin name ( Scripting name of the plugin )
  _functionName | Name of the remote function
  _t0 | Parameter 1 passed to the function
  _t1 | Parameter 2 passed to the function

Definition at line 172 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

  _plugin | Plugin name ( Scripting name of the plugin )
  _functionName | Name of the remote function
  _t0 | Parameter 1 passed to the function
  _t1 | Parameter 2 passed to the function
  _t2 | Parameter 3 passed to the function

Definition at line 189 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

  _plugin | Plugin name ( Scripting name of the plugin )
  _functionName | Name of the remote function
  _t0 | Parameter 1 passed to the function
  _t1 | Parameter 2 passed to the function
  _t2 | Parameter 3 passed to the function
  _t3 | Parameter 4 passed to the function

Definition at line 208 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

  _plugin | Plugin name ( Scripting name of the plugin )
  _functionName | Name of the remote function
  _t0 | Parameter 1 passed to the function
  _t1 | Parameter 2 passed to the function
  _t2 | Parameter 3 passed to the function
  _t3 | Parameter 4 passed to the function
  _t4 | Parameter 5 passed to the function

Definition at line 229 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

  _plugin | Plugin name ( Scripting name of the plugin )
  _functionName | Name of the remote function
  _t0 | Parameter 1 passed to the function
  _t1 | Parameter 2 passed to the function
  _t2 | Parameter 3 passed to the function
  _t3 | Parameter 4 passed to the function
  _t4 | Parameter 5 passed to the function
  _t5 | Parameter 6 passed to the function

Definition at line 252 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

  _plugin | Plugin name ( Scripting name of the plugin )
  _functionName | Name of the remote function

Returns
  value returned by the called function

Definition at line 281 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

  _plugin | Plugin name ( Scripting name of the plugin )
  _functionName | Name of the remote function
  _t0 | Parameter 1 passed to the function

Returns
  value returned by the called function

Definition at line 293 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

  _plugin | Plugin name ( Scripting name of the plugin )
  _functionName | Name of the remote function
  _t0 | Parameter 1 passed to the function
  _t1 | Parameter 2 passed to the function

Returns
  value returned by the called function

Definition at line 309 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

  _plugin | Plugin name ( Scripting name of the plugin )
  _functionName | Name of the remote function
  _t0 | Parameter 1 passed to the function
  _t1 | Parameter 2 passed to the function
  _t2 | Parameter 3 passed to the function

Returns
  value returned by the called function

Definition at line 327 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

  _plugin | Plugin name ( Scripting name of the plugin )
  _functionName | Name of the remote function
  _t0 | Parameter 1 passed to the function
  _t1 | Parameter 2 passed to the function
  _t2 | Parameter 3 passed to the function
  _t3 | Parameter 4 passed to the function

Returns
  value returned by the called function

Definition at line 347 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

  _plugin | Plugin name ( Scripting name of the plugin )
  _functionName | Name of the remote function
  _t0 | Parameter 1 passed to the function
  _t1 | Parameter 2 passed to the function
  _t2 | Parameter 3 passed to the function
  _t3 | Parameter 4 passed to the function
  _t4 | Parameter 5 passed to the function

Returns
  value returned by the called function

Definition at line 369 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

  _plugin | Plugin name ( Scripting name of the plugin )
  _functionName | Name of the remote function
  _t0 | Parameter 1 passed to the function
  _t1 | Parameter 2 passed to the function
  _t2 | Parameter 3 passed to the function
  _t3 | Parameter 4 passed to the function
  _t4 | Parameter 5 passed to the function
  _t5 | Parameter 6 passed to the function

Returns
  value returned by the called function

Definition at line 393 of file RPCWrappers.hh.

DLLEXPORT QScriptEngine * RPC::getScriptEngine | ( |  | ) |

get a pointer to OpenFlippers core scripting engine

Definition at line 116 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 112 of file RPCWrappers.cc.