Documentation for OpenFLUID 2.2.0
openfluid::machine::WareRegistry< SignatureType > Class Template Referenceabstract

#include <machine/WareRegistry.hpp>

Public Types

using WaresByID_t = std::map< openfluid::ware::WareID_t, WareContainer< SignatureType > >
 
using WaresByPath_t = std::map< std::string, WareContainer< SignatureType > >
 

Public Member Functions

virtual bool addWare (const openfluid::ware::WareID_t &ID)=0
 
virtual void discoverWares (const std::string IDPattern)=0
 
void clearWares ()
 
const WareContainer< SignatureType > & wareContainer (const openfluid::ware::WareID_t &ID) const
 
const WaresByID_tavailableWares () const
 
const WaresByPath_terroredWares () const
 
bool hasAvailableWare (const openfluid::ware::WareID_t &ID) const
 
virtual void clear ()=0
 

Protected Member Functions

virtual ~WareRegistry ()
 
bool add (WareContainer< SignatureType > Container)
 

Protected Attributes

WaresByID_t m_AvailableWares
 
WaresByPath_t m_ErroredWares
 
WareContainer< SignatureType > m_InvalidWareContainer
 

Member Typedef Documentation

◆ WaresByID_t

template<class SignatureType >
using openfluid::machine::WareRegistry< SignatureType >::WaresByID_t = std::map<openfluid::ware::WareID_t,WareContainer<SignatureType> >

Container type to store ware containers indexed by ID

◆ WaresByPath_t

template<class SignatureType >
using openfluid::machine::WareRegistry< SignatureType >::WaresByPath_t = std::map<std::string,WareContainer<SignatureType> >

Container type to store ware containers indexed by path

Constructor & Destructor Documentation

◆ ~WareRegistry()

template<class SignatureType >
virtual openfluid::machine::WareRegistry< SignatureType >::~WareRegistry ( )
inlineprotectedvirtual

Member Function Documentation

◆ add()

template<class SignatureType >
bool openfluid::machine::WareRegistry< SignatureType >::add ( WareContainer< SignatureType >  Container)
inlineprotected

Adds a container in the registry, as an available or errored ware

Parameters
[in]Containerthe container to add
Returns
true if the container was successfully added, false otherwise

◆ addWare()

template<class SignatureType >
virtual bool openfluid::machine::WareRegistry< SignatureType >::addWare ( const openfluid::ware::WareID_t ID)
pure virtual

◆ availableWares()

template<class SignatureType >
const WaresByID_t& openfluid::machine::WareRegistry< SignatureType >::availableWares ( ) const
inline

Returns the available wares, indexed by ID

Returns
an ID-container map of wares

◆ clear()

template<class SignatureType >
virtual void openfluid::machine::WareRegistry< SignatureType >::clear ( )
pure virtual

◆ clearWares()

template<class SignatureType >
void openfluid::machine::WareRegistry< SignatureType >::clearWares ( )
inline

Clear all wares containers from the registry

◆ discoverWares()

template<class SignatureType >
virtual void openfluid::machine::WareRegistry< SignatureType >::discoverWares ( const std::string  IDPattern)
pure virtual

◆ erroredWares()

template<class SignatureType >
const WaresByPath_t& openfluid::machine::WareRegistry< SignatureType >::erroredWares ( ) const
inline

Returns the errored wares, indexed by path

Returns
a path-container map of wares

◆ hasAvailableWare()

template<class SignatureType >
bool openfluid::machine::WareRegistry< SignatureType >::hasAvailableWare ( const openfluid::ware::WareID_t ID) const
inline

Returns true if a ware has been already registered with the given ID

Parameters
[in]IDThe ID of the ware
Returns
true if the ware is registered

◆ wareContainer()

template<class SignatureType >
const WareContainer<SignatureType>& openfluid::machine::WareRegistry< SignatureType >::wareContainer ( const openfluid::ware::WareID_t ID) const
inline

Returns the container of the ware given by its ID

Parameters
[in]IDThe ID of the ware
Returns
The container of the requested ware, an invalid container if not found

Member Data Documentation

◆ m_AvailableWares

template<class SignatureType >
WaresByID_t openfluid::machine::WareRegistry< SignatureType >::m_AvailableWares
protected

◆ m_ErroredWares

template<class SignatureType >
WaresByPath_t openfluid::machine::WareRegistry< SignatureType >::m_ErroredWares
protected

◆ m_InvalidWareContainer

template<class SignatureType >
WareContainer<SignatureType> openfluid::machine::WareRegistry< SignatureType >::m_InvalidWareContainer
protected

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