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

std::vector< ResourceManagerBase * > interface_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 113 of file interface_manager.h.

Member Typedef Documentation

◆ InterfaceManagerVector

Definition at line 245 of file interface_manager.h.

◆ InterfaceMap

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

Definition at line 244 of file interface_manager.h.

◆ ResourceMap

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

Definition at line 247 of file interface_manager.h.

◆ SizeMap

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

Definition at line 246 of file interface_manager.h.

Member Function Documentation

◆ get()

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 153 of file interface_manager.h.

◆ getInterfaceResources()

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 232 of file interface_manager.h.

◆ getNames()

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

Definition at line 214 of file interface_manager.h.

◆ registerInterface()

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 126 of file interface_manager.h.

◆ registerInterfaceManager()

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

Definition at line 137 of file interface_manager.h.

Member Data Documentation

◆ interface_destruction_list_

std::vector<ResourceManagerBase*> hardware_interface::InterfaceManager::interface_destruction_list_
protected

Definition at line 253 of file interface_manager.h.

◆ interface_managers_

InterfaceManagerVector hardware_interface::InterfaceManager::interface_managers_
protected

Definition at line 251 of file interface_manager.h.

◆ interfaces_

InterfaceMap hardware_interface::InterfaceManager::interfaces_
protected

Definition at line 249 of file interface_manager.h.

◆ interfaces_combo_

InterfaceMap hardware_interface::InterfaceManager::interfaces_combo_
protected

Definition at line 250 of file interface_manager.h.

◆ num_ifaces_registered_

SizeMap hardware_interface::InterfaceManager::num_ifaces_registered_
protected

Definition at line 252 of file interface_manager.h.

◆ resources_

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 255 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 Sun May 10 2020 03:14:46