GlsMenu
GlsMenuDataMap_T< MapT > Class Template Reference

#include <gls_menu_data.h>

Inheritance diagram for GlsMenuDataMap_T< MapT >:
GlsMenuData

Public Member Functions

 GlsMenuDataMap_T (const std::string &name, MapT *map, GlsFunctor_T< GlsMenuData * > &CreateFunction)
 
 GlsMenuDataMap_T (const std::string &name, GlsFunctor_T< GlsMenuData * > &CreateFunction)
 
virtual ~GlsMenuDataMap_T ()
 
virtual std::ostream & WriteValue (std::ostream &outstr)
 
virtual std::istream & ReadValue (std::istream &instr)
 
virtual void Inc (long amount=1)
 

Protected Attributes

MapT * _dataMap
 Map Storage for the meta-data. More...
 
GlsFunctor_T< GlsMenuData * > & CreateDataItem
 Functor that creates new data items. More...
 

Detailed Description

template<class MapT>
class GlsMenuDataMap_T< MapT >

The GlsMenuDataMap_T provides a fully functional templatized map container type to hold menu meta-data.

Definition at line 487 of file gls_menu_data.h.

Constructor & Destructor Documentation

template<class MapT >
GlsMenuDataMap_T< MapT >::GlsMenuDataMap_T ( const std::string &  name,
MapT *  map,
GlsFunctor_T< GlsMenuData * > &  CreateFunction 
)

Class constructor. Keeps a pointer to the specified type in sync with the simulation meta-data. This will set localStorage to false.

template<class MapT >
GlsMenuDataMap_T< MapT >::GlsMenuDataMap_T ( const std::string &  name,
GlsFunctor_T< GlsMenuData * > &  CreateFunction 
)

Class constructor. Actually creates storage for the simulation meta-data but will not initialize the value. This will set localStorage to true.

template<class MapT >
virtual GlsMenuDataMap_T< MapT >::~GlsMenuDataMap_T ( )
virtual

Class destructor.

Member Function Documentation

virtual void GlsMenuData::Inc ( long  amount = 1)
virtualinherited

Increment the data item. Derived classes must override this as the default is a no-op.

Reimplemented in GlsMenuDiscrete_T< T >.

Referenced by GlsMenuSet_T< MenuType_t, DataFactory_t >::IncData().

template<class MapT >
virtual std::istream& GlsMenuDataMap_T< MapT >::ReadValue ( std::istream &  instr)
virtual

Reads the value from the input stream. The ReadValue call shall consume only what it needs. It is the responsibility of the calling function to read to the end of line, or to clean up from a bad read. The calling function will also ensure that the data starts as the next byte in the stream.

template<class MapT >
virtual std::ostream& GlsMenuDataMap_T< MapT >::WriteValue ( std::ostream &  outstr)
virtual

Writes the value to the output stream.

Field Documentation

template<class MapT >
MapT* GlsMenuDataMap_T< MapT >::_dataMap
protected

Map Storage for the meta-data.

Definition at line 539 of file gls_menu_data.h.

template<class MapT >
GlsFunctor_T<GlsMenuData*>& GlsMenuDataMap_T< MapT >::CreateDataItem
protected

Functor that creates new data items.

Definition at line 542 of file gls_menu_data.h.


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