maliput
|
MaliputPlugin loads a dynamic library.
After construction, the id and type of the plugin are provided. Via MaliputPlugin::ExecuteSymbol() functions can be run from the library. It is thought to be the entry point of the plugin. Specific plugin implementations would specialize the template invocation with the necessary types so the functionality for the plugin can be achieved.
To be considered a maliput plugin, the following two functions must be defined:
ubsan
(undefined behavior sanitizer) the property ENABLE_EXPORTS
should be enabled on the executable target in order to instruct the linker to add all symbols to the dynamic symbol table. For further information see next link. #include <include/maliput/plugin/maliput_plugin.h>
Public Types | |
using | Id = api::TypeSpecificIdentifier< class MaliputPlugin > |
Persistent identifier for a MaliputPlugin element. More... | |
Public Member Functions | |
MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN (MaliputPlugin) | |
MaliputPlugin (const std::string &path_to_lib) | |
Constructs a MaliputPlugin. More... | |
MaliputPlugin ()=delete | |
std::string | GetId () const |
MaliputPluginType | GetType () const |
template<typename ReturnType , typename... Args> | |
ReturnType | ExecuteSymbol (const std::string &sym_name, Args &&... args) const |
Finds and executes a symbol loaded by the plugin library. More... | |
using Id = api::TypeSpecificIdentifier<class MaliputPlugin> |
Persistent identifier for a MaliputPlugin element.
MaliputPlugin | ( | const std::string & | path_to_lib | ) |
Constructs a MaliputPlugin.
path_to_lib | Path to the library. |
maliput::common::assertion_error | When path_to_lib is empty. |
|
delete |
ReturnType ExecuteSymbol | ( | const std::string & | sym_name, |
Args &&... | args | ||
) | const |
Finds and executes a symbol loaded by the plugin library.
ReturnType | The return type of the symbol that is executed. |
Args | Types of the argument list. |
sym_name | Name of the symbol to execute. |
args | Argument list for the symbol call. |
maliput::common::assertion_error | When sym_name is not found. |
std::string GetId | ( | ) | const |
MaliputPluginType GetType | ( | ) | const |
MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN | ( | MaliputPlugin | ) |