GlsMenu
|
#include <gls_menu_data.h>
Public Member Functions | |
GlsMenuLine (const std::string &name, std::string *data) | |
GlsMenuLine (const std::string &name, const std::string &initialVal="") | |
virtual | ~GlsMenuLine () |
virtual bool | OkToWrite () |
virtual std::istream & | ReadValue (std::istream &instr) |
virtual void | Attach (std::string *&data) |
virtual bool | ReferTo (std::string &data) |
virtual bool | ValueChanged () |
virtual void | ResetValueChanged () |
virtual std::ostream & | WriteValue (std::ostream &outstr) |
void | SetPrecision (int outputPrecision) |
virtual const std::string & | Value () const |
virtual std::string & | Value () |
virtual void | Value (const std::string &val) |
virtual void | Inc (long amount=1) |
Protected Attributes | |
std::string * | _data |
Storage for the meta-data. More... | |
std::string | _prevValue |
The previous meta-data value. More... | |
bool | _prevValueValid |
Whether or not the previous value should be considered. More... | |
int | _precision |
Allows for setting of precision for floating point numbers. More... | |
The GlsMenuLine class is a string meta-data type that when read from a stream, will consume from current point to the end of line. This differs from a string in that the string will only consume until whitespace is found.
Definition at line 300 of file gls_menu_data.h.
GlsMenuLine::GlsMenuLine | ( | const std::string & | name, |
std::string * | data | ||
) |
Class constructor. Keeps a pointer to the specified type in sync with the simulation meta-data. This will set localStorage to false.
GlsMenuLine::GlsMenuLine | ( | const std::string & | name, |
const std::string & | initialVal = "" |
||
) |
Class constructor. Actually creates storage for the simulation meta-data and initializes the value. This will set localStorage to true.
|
virtual |
Class destructor.
|
virtualinherited |
Attaches an external pointer to the data so that dereferencing the pointer will allow access to the data item's value without performing dictionary lookups and data value retrievals.
|
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 |
Returns false if the string is empty.
|
virtual |
Read the stream until an end of line is encountered.
Reimplemented from GlsMenuData_T< std::string >.
Reimplemented in GlsMenuActionGroup.
|
virtualinherited |
Changes the data item to refer to and use the external variable rather than its own memory. Allows access to the data item's value without performing dictionary lookups and data value retrievals.
|
virtualinherited |
Sets the previous value to the current value.
|
inherited |
Allows for setting of precision for floating point numbers. This is the number of digits to be shown after the decimal point.
|
virtualinherited |
Returns the value of the simulation meta-data.
|
virtualinherited |
Returns a reference value of the simulation meta-data.
|
virtualinherited |
Sets the value of the simulation meta-data.
|
virtualinherited |
Determines if the value has changed since the last call to this method.
|
virtualinherited |
Writes the value to the output stream.
Reimplemented in GlsMenuActionGroup.
|
protectedinherited |
Storage for the meta-data.
Definition at line 220 of file gls_menu_data.h.
|
protectedinherited |
Allows for setting of precision for floating point numbers.
Definition at line 229 of file gls_menu_data.h.
|
protectedinherited |
The previous meta-data value.
Definition at line 223 of file gls_menu_data.h.
|
protectedinherited |
Whether or not the previous value should be considered.
Definition at line 226 of file gls_menu_data.h.