Carma-platform v4.2.0
CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication.
|
An entry manager keeps track of the set of entries and makes it easy to add or remove entries. More...
#include <entry_manager.h>
Public Member Functions | |
EntryManager ()=default | |
Default constructor for EntryManager. More... | |
void | update_entry (const Entry &entry) |
Add a new entry if the given name does not exist. Update an existing entry if the given name exists. More... | |
std::vector< Entry > | get_entries () const |
Get all entries as a list. More... | |
std::vector< std::string > | get_entry_names () const |
Get all entry names as a list. More... | |
boost::optional< Entry > | get_entry_by_name (const std::string &name) const |
Get a entry using name as the key. More... | |
void | delete_entry (const std::string &name) |
Delete an entry using the given name as the key. More... | |
Private Attributes | |
std::unordered_map< std::string, Entry > | entry_map_ |
private map by entry name to keep track of all entries More... | |
An entry manager keeps track of the set of entries and makes it easy to add or remove entries.
Definition at line 29 of file entry_manager.h.
|
default |
Default constructor for EntryManager.
void subsystem_controllers::EntryManager::delete_entry | ( | const std::string & | name | ) |
Delete an entry using the given name as the key.
Definition at line 51 of file entry_manager.cpp.
References entry_map_.
std::vector< Entry > subsystem_controllers::EntryManager::get_entries | ( | ) | const |
Get all entries as a list.
Definition at line 28 of file entry_manager.cpp.
References entry_map_.
Referenced by subsystem_controllers::PluginManager::activate(), subsystem_controllers::PluginManager::cleanup(), subsystem_controllers::PluginManager::configure(), subsystem_controllers::PluginManager::deactivate(), subsystem_controllers::PluginManager::get_active_plugins(), subsystem_controllers::PluginManager::get_control_plugins_by_capability(), subsystem_controllers::PluginManager::get_registered_plugins(), subsystem_controllers::PluginManager::get_strategic_plugins_by_capability(), and subsystem_controllers::PluginManager::get_tactical_plugins_by_capability().
boost::optional< Entry > subsystem_controllers::EntryManager::get_entry_by_name | ( | const std::string & | name | ) | const |
Get a entry using name as the key.
Definition at line 57 of file entry_manager.cpp.
References entry_map_.
Referenced by subsystem_controllers::PluginManager::activate_plugin(), and subsystem_controllers::PluginManager::update_plugin_status().
std::vector< std::string > subsystem_controllers::EntryManager::get_entry_names | ( | ) | const |
Get all entry names as a list.
Definition at line 40 of file entry_manager.cpp.
References entry_map_.
Referenced by subsystem_controllers::PluginManager::shutdown().
void subsystem_controllers::EntryManager::update_entry | ( | const Entry & | entry | ) |
Add a new entry if the given name does not exist. Update an existing entry if the given name exists.
entry | The entry to update or add |
Definition at line 22 of file entry_manager.cpp.
References entry_map_, and subsystem_controllers::Entry::name_.
Referenced by subsystem_controllers::PluginManager::PluginManager(), subsystem_controllers::PluginManager::activate(), subsystem_controllers::PluginManager::activate_plugin(), subsystem_controllers::PluginManager::add_plugin(), subsystem_controllers::PluginManager::cleanup(), subsystem_controllers::PluginManager::configure(), subsystem_controllers::PluginManager::deactivate(), and subsystem_controllers::PluginManager::update_plugin_status().
|
private |
private map by entry name to keep track of all entries
Definition at line 69 of file entry_manager.h.
Referenced by delete_entry(), get_entries(), get_entry_by_name(), get_entry_names(), and update_entry().