#include <vlnamevaluepair.h>
Inheritance diagram for vlNameValuePair< DataType >:

Public Member Functions | |
| vlNameValuePair (const DataType &def, const std::string &name, const std::string &desc, const bool valid=true) | |
| Default constructor. | |
| vlNameValuePair (const DataType &def, const std::list< DataType > &validValues, const std::string &name, const std::string &desc, const bool valid=true) | |
| Constructor which allows you to specify a set of valid values. | |
| vlNameValuePair (const DataType &def, const DataType &lowerBound, const DataType &upperBound, const std::string &name, const std::string &desc, const bool valid=true) | |
| Constructor which allows you to specify a valid value range for the variable. | |
| ~vlNameValuePair () | |
| Desctructor. | |
| DataType | get () const |
| Returns the value of the variable. | |
| const DataType * | getPtr () const |
| Returns a const pointer to the value. | |
| DataType * | getPtrRW () |
| Returns a non-const pointer to the value. | |
| const std::list< DataType > * | getValidValues () const |
| Returns the list of valid values for the variable. | |
| const std::pair< DataType, DataType > * | getValidRange () const |
| Returns the range of valid values for the variable. | |
| void | set (const DataType &value) |
| Sets the value for the variable. | |
| void | setValidValues (const std::list< DataType > &validList) |
| Sets a list of valid values for the the variable. | |
| void | setValidRange (const DataType &lowerBound, const DataType &upperBound) |
| Sets a range that is valid for the variable. | |
| void | resetValidValues () const |
| Resets the valid values. | |
| void | resetValidRange () const |
| Resets the valid value range. | |
| std::string | name () const |
| Returns the short name of the variable. | |
| std::string | desc () const |
| Returns the description of the variable. | |
| const char * | typeInfo () const |
| Returns the typeinfo name of the datatype. | |
| bool | isDirty () const |
| Returns true if data is dirty. | |
| void | resetDirty () |
| Reset the dirty flag. | |
| bool | isValid () const |
| Returns the state of the valid flag. | |
| void | setValid (bool valid=true) |
| Sets the state of the valid flag. | |
| vlNameValuePairBase * | copySelf () const |
| Provide a copy of self. | |
Private Attributes | |
| DataType | m_value |
| Value stored. | |
| std::list< DataType > | m_validValues |
| Optional list of valid values for this variable. | |
| std::pair< DataType, DataType > | m_validRange |
| Optional range of valid values for this variable. | |
| std::string | m_name |
| Single word, short name for the variable. | |
| std::string | m_desc |
| Some description of the variable. | |
| bool | m_dirty |
| Dirty bit for the data. | |
| bool | m_valid |
| Set to true if the data is (logically) valid. | |
| bool | m_validRangeSet |
| Set to true when a valid range is set. | |
Definition at line 105 of file vlnamevaluepair.h.
|
||||||||||||||||||||||||
|
Definition at line 253 of file vlnamevaluepair.h. References name. |
|
||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||
|
|
|
|||||||||
|
Definition at line 297 of file vlnamevaluepair.h. |
|
|||||||||
|
Implements vlNameValuePairBase. Definition at line 304 of file vlnamevaluepair.h. References vlNameValuePair< DataType >::m_desc, vlNameValuePair< DataType >::m_name, vlNameValuePair< DataType >::m_value, and vlNameValuePair< DataType >::resetDirty(). |
|
|||||||||
|
Implements vlNameValuePairBase. Definition at line 190 of file vlnamevaluepair.h. References vlNameValuePair< DataType >::m_desc. |
|
|||||||||
|
Definition at line 126 of file vlnamevaluepair.h. References vlNameValuePair< DataType >::m_value. Referenced by vlVarList::get(). |
|
|||||||||
|
Definition at line 129 of file vlnamevaluepair.h. References vlNameValuePair< DataType >::m_value. Referenced by vlVarList::getPtr(). |
|
|||||||||
|
Definition at line 132 of file vlnamevaluepair.h. References vlNameValuePair< DataType >::m_value. Referenced by vlVarList::getPtrRW(). |
|
|||||||||
|
Definition at line 144 of file vlnamevaluepair.h. References vlNameValuePair< DataType >::m_validRange, and vlNameValuePair< DataType >::m_validRangeSet. Referenced by vlVarList::getValidRange(). |
|
|||||||||
|
Definition at line 135 of file vlnamevaluepair.h. References vlNameValuePair< DataType >::m_validValues. Referenced by vlVarList::getValidValues(). |
|
|||||||||
|
The dirty bit is set with every call to set() and is reset every time get() is called. This can be used to track modifications to the data.
Implements vlNameValuePairBase. Definition at line 206 of file vlnamevaluepair.h. References vlNameValuePair< DataType >::m_dirty. |
|
|||||||||
|
This valid flag indicates if the data is logically valid. The setting and resetting of this flag is thus in the hands of the user. By default, it is set to true. Implements vlNameValuePairBase. Definition at line 216 of file vlnamevaluepair.h. References vlNameValuePair< DataType >::m_valid. Referenced by vlVarList::get(), vlVarList::getPtr(), and vlVarList::getPtrRW(). |
|
|||||||||
|
Implements vlNameValuePairBase. Definition at line 187 of file vlnamevaluepair.h. References vlNameValuePair< DataType >::m_name. |
|
|||||||||
|
Implements vlNameValuePairBase. Definition at line 209 of file vlnamevaluepair.h. References vlNameValuePair< DataType >::m_dirty. Referenced by vlNameValuePair< DataType >::copySelf(). |
|
|||||||||
|
Definition at line 184 of file vlnamevaluepair.h. References vlNameValuePair< DataType >::m_validRangeSet. Referenced by vlNameValuePair< DataType >::setValidValues(). |
|
|||||||||
|
Definition at line 181 of file vlnamevaluepair.h. References vlNameValuePair< DataType >::m_validValues. Referenced by vlNameValuePair< DataType >::setValidRange(). |
|
||||||||||
|
Definition at line 158 of file vlnamevaluepair.h. References vlNameValuePair< DataType >::m_dirty, and vlNameValuePair< DataType >::m_value. Referenced by vlVarList::set(). |
|
||||||||||
|
Implements vlNameValuePairBase. Definition at line 219 of file vlnamevaluepair.h. References vlNameValuePair< DataType >::m_valid. Referenced by vlVarList::set(). |
|
||||||||||||||||
|
Definition at line 174 of file vlnamevaluepair.h. References vlNameValuePair< DataType >::m_validRange, vlNameValuePair< DataType >::m_validRangeSet, and vlNameValuePair< DataType >::resetValidValues(). |
|
||||||||||
|
Definition at line 163 of file vlnamevaluepair.h. References vlNameValuePair< DataType >::m_validValues, and vlNameValuePair< DataType >::resetValidRange(). |
|
|||||||||
|
This is the best way to compare all datatypes. Note that datatype names are not constant across compilers. Implements vlNameValuePairBase. Definition at line 197 of file vlnamevaluepair.h. |
|
|||||
|
Definition at line 238 of file vlnamevaluepair.h. Referenced by vlNameValuePair< DataType >::copySelf(), and vlNameValuePair< DataType >::desc(). |
|
|||||
|
Definition at line 241 of file vlnamevaluepair.h. Referenced by vlNameValuePair< DataType >::isDirty(), vlNameValuePair< DataType >::resetDirty(), and vlNameValuePair< DataType >::set(). |
|
|||||
|
Definition at line 235 of file vlnamevaluepair.h. Referenced by vlNameValuePair< DataType >::copySelf(), and vlNameValuePair< DataType >::name(). |
|
|||||
|
Definition at line 244 of file vlnamevaluepair.h. Referenced by vlNameValuePair< DataType >::isValid(), and vlNameValuePair< DataType >::setValid(). |
|
|||||
|
Definition at line 232 of file vlnamevaluepair.h. Referenced by vlNameValuePair< DataType >::getValidRange(), and vlNameValuePair< DataType >::setValidRange(). |
|
|||||
|
Definition at line 247 of file vlnamevaluepair.h. Referenced by vlNameValuePair< DataType >::getValidRange(), vlNameValuePair< DataType >::resetValidRange(), and vlNameValuePair< DataType >::setValidRange(). |
|
|||||
|
Definition at line 229 of file vlnamevaluepair.h. Referenced by vlNameValuePair< DataType >::getValidValues(), vlNameValuePair< DataType >::resetValidValues(), and vlNameValuePair< DataType >::setValidValues(). |
|
|||||
|
Definition at line 226 of file vlnamevaluepair.h. Referenced by vlNameValuePair< DataType >::copySelf(), vlNameValuePair< DataType >::get(), vlNameValuePair< DataType >::getPtr(), vlNameValuePair< DataType >::getPtrRW(), and vlNameValuePair< DataType >::set(). |
1.3.3