Public Member Functions | Protected Attributes | List of all members
openfluid::fluidx::AdvancedWareSetDescriptor< M, I > Class Template Referenceabstract

#include <fluidx/AdvancedWareSetDescriptor.hpp>

Collaboration diagram for openfluid::fluidx::AdvancedWareSetDescriptor< M, I >:
Collaboration graph
[legend]

Public Member Functions

 AdvancedWareSetDescriptor (M &Desc)
 
virtual ~AdvancedWareSetDescriptor ()
 
virtual void check ()=0
 
virtual openfluid::ware::WareID_t getID (I *Item) const =0
 
const std::list< I * > & items () const
 
void setItems (const std::list< I * > &Items)
 
I & itemAt (unsigned int Index) const
 
void appendItem (I *Item)
 
void insertItem (I *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 I *Item) const
 
std::vector< openfluid::ware::WareID_tgetOrderedIDs () const
 
int getItemsCount ()
 
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)
 

Protected Attributes

M * mp_Descriptor
 

Constructor & Destructor Documentation

template<class M, class I>
openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::AdvancedWareSetDescriptor ( M &  Desc)
inline
template<class M, class I>
virtual openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::~AdvancedWareSetDescriptor ( )
inlinevirtual

Member Function Documentation

template<class M, class I>
void openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::appendItem ( I *  Item)
inline

Appends a pointer to ware descriptor at the end of the wares set descriptor

Parameters
[in]Itemthe descriptor to add
template<class M, class I>
virtual void openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::check ( )
pure virtual
template<class M, class I>
void openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::eraseGlobalParameter ( const openfluid::ware::WareParamKey_t Key)
inline
template<class M, class I>
int openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::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
template<class M, class I>
int openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::findFirstItem ( const I *  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
template<class M, class I>
openfluid::ware::WareParams_t openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::getGlobalParameters ( ) const
inline
template<class M, class I>
virtual openfluid::ware::WareID_t openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::getID ( I *  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::AdvancedMonitoringDescriptor, and openfluid::fluidx::AdvancedModelDescriptor.

template<class M, class I>
int openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::getItemsCount ( )
inline

Returns the number of ware descriptors in the wares set descriptor

Returns
the number of ware descriptors
template<class M, class I>
std::vector<openfluid::ware::WareID_t> openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::getOrderedIDs ( ) const
inline

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

Returns
the vector of IDs
template<class M, class I>
void openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::insertItem ( I *  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
template<class M, class I>
I& openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::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
template<class M, class I>
const std::list<I*>& openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::items ( ) const
inline

Returns a const reference to the list of pointers to ware descriptors

Returns
the list of pointers to descriptors
template<class M, class I>
void openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::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
template<class M, class I>
void openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::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
template<class M, class I>
void openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::setGlobalParameter ( const openfluid::ware::WareParamKey_t Key,
const openfluid::ware::WareParamValue_t Value 
)
inline
template<class M, class I>
void openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::setGlobalParameters ( const openfluid::ware::WareParams_t Params)
inline
template<class M, class I>
void openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::setItems ( const std::list< I * > &  Items)
inline

Sets the list of pointers to ware descriptors

Parameters
[in]Itemsthe list of pointers to descriptors

Member Data Documentation

template<class M, class I>
M* openfluid::fluidx::AdvancedWareSetDescriptor< M, I >::mp_Descriptor
protected

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