Class for handling named resources. More...
#include <resource_manager.h>
Public Types | |
typedef ResourceManager< ResourceHandle > | resource_manager_type |
Protected Types | |
typedef std::map< std::string, ResourceHandle > | ResourceMap |
Protected Attributes | |
ResourceMap | resource_map_ |
Non Real-Time Safe Functions | |
virtual | ~ResourceManager () |
std::vector< std::string > | getNames () const |
void | registerHandle (const ResourceHandle &handle) |
Register a new resource. If the resource name already exists, the previously stored resource value will be replaced with val. More... | |
ResourceHandle | getHandle (const std::string &name) |
Get a resource handle by name. More... | |
static void | concatManagers (std::vector< resource_manager_type * > &managers, resource_manager_type *result) |
Combine a list of interfaces into one. More... | |
Additional Inherited Members | |
Public Member Functions inherited from hardware_interface::ResourceManagerBase | |
virtual | ~ResourceManagerBase () |
Class for handling named resources.
Resources are encapsulated inside handle instances, and this class allows to register and get them by name.
ResourceHandle | Resource handle type. Must implement the following method: std::string getName() const; |
Definition at line 69 of file resource_manager.h.
typedef ResourceManager<ResourceHandle> hardware_interface::ResourceManager< ResourceHandle >::resource_manager_type |
Definition at line 72 of file resource_manager.h.
|
protected |
Definition at line 152 of file resource_manager.h.
|
inlinevirtual |
Definition at line 76 of file resource_manager.h.
|
inlinestatic |
Combine a list of interfaces into one.
Every registered handle in each of the managers is registered into the result interface
managers | The list of resource managers to be combined. |
result | The interface where all the handles will be registered. |
Definition at line 136 of file resource_manager.h.
|
inline |
Get a resource handle by name.
name | Resource name. |
Definition at line 115 of file resource_manager.h.
|
inline |
Definition at line 79 of file resource_manager.h.
|
inline |
Register a new resource. If the resource name already exists, the previously stored resource value will be replaced with val.
handle | Resource value. Its type should implement a std::string getName() method. |
Definition at line 95 of file resource_manager.h.
|
protected |
Definition at line 153 of file resource_manager.h.