#include <APPSPACK_Parameter_Entry.hpp>
Collaboration diagram for APPSPACK::Parameter::Entry:

The "Used" parameter is mutable, which means it can be changed even for a const Entry.
Definition at line 64 of file APPSPACK_Parameter_Entry.hpp.
Public Member Functions | |
Constructors / Destructor | |
The "Used" parameter is set to false. The "Default" parameter is set to false, unless the optional second argument is true. | |
| Entry () | |
| Create an empty Entry that doesn't contain anything. | |
| Entry (const Entry &source) | |
| Copy constructor. | |
| Entry (bool value, bool isCreatedByGet=false) | |
| Create an Entry containing a bool. | |
| Entry (int value, bool isCreatedByGet=false) | |
| Create an Entry containing an int. | |
| Entry (double value, bool isCreatedByGet=false) | |
| Create an Entry containing a double. | |
| Entry (const string &value, bool isCreatedByGet=false) | |
| Create an Entry containing a string. | |
| Entry (const Vector &value, bool isCreatedByGet=false) | |
| Create an Entry containing a ::Vector. | |
| ~Entry () | |
| Destructor. | |
Copy | |
| Entry & | operator= (const Entry &source) |
| Copy an entry. | |
Sublists | |
Functions for handling parameters that are themselves lists. | |
| List & | setList (bool isCreatedByGet=false) |
| Create a sublist. Sets "Default" according to the optional argument. Sets "Used" to false. | |
| List & | getListValue () |
| Extract the reference to the list that is stored in the Entry. Set "Used" to true. | |
| const List & | getListValue () const |
| Extract the reference to the list that is stored in the Entry. Set "Used" to true. | |
Set functions. | |
Similar to the corresponding constructors. Completely erases the old entry. The "Used" parameter is (re-)set to false. The "Default" parameter is set to false, unless the optional second argument is true. | |
| void | setValue (bool value, bool isCreatedByGet=false) |
| Set bool value. | |
| void | setValue (int value, bool isCreatedByGet=false) |
| Set int value. | |
| void | setValue (double value, bool isCreatedByGet=false) |
| Set double value. | |
| void | setValue (const char *value, bool isCreatedByGet=false) |
| Set string value. | |
| void | setValue (const string &value, bool isCreatedByGet=false) |
| Set string value. | |
| void | setValue (const Vector &value, bool isCreatedByGet=false) |
| Set ::Vector value. | |
| void | setValue (const Matrix &value, bool isCreatedByGet=false) |
| Set Matrix value. | |
Is functions. | |
Return true if the parameter is of the specified type; otherwise, return false. Has no affect on "Default" or "Used" status. | |
| bool | isBool () const |
| Return true for bool entry. | |
| bool | isInt () const |
| Return true for int entry. | |
| bool | isDouble () const |
| Return true for double entry. | |
| bool | isString () const |
| Return true for string entry. | |
| bool | isList () const |
| Return true for list entry (i.e., a sublist). | |
| bool | isVector () const |
| Return true for ::Vector entry. | |
| bool | isMatrix () const |
| Return true for matrix entry. | |
Get functions. | |
Returns the value of the Entry. Sets "Used" to true. Does not affect "Default" bit.
| |
| bool | getBoolValue () const |
| Get bool value. | |
| int | getIntValue () const |
| Get int value. | |
| double | getDoubleValue () const |
| Get double value. | |
| const string & | getStringValue () const |
| Get string value. | |
| const Vector & | getVectorValue () const |
| Get ::Vector value. | |
| const Matrix & | getMatrixValue () const |
| Get Vector value. | |
Pack/Unpack | |
Used by parallel version of APPSPACK to pack and unpack parameter lists for message passing. Uses APPSPACK::GCI functionality.
| |
| void | pack () const |
| Pack the Entry. | |
| void | unpack () |
| Unpack the Entry. | |
Printing | |
| ostream & | leftshift (ostream &stream) const |
| Output the parameter to the given stream. | |
Private Types | |
| enum | EntryType { APPSPACK_NONE, APPSPACK_BOOL, APPSPACK_INT, APPSPACK_DOUBLE, APPSPACK_STRING, APPSPACK_LIST, APPSPACK_VECTOR, APPSPACK_MATRIX } |
| All possible parameter types that this class can store. More... | |
Private Member Functions | |
| void | reset () |
| Reset the entry. | |
Private Attributes | |
| EntryType | type |
| Type of parameter stored in this object. | |
| bool | bval |
| Boolean value, if this is of type BOOL. | |
| int | ival |
| Integer value, if this is of type INT. | |
| double | dval |
| Double value, if this is of type DOUBLE. | |
| string | sval |
| String value, if this is of type STRING. | |
| List * | lval |
| Pointer to list, if this is of type LIST. | |
| Vector | vectorval |
| Vector value. | |
| Matrix | matrixval |
| Matrix value. | |
| bool | isGotten |
| True if this parameter been accessed by a "get" function. | |
| bool | isSetByGet |
| True if this parameter is a nominal value assigned by a "get" function. | |
|
|
All possible parameter types that this class can store.
Definition at line 226 of file APPSPACK_Parameter_Entry.hpp. |
|
|
Create an empty Entry that doesn't contain anything.
Definition at line 42 of file APPSPACK_Parameter_Entry.cpp. |
|
|
Copy constructor.
Definition at line 55 of file APPSPACK_Parameter_Entry.cpp. References operator=(). |
|
||||||||||||
|
Create an Entry containing a bool.
Definition at line 95 of file APPSPACK_Parameter_Entry.cpp. |
|
||||||||||||
|
Create an Entry containing an int.
Definition at line 108 of file APPSPACK_Parameter_Entry.cpp. |
|
||||||||||||
|
Create an Entry containing a double.
Definition at line 121 of file APPSPACK_Parameter_Entry.cpp. |
|
||||||||||||
|
Create an Entry containing a string.
Definition at line 134 of file APPSPACK_Parameter_Entry.cpp. |
|
||||||||||||
|
Create an Entry containing a ::Vector.
Definition at line 147 of file APPSPACK_Parameter_Entry.cpp. |
|
|
Destructor.
Definition at line 160 of file APPSPACK_Parameter_Entry.cpp. References reset(). |
|
|
Copy an entry.
Definition at line 69 of file APPSPACK_Parameter_Entry.cpp. References bval, dval, isGotten, isSetByGet, ival, lval, reset(), sval, type, and vectorval. Referenced by Entry(). |
|
|
Create a sublist. Sets "Default" according to the optional argument. Sets "Used" to false.
Definition at line 232 of file APPSPACK_Parameter_Entry.cpp. References isGotten, isSetByGet, lval, reset(), and type. |
|
|
Extract the reference to the list that is stored in the Entry. Set "Used" to true.
Definition at line 302 of file APPSPACK_Parameter_Entry.cpp. References isGotten. Referenced by APPSPACK::Parameter::List::print(), and APPSPACK::Parameter::List::sublist(). |
|
|
Extract the reference to the list that is stored in the Entry. Set "Used" to true.
Definition at line 308 of file APPSPACK_Parameter_Entry.cpp. References isGotten. |
|
||||||||||||
|
Set bool value.
Definition at line 176 of file APPSPACK_Parameter_Entry.cpp. References bval, isSetByGet, reset(), and type. Referenced by APPSPACK::Parameter::List::getParameter(). |
|
||||||||||||
|
Set int value.
Definition at line 184 of file APPSPACK_Parameter_Entry.cpp. References isSetByGet, ival, reset(), and type. |
|
||||||||||||
|
Set double value.
Definition at line 192 of file APPSPACK_Parameter_Entry.cpp. References dval, isSetByGet, reset(), and type. |
|
||||||||||||
|
Set string value.
Definition at line 200 of file APPSPACK_Parameter_Entry.cpp. References isSetByGet, reset(), sval, and type. |
|
||||||||||||
|
Set string value.
Definition at line 208 of file APPSPACK_Parameter_Entry.cpp. References isSetByGet, reset(), sval, and type. |
|
||||||||||||
|
Set ::Vector value.
Definition at line 216 of file APPSPACK_Parameter_Entry.cpp. References isSetByGet, reset(), type, and vectorval. |
|
||||||||||||
|
Set Matrix value.
Definition at line 224 of file APPSPACK_Parameter_Entry.cpp. References isSetByGet, matrixval, reset(), and type. |
|
|
Return true for bool entry.
Definition at line 243 of file APPSPACK_Parameter_Entry.cpp. References type. Referenced by APPSPACK::Parameter::List::getParameter(), APPSPACK::Parameter::List::isParameterBool(), and APPSPACK::Parameter::List::isParameterEqual(). |
|
|
Return true for int entry.
Definition at line 248 of file APPSPACK_Parameter_Entry.cpp. References type. Referenced by APPSPACK::Parameter::List::getParameter(), APPSPACK::Parameter::List::isParameterEqual(), and APPSPACK::Parameter::List::isParameterInt(). |
|
|
Return true for double entry.
Definition at line 253 of file APPSPACK_Parameter_Entry.cpp. References type. Referenced by APPSPACK::Parameter::List::getDoubleParameter(), APPSPACK::Parameter::List::getParameter(), APPSPACK::Parameter::List::isParameterDouble(), and APPSPACK::Parameter::List::isParameterEqual(). |
|
|
Return true for string entry.
Definition at line 258 of file APPSPACK_Parameter_Entry.cpp. References type. Referenced by APPSPACK::Parameter::List::getParameter(), APPSPACK::Parameter::List::isParameterEqual(), and APPSPACK::Parameter::List::isParameterString(). |
|
|
Return true for list entry (i.e., a sublist).
Definition at line 263 of file APPSPACK_Parameter_Entry.cpp. References type. Referenced by APPSPACK::Parameter::List::isParameterSublist(), APPSPACK::Parameter::List::print(), and APPSPACK::Parameter::List::sublist(). |
|
|
Return true for ::Vector entry.
Definition at line 273 of file APPSPACK_Parameter_Entry.cpp. References type. Referenced by APPSPACK::Parameter::List::getParameter(), APPSPACK::Parameter::List::getVectorParameter(), APPSPACK::Parameter::List::isParameterEqual(), and APPSPACK::Parameter::List::isParameterVector(). |
|
|
Return true for matrix entry.
Definition at line 268 of file APPSPACK_Parameter_Entry.cpp. References type. Referenced by APPSPACK::Parameter::List::getMatrixParameter(), and APPSPACK::Parameter::List::isParameterMatrix(). |
|
|
Get bool value.
Definition at line 278 of file APPSPACK_Parameter_Entry.cpp. References isGotten. Referenced by APPSPACK::Parameter::List::getParameter(), and APPSPACK::Parameter::List::isParameterEqual(). |
|
|
Get int value.
Definition at line 284 of file APPSPACK_Parameter_Entry.cpp. References isGotten. Referenced by APPSPACK::Parameter::List::getParameter(), and APPSPACK::Parameter::List::isParameterEqual(). |
|
|
Get double value.
Definition at line 290 of file APPSPACK_Parameter_Entry.cpp. References isGotten. Referenced by APPSPACK::Parameter::List::getDoubleParameter(), APPSPACK::Parameter::List::getParameter(), and APPSPACK::Parameter::List::isParameterEqual(). |
|
|
Get string value.
Definition at line 296 of file APPSPACK_Parameter_Entry.cpp. References isGotten. Referenced by APPSPACK::Parameter::List::getParameter(), and APPSPACK::Parameter::List::isParameterEqual(). |
|
|
Get ::Vector value.
Definition at line 314 of file APPSPACK_Parameter_Entry.cpp. References isGotten. Referenced by APPSPACK::Parameter::List::getParameter(), APPSPACK::Parameter::List::getVectorParameter(), and APPSPACK::Parameter::List::isParameterEqual(). |
|
|
Get Vector value.
Definition at line 320 of file APPSPACK_Parameter_Entry.cpp. References isGotten. Referenced by APPSPACK::Parameter::List::getMatrixParameter(). |
|
|
Pack the Entry.
Definition at line 361 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_BOOL, APPSPACK_DOUBLE, APPSPACK_INT, APPSPACK_LIST, APPSPACK_STRING, APPSPACK_VECTOR, bval, dval, isGotten, isSetByGet, ival, lval, APPSPACK::Parameter::List::pack(), sval, and vectorval. Referenced by APPSPACK::Parameter::List::pack(). |
|
|
Unpack the Entry.
Definition at line 398 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_BOOL, APPSPACK_DOUBLE, APPSPACK_INT, APPSPACK_LIST, APPSPACK_STRING, APPSPACK_VECTOR, bval, dval, isGotten, isSetByGet, ival, lval, sval, type, APPSPACK::Parameter::List::unpack(), and vectorval. Referenced by APPSPACK::Parameter::List::unpack(). |
|
|
Output the parameter to the given stream. Formats the output as "<type,value>", except in the case of a list which just outputs "\<sublist\>". If the parameter has not yet been set, it outputs "\<NONE\>". This is the function called by the ostream operator<<. Definition at line 326 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_BOOL, APPSPACK_DOUBLE, APPSPACK_INT, APPSPACK_LIST, APPSPACK_STRING, APPSPACK_VECTOR, bval, and sval. Referenced by operator<<(). |
|
|
Reset the entry.
Definition at line 165 of file APPSPACK_Parameter_Entry.cpp. References isGotten, isSetByGet, lval, and type. Referenced by operator=(), setList(), setValue(), and ~Entry(). |
|
|
Type of parameter stored in this object.
Definition at line 246 of file APPSPACK_Parameter_Entry.hpp. Referenced by isBool(), isDouble(), isInt(), isList(), isMatrix(), isString(), isVector(), operator=(), reset(), setList(), setValue(), and unpack(). |
|
|
Boolean value, if this is of type BOOL.
Definition at line 249 of file APPSPACK_Parameter_Entry.hpp. Referenced by leftshift(), operator=(), pack(), setValue(), and unpack(). |
|
|
Integer value, if this is of type INT.
Definition at line 252 of file APPSPACK_Parameter_Entry.hpp. Referenced by operator=(), pack(), setValue(), and unpack(). |
|
|
Double value, if this is of type DOUBLE.
Definition at line 255 of file APPSPACK_Parameter_Entry.hpp. Referenced by operator=(), pack(), setValue(), and unpack(). |
|
|
String value, if this is of type STRING.
Definition at line 258 of file APPSPACK_Parameter_Entry.hpp. Referenced by leftshift(), operator=(), pack(), setValue(), and unpack(). |
|
|
Pointer to list, if this is of type LIST.
Definition at line 261 of file APPSPACK_Parameter_Entry.hpp. Referenced by operator=(), pack(), reset(), setList(), and unpack(). |
|
|
Vector value.
Definition at line 264 of file APPSPACK_Parameter_Entry.hpp. Referenced by operator=(), pack(), setValue(), and unpack(). |
|
|
Matrix value.
Definition at line 267 of file APPSPACK_Parameter_Entry.hpp. Referenced by setValue(). |
|
|
True if this parameter been accessed by a "get" function.
Definition at line 270 of file APPSPACK_Parameter_Entry.hpp. Referenced by getBoolValue(), getDoubleValue(), getIntValue(), getListValue(), getMatrixValue(), getStringValue(), getVectorValue(), operator=(), pack(), reset(), setList(), and unpack(). |
|
|
True if this parameter is a nominal value assigned by a "get" function.
Definition at line 273 of file APPSPACK_Parameter_Entry.hpp. Referenced by operator=(), pack(), reset(), setList(), setValue(), and unpack(). |
![]()
© Sandia Corporation | Site Contact | Privacy and Security
![]()
Generated on Fri Feb 16 10:33:36 2007 for APPSPACK 5.0.1 by
1.3.9.1 written by Dimitri van Heesch,
© 1997-2002