Public Member Functions | Protected Types | Protected Attributes | List of all members
hardware_interface::InterfaceManager Class Reference

#include <interface_manager.h>

Inheritance diagram for hardware_interface::InterfaceManager:
Inheritance graph
[legend]

Public Member Functions

template<class T >
T * get ()
 Get an interface. More...
 
std::vector< std::string > getInterfaceResources (std::string iface_type) const
 Get the resource names registered to an interface, specified by type (as this class only stores one interface per type) More...
 
std::vector< std::string > getNames () const
 
template<class T >
void registerInterface (T *iface)
 Register an interface. More...
 
void registerInterfaceManager (InterfaceManager *iface_man)
 

Protected Types

typedef std::vector< InterfaceManager * > InterfaceManagerVector
 
typedef std::map< std::string, void * > InterfaceMap
 
typedef std::map< std::string, std::vector< std::string > > ResourceMap
 
typedef std::map< std::string, size_t > SizeMap
 

Protected Attributes

boost::ptr_vector< ResourceManagerBaseinterface_destruction_list_
 
InterfaceManagerVector interface_managers_
 
InterfaceMap interfaces_
 
InterfaceMap interfaces_combo_
 
SizeMap num_ifaces_registered_
 
ResourceMap resources_
 This will allow us to check the resources based on the demangled type name of the interface. More...
 

Detailed Description

Definition at line 116 of file interface_manager.h.

Member Typedef Documentation

Definition at line 249 of file interface_manager.h.

typedef std::map<std::string, void*> hardware_interface::InterfaceManager::InterfaceMap
protected

Definition at line 248 of file interface_manager.h.

typedef std::map<std::string, std::vector<std::string> > hardware_interface::InterfaceManager::ResourceMap
protected

Definition at line 251 of file interface_manager.h.

typedef std::map<std::string, size_t> hardware_interface::InterfaceManager::SizeMap
protected

Definition at line 250 of file interface_manager.h.

Member Function Documentation

template<class T >
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.

Template Parameters
TThe interface type
Returns
A pointer to the stored interface of type T or NULL

Definition at line 156 of file interface_manager.h.

std::vector<std::string> hardware_interface::InterfaceManager::getInterfaceResources ( std::string  iface_type) const
inline

Get the resource names registered to an interface, specified by type (as this class only stores one interface per type)

Parameters
iface_typeA string with the demangled type name of the interface
Returns
A vector of resource names registered to this interface

Definition at line 236 of file interface_manager.h.

std::vector<std::string> hardware_interface::InterfaceManager::getNames ( ) const
inline
Returns
Vector of interface names registered to this instance.

Definition at line 218 of file interface_manager.h.

template<class T >
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.

Template Parameters
TThe interface type
Parameters
ifaceA pointer to the interface to store

Definition at line 129 of file interface_manager.h.

void hardware_interface::InterfaceManager::registerInterfaceManager ( InterfaceManager iface_man)
inline

Definition at line 140 of file interface_manager.h.

Member Data Documentation

boost::ptr_vector<ResourceManagerBase> hardware_interface::InterfaceManager::interface_destruction_list_
protected

Definition at line 257 of file interface_manager.h.

InterfaceManagerVector hardware_interface::InterfaceManager::interface_managers_
protected

Definition at line 255 of file interface_manager.h.

InterfaceMap hardware_interface::InterfaceManager::interfaces_
protected

Definition at line 253 of file interface_manager.h.

InterfaceMap hardware_interface::InterfaceManager::interfaces_combo_
protected

Definition at line 254 of file interface_manager.h.

SizeMap hardware_interface::InterfaceManager::num_ifaces_registered_
protected

Definition at line 256 of file interface_manager.h.

ResourceMap hardware_interface::InterfaceManager::resources_
protected

This will allow us to check the resources based on the demangled type name of the interface.

Definition at line 259 of file interface_manager.h.


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


hardware_interface
Author(s): Wim Meeussen, Adolfo Rodriguez Tsouroukdissian
autogenerated on Fri Jun 7 2019 22:00:03