#include <interface_manager.h>
Public Member Functions | |
template<class T > | |
T * | get () |
Get an interface. | |
std::vector< std::string > | getNames () const |
template<class T > | |
void | registerInterface (T *iface) |
Register an interface. | |
Protected Types | |
typedef std::map< std::string, void * > | InterfaceMap |
Protected Attributes | |
InterfaceMap | interfaces_ |
Definition at line 44 of file interface_manager.h.
typedef std::map<std::string, void*> hardware_interface::InterfaceManager::InterfaceMap [protected] |
Definition at line 107 of file interface_manager.h.
T* hardware_interface::InterfaceManager::get | ( | ) | [inline] |
Get an interface.
Since this class only stores one interface per type, this returns a pointer to the requested interface type. If the interface type is not registered, it will return NULL
.
T | The interface type |
T
or NULL
Definition at line 78 of file interface_manager.h.
std::vector<std::string> hardware_interface::InterfaceManager::getNames | ( | ) | const [inline] |
Definition at line 95 of file interface_manager.h.
void hardware_interface::InterfaceManager::registerInterface | ( | T * | iface | ) | [inline] |
Register an interface.
This associates the name of the type of interface to be registered with the given pointer.
T | The interface type |
iface | A pointer to the interface to store |
Definition at line 57 of file interface_manager.h.
Definition at line 108 of file interface_manager.h.