#include <interface_manager.h>
Public Member Functions | |
template<class T > | |
T * | get () |
Get an interface. | |
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 95 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.
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 96 of file interface_manager.h.