maliput
MaliputPluginManager Class Reference

Detailed Description

Manages the lifecycle of MaliputPlugins.

Upon creation, it will try to load all the available plugins in path and made them available via GetPlugin().

#include <include/maliput/plugin/maliput_plugin_manager.h>

Public Member Functions

 MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN (MaliputPluginManager)
 
 MaliputPluginManager ()
 Constructs a MaliputPluginManager. More...
 
const MaliputPluginGetPlugin (const MaliputPlugin::Id &id) const
 Get a pointer to an already loaded plugin. More...
 
void AddPlugin (const std::string &path_to_plugin)
 Loads a new plugin. More...
 
std::unordered_map< MaliputPlugin::Id, MaliputPluginTypeListPlugins () const
 

Constructor & Destructor Documentation

◆ MaliputPluginManager()

Constructs a MaliputPluginManager.

It looks for plugins in the paths that are described in the environment variable called MALIPUT_PLUGIN_PATH. Plugins will not be loaded twice and their uniqueness is determined by their id. When a duplicate is found, the most recently found plugin prevails.

Member Function Documentation

◆ AddPlugin()

void AddPlugin ( const std::string &  path_to_plugin)

Loads a new plugin.

If a plugin with the same id was already loaded then it is replaced by the new one.

Parameters
path_to_pluginPath to new the plugin.

◆ GetPlugin()

const MaliputPlugin * GetPlugin ( const MaliputPlugin::Id id) const

Get a pointer to an already loaded plugin.

Parameters
idIs the MaliputPlugin::Id of the plugin to get.
Returns
A MaliputPlugin pointer to the requested plugin. Returns nullptr when the plugin wasn't found.

◆ ListPlugins()

std::unordered_map< MaliputPlugin::Id, MaliputPluginType > ListPlugins ( ) const
Returns
A vector with the MaliputPlugin::Id of the loaded plugins.

◆ MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN()

MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN ( MaliputPluginManager  )

The documentation for this class was generated from the following files: