Documentation for OpenFLUID 2.2.0
openfluid::fluidx::WareSetDescriptor< T > Class Template Referenceabstract

#include <fluidx/WareSetDescriptor.hpp>

Public Types

typedef std::list< T * > SetDescription_t
 

Public Member Functions

 WareSetDescriptor ()
 
virtual ~WareSetDescriptor ()
 
SetDescription_titems ()
 
const SetDescription_titems () const
 
void setGlobalParameter (const openfluid::ware::WareParamKey_t &Key, const openfluid::ware::WareParamValue_t &Value)
 
void setGlobalParameters (const openfluid::ware::WareParams_t &Params)
 
openfluid::ware::WareParams_t getGlobalParameters () const
 
void eraseGlobalParameter (const openfluid::ware::WareParamKey_t &Key)
 
void appendItem (T *Item)
 
virtual openfluid::ware::WareID_t getID (const T *Item) const =0
 
void setItems (const SetDescription_t &Items)
 
T & itemAt (unsigned int Index) const
 
void insertItem (T *Item, unsigned int Index)
 
void removeItem (unsigned int Index)
 
void moveItem (unsigned int indexFrom, unsigned int indexTo)
 
int findFirstItem (const openfluid::ware::WareID_t &ID) const
 
int findFirstItem (const T *Item) const
 
std::vector< openfluid::ware::WareID_tgetOrderedIDs () const
 
int getItemsCount ()
 

Protected Attributes

SetDescription_t m_SetDescription
 
openfluid::ware::WareParams_t m_Params
 

Member Typedef Documentation

◆ SetDescription_t

template<class T >
typedef std::list<T*> openfluid::fluidx::WareSetDescriptor< T >::SetDescription_t

Constructor & Destructor Documentation

◆ WareSetDescriptor()

template<class T >
openfluid::fluidx::WareSetDescriptor< T >::WareSetDescriptor ( )
inline

◆ ~WareSetDescriptor()

template<class T >
virtual openfluid::fluidx::WareSetDescriptor< T >::~WareSetDescriptor ( )
inlinevirtual

Member Function Documentation

◆ appendItem()

template<class T >
void openfluid::fluidx::WareSetDescriptor< T >::appendItem ( T *  Item)
inline

◆ eraseGlobalParameter()

template<class T >
void openfluid::fluidx::WareSetDescriptor< T >::eraseGlobalParameter ( const openfluid::ware::WareParamKey_t Key)
inline

◆ findFirstItem() [1/2]

template<class T >
int openfluid::fluidx::WareSetDescriptor< T >::findFirstItem ( const openfluid::ware::WareID_t ID) const
inline

Finds the index of the first ware descriptor with the given ID

Parameters
[in]IDthe ID of the searched descriptor
Returns
the index of the searched descriptor, -1 otherwise

◆ findFirstItem() [2/2]

template<class T >
int openfluid::fluidx::WareSetDescriptor< T >::findFirstItem ( const T *  Item) const
inline

Finds the index of the first ware descriptor corresponding to the given descriptor

Parameters
[in]Itemthe searched descriptor
Returns
the index of the searched descriptor, -1 otherwise

◆ getGlobalParameters()

template<class T >
openfluid::ware::WareParams_t openfluid::fluidx::WareSetDescriptor< T >::getGlobalParameters ( ) const
inline

◆ getID()

template<class T >
virtual openfluid::ware::WareID_t openfluid::fluidx::WareSetDescriptor< T >::getID ( const T *  Item) const
pure virtual

Returns the ID of a ware given by a pointer on its descriptor

Parameters
[in]Itemthe pointer to the descriptor
Returns
the ID of the ware

Implemented in openfluid::fluidx::MonitoringDescriptor, and openfluid::fluidx::CoupledModelDescriptor.

◆ getItemsCount()

template<class T >
int openfluid::fluidx::WareSetDescriptor< T >::getItemsCount ( )
inline

Returns the number of ware descriptors in the wares set descriptor

Returns
the number of ware descriptors

◆ getOrderedIDs()

template<class T >
std::vector<openfluid::ware::WareID_t> openfluid::fluidx::WareSetDescriptor< T >::getOrderedIDs ( ) const
inline

Returns an ordered vector of IDs of wares contained in the wares set descriptor

Returns
the vector of IDs

◆ insertItem()

template<class T >
void openfluid::fluidx::WareSetDescriptor< T >::insertItem ( T *  Item,
unsigned int  Index 
)
inline

Inserts a pointer to ware descriptor at a given index in the wares set descriptor

Parameters
[in]Itemthe descriptor to insert
[in]Indexthe index where the descriptor is inserted
Exceptions
openfluid::base::FrameworkExceptionIndex out of bounds

◆ itemAt()

template<class T >
T& openfluid::fluidx::WareSetDescriptor< T >::itemAt ( unsigned int  Index) const
inline

Returns a reference to the ware descriptor at a given index

Parameters
[in]Indexthe given index
Returns
the descriptor
Exceptions
openfluid::base::FrameworkExceptionIndex out of bounds

◆ items() [1/2]

template<class T >
SetDescription_t& openfluid::fluidx::WareSetDescriptor< T >::items ( )
inline

◆ items() [2/2]

template<class T >
const SetDescription_t& openfluid::fluidx::WareSetDescriptor< T >::items ( ) const
inline

◆ moveItem()

template<class T >
void openfluid::fluidx::WareSetDescriptor< T >::moveItem ( unsigned int  indexFrom,
unsigned int  indexTo 
)
inline

Moves a ware descriptor at a given index to another index in the wares set descriptor

Parameters
[in]indexFrominitial index of the descriptor
[in]indexTodestination index of the descriptor
Exceptions
openfluid::base::FrameworkExceptionIndex out of bounds

◆ removeItem()

template<class T >
void openfluid::fluidx::WareSetDescriptor< T >::removeItem ( unsigned int  Index)
inline

Removes the ware descriptor at a given index from the wares set descriptor

Parameters
[in]Indexthe index of the descriptor to remove
Exceptions
openfluid::base::FrameworkExceptionIndex out of bounds

◆ setGlobalParameter()

template<class T >
void openfluid::fluidx::WareSetDescriptor< T >::setGlobalParameter ( const openfluid::ware::WareParamKey_t Key,
const openfluid::ware::WareParamValue_t Value 
)
inline

◆ setGlobalParameters()

template<class T >
void openfluid::fluidx::WareSetDescriptor< T >::setGlobalParameters ( const openfluid::ware::WareParams_t Params)
inline

◆ setItems()

template<class T >
void openfluid::fluidx::WareSetDescriptor< T >::setItems ( const SetDescription_t Items)
inline

Sets the list of pointers to ware descriptors

Parameters
[in]Itemsthe list of pointers to descriptors

Member Data Documentation

◆ m_Params

template<class T >
openfluid::ware::WareParams_t openfluid::fluidx::WareSetDescriptor< T >::m_Params
protected

◆ m_SetDescription

template<class T >
SetDescription_t openfluid::fluidx::WareSetDescriptor< T >::m_SetDescription
protected

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