This class implements the first level interpretor to control basic functionnalities of the plugins. More...
Public Member Functions | |
InterpreterHelper () | |
Default constructor. | |
Implements the commands. | |
void | cmdNew (const std::string &className, const std::string &objName, std::ostream &os) |
Instanciante an object Extracts the name and the class of the object, verifies it is unique, and creates the instance if this is the case. | |
void | cmdDestroy (const std::string &objName, std::ostream &os) |
Destroy the object. Destroy the object objName. | |
void | cmdPlug (const std::string &obj1, const std::string &signame1, const std::string &obj2, const std::string &signame2, std::ostream &os) |
Connect two signals. Connect the input signal obj1.signame1 to the output signal obj2.signame2. | |
void | cmdLoadPlugin (const std::string &directory, const std::string &pluginName, std::ostream &os) |
Load a dynamic library which includes a plugin. Extracts the name first and the directory in second from cmdArg to load the dynamic library. | |
void | cmdUnloadPlugin (const std::string &pluginName, std::ostream &os) |
Unload a dynamic library which includes a plugin. Extracts the name to unload the dynamic library. | |
void | cmdSetSignal (const std::string &objname, const std::string &signame, const std::string &cmdArg, std::ostream &os) |
Set a signal <obj.signal> to a value with cmdArg = "<obj.signal> <value>". | |
void | cmdGetSignal (const std::string &objname, const std::string &signame, std::ostream &os) |
Display the value of the signal <obj.signal> with cmdArg = "<obj.signal>". | |
void | cmdComputeSignal (const std::string &objname, const std::string &signame, const int &time, std::ostream &os) |
Compute the value of the signal <obj.signal> at time <time> with cmdArg = "<obj.signal> <time>". | |
Protected Attributes | |
PluginLoader | dlPtr |
The plugin loader. |
This class implements the first level interpretor to control basic functionnalities of the plugins.
It provides a shell allowing to :
dynamicgraph::InterpreterHelper::InterpreterHelper | ( | ) |
Default constructor.
void dynamicgraph::InterpreterHelper::cmdComputeSignal | ( | const std::string & | objname, | |
const std::string & | signame, | |||
const int & | time, | |||
std::ostream & | os | |||
) |
Compute the value of the signal <obj.signal> at time <time> with cmdArg = "<obj.signal> <time>".
void dynamicgraph::InterpreterHelper::cmdDestroy | ( | const std::string & | objName, | |
std::ostream & | os | |||
) |
Destroy the object. Destroy the object objName.
void dynamicgraph::InterpreterHelper::cmdGetSignal | ( | const std::string & | objname, | |
const std::string & | signame, | |||
std::ostream & | os | |||
) |
Display the value of the signal <obj.signal> with cmdArg = "<obj.signal>".
void dynamicgraph::InterpreterHelper::cmdLoadPlugin | ( | const std::string & | directory, | |
const std::string & | pluginName, | |||
std::ostream & | os | |||
) |
Load a dynamic library which includes a plugin. Extracts the name first and the directory in second from cmdArg to load the dynamic library.
void dynamicgraph::InterpreterHelper::cmdNew | ( | const std::string & | className, | |
const std::string & | objName, | |||
std::ostream & | os | |||
) |
Instanciante an object Extracts the name and the class of the object, verifies it is unique, and creates the instance if this is the case.
void dynamicgraph::InterpreterHelper::cmdPlug | ( | const std::string & | obj1, | |
const std::string & | signame1, | |||
const std::string & | obj2, | |||
const std::string & | signame2, | |||
std::ostream & | os | |||
) |
Connect two signals. Connect the input signal obj1.signame1 to the output signal obj2.signame2.
[in] | obj1.signame1,: | the input signal. |
[in] | obj2.signame2,: | the output signal. |
void dynamicgraph::InterpreterHelper::cmdSetSignal | ( | const std::string & | objname, | |
const std::string & | signame, | |||
const std::string & | cmdArg, | |||
std::ostream & | os | |||
) |
Set a signal <obj.signal> to a value with cmdArg = "<obj.signal> <value>".
void dynamicgraph::InterpreterHelper::cmdUnloadPlugin | ( | const std::string & | pluginName, | |
std::ostream & | os | |||
) |
Unload a dynamic library which includes a plugin. Extracts the name to unload the dynamic library.
PluginLoader dynamicgraph::InterpreterHelper::dlPtr [protected] |
The plugin loader.