GlsMenu
GlsMenuDataFactory Class Reference

#include <gls_menu_data_factory.h>

Inheritance diagram for GlsMenuDataFactory:
GlsMenuData

Data Structures

class  Data
 

Public Member Functions

 GlsMenuDataFactory (const std::string &name, GlsMenuDictionary &dict)
 
virtual ~GlsMenuDataFactory ()
 
virtual std::istream & ReadValue (std::istream &instr)
 
virtual std::ostream & WriteValue (std::ostream &outstr)
 
virtual void Inc (long amount=1)
 

Protected Member Functions

virtual GlsMenuDataCreate (const std::string &name, const std::string &type, std::istream &instr)
 

Protected Attributes

GlsMenuDictionary_dict
 Data dictionary to add items into. More...
 

Detailed Description

The GlsMenuDataFactory class serves as a base class for factories that create instances of meta-data types derived from GlsMenuData (the base class for simulation meta-data). This base class will create many of the standard types, but derived factory classes can add to the types supported.

Supported types: string bool char int unsigned long unsigned_long float double GlsPalette::Color_t GlsMFD::Side_t

Definition at line 76 of file gls_menu_data_factory.h.

Constructor & Destructor Documentation

GlsMenuDataFactory::GlsMenuDataFactory ( const std::string &  name,
GlsMenuDictionary dict 
)

Class constructor.

virtual GlsMenuDataFactory::~GlsMenuDataFactory ( )
inlinevirtual

Class destructor.

Definition at line 92 of file gls_menu_data_factory.h.

Member Function Documentation

virtual GlsMenuData* GlsMenuDataFactory::Create ( const std::string &  name,
const std::string &  type,
std::istream &  instr 
)
protectedvirtual

Creates the specified type of simulation meta-data. Derived classes should override this and call the base class version when they cannot create the specified type.

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().

virtual std::istream& GlsMenuDataFactory::ReadValue ( std::istream &  instr)
virtual

Reads the data types and values from a stream.

virtual std::ostream& GlsMenuDataFactory::WriteValue ( std::ostream &  outstr)
virtual

Override abstract version to do a no-op.

Field Documentation

GlsMenuDictionary& GlsMenuDataFactory::_dict
protected

Data dictionary to add items into.

Definition at line 112 of file gls_menu_data_factory.h.


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