Developer Documentation
Loading...
Searching...
No Matches
RPC Namespace Reference

Functions

Call functions across plugins (simple calls)

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

void callFunctionQVariant (const QString &_plugin, const QString &_functionName, const std::vector< QVariant > &_parameters, QGenericReturnArgument _returnArg=QGenericReturnArgument())
 Call a function provided by a plugin getting multiple parameters as a vector of qvariants.
 
Call functions across plugins

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

void callFunction (QString _plugin, QString _functionName)
 call a function in another plugin
 
template<class... Ts>
void callFunction (QString _plugin, QString _functionName, Ts const &... args)
 call a function in another plugin
 
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
 
template<typename ReturnValue , class... Ts>
ReturnValue callFunctionValue (QString _plugin, QString _functionName, Ts const &... args)
 call a function in another plugin and get a return parameter
 

Detailed Description

Namespace containing RPC helper functions used to call functions across plugins

Usage is described in RPC Interface

Function Documentation

◆ callFunction() [1/2]

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

call a function in another plugin

Parameters
_pluginPlugin name ( Scripting name of the plugin )
_functionNameName of the remote function
argsVariable number of call arguments

Definition at line 129 of file RPCWrappers.cc.

◆ callFunction() [2/2]

template<class... Ts>
void RPC::callFunction ( QString  _plugin,
QString  _functionName,
Ts const &...  args 
)

call a function in another plugin

Parameters
_pluginPlugin name ( Scripting name of the plugin )
_functionNameName of the remote function
argsVariable number of call arguments

Definition at line 104 of file RPCWrappers.hh.

◆ callFunctionQVariant()

DLLEXPORT void RPC::callFunctionQVariant ( const QString &  _plugin,
const QString &  _functionName,
const std::vector< QVariant > &  _parameters,
QGenericReturnArgument  _returnArg = QGenericReturnArgument() 
)

Call a function provided by a plugin getting multiple parameters as a vector of qvariants.

This function will be used to call functions in other plugins and the core.

Parameters
_pluginPlugin name ( Scripting name of the plugin )
_functionNameName of the remote function
_returnArgPossibl return argument. Can be empty ( use default constructor to generate it
_parametersvector of QVariants containing the functions parameters in the right order

Definition at line 54 of file RPCWrappers.cc.

◆ callFunctionValue() [1/2]

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

◆ callFunctionValue() [2/2]

template<typename ReturnValue , class... Ts>
ReturnValue RPC::callFunctionValue ( QString  _plugin,
QString  _functionName,
Ts const &...  args 
)

call a function in another plugin and get a return parameter

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

Definition at line 160 of file RPCWrappers.hh.