#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" paraemeter is set to false. The "Default" pareameter 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 Value &value, bool isCreatedByGet=false) | |
Create an Entry containing a Value. | |
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" paraemeter is (re-)set to false. The "Default" pareameter 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 Value &value, bool isCreatedByGet=false) |
Set Value value. | |
void | setValue (const Vector &value, bool isCreatedByGet=false) |
Set Vector 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 | isValue () const |
Return true for Value entry. | |
bool | isVector () const |
Return true for Vector 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 Value & | getValueValue () const |
Get Value value. | |
const Vector & | getVectorValue () 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_VALUE, APPSPACK_VECTOR } |
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. | |
Value | valueval |
Value value. | |
Vector | vectorval |
Vector 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.
|
|
Create an empty Entry that doesn't contain anything. Definition at line 44 of file APPSPACK_Parameter_Entry.cpp. |
|
Copy constructor. Definition at line 58 of file APPSPACK_Parameter_Entry.cpp. References operator=(). |
|
Create an Entry containing a bool. Definition at line 100 of file APPSPACK_Parameter_Entry.cpp. |
|
Create an Entry containing an int. Definition at line 114 of file APPSPACK_Parameter_Entry.cpp. |
|
Create an Entry containing a double. Definition at line 128 of file APPSPACK_Parameter_Entry.cpp. |
|
Create an Entry containing a string. Definition at line 142 of file APPSPACK_Parameter_Entry.cpp. |
|
Create an Entry containing a Value. Definition at line 156 of file APPSPACK_Parameter_Entry.cpp. |
|
Create an Entry containing a Vector. Definition at line 170 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK::Vector. |
|
Destructor. Definition at line 184 of file APPSPACK_Parameter_Entry.cpp. References reset(). |
|
Copy an entry. Definition at line 73 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_LIST, bval, dval, isGotten, isSetByGet, ival, lval, reset(), sval, type, valueval, and vectorval. Referenced by Entry(). |
|
Create a sublist. Sets "Default" according to the optional argument. Sets "Used" to false. Definition at line 256 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_LIST, 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 326 of file APPSPACK_Parameter_Entry.cpp. References isGotten, and lval. 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 332 of file APPSPACK_Parameter_Entry.cpp. |
|
Set bool value. Definition at line 200 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_BOOL, bval, isSetByGet, reset(), and type. |
|
Set int value. Definition at line 208 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_INT, isSetByGet, ival, reset(), and type. |
|
Set double value. Definition at line 216 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_DOUBLE, dval, isSetByGet, reset(), and type. |
|
Set string value. Definition at line 224 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_STRING, isSetByGet, reset(), sval, and type. |
|
Set string value. Definition at line 232 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_STRING, isSetByGet, reset(), sval, and type. |
|
Set Value value. Definition at line 240 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_VALUE, isSetByGet, reset(), type, and valueval. |
|
Set Vector value. Definition at line 248 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_VECTOR, isSetByGet, reset(), type, APPSPACK::Vector, and vectorval. |
|
Return true for bool entry. Definition at line 267 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_BOOL, and type. Referenced by APPSPACK::Parameter::List::getParameter(), APPSPACK::Parameter::List::isParameterBool(), and APPSPACK::Parameter::List::isParameterEqual(). |
|
Return true for int entry. Definition at line 272 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_INT, and type. Referenced by APPSPACK::Parameter::List::getParameter(), APPSPACK::Parameter::List::isParameterEqual(), and APPSPACK::Parameter::List::isParameterInt(). |
|
Return true for double entry. Definition at line 277 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_DOUBLE, and 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 282 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_STRING, and 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 287 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_LIST, and type. Referenced by APPSPACK::Parameter::List::isParameterSublist(), APPSPACK::Parameter::List::print(), and APPSPACK::Parameter::List::sublist(). |
|
Return true for Value entry. Definition at line 292 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_VALUE, and type. Referenced by APPSPACK::Parameter::List::getParameter(), APPSPACK::Parameter::List::getValueParameter(), APPSPACK::Parameter::List::isParameterEqual(), and APPSPACK::Parameter::List::isParameterValue(). |
|
Return true for Vector entry. Definition at line 297 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_VECTOR, and type. Referenced by APPSPACK::Parameter::List::getParameter(), APPSPACK::Parameter::List::getVectorParameter(), APPSPACK::Parameter::List::isParameterEqual(), and APPSPACK::Parameter::List::isParameterVector(). |
|
Get bool value. Definition at line 302 of file APPSPACK_Parameter_Entry.cpp. References bval, and isGotten. Referenced by APPSPACK::Parameter::List::getParameter(), and APPSPACK::Parameter::List::isParameterEqual(). |
|
Get int value. Definition at line 308 of file APPSPACK_Parameter_Entry.cpp. References isGotten, and ival. Referenced by APPSPACK::Parameter::List::getParameter(), and APPSPACK::Parameter::List::isParameterEqual(). |
|
Get double value. Definition at line 314 of file APPSPACK_Parameter_Entry.cpp. References dval, and isGotten. Referenced by APPSPACK::Parameter::List::getDoubleParameter(), APPSPACK::Parameter::List::getParameter(), and APPSPACK::Parameter::List::isParameterEqual(). |
|
Get string value. Definition at line 320 of file APPSPACK_Parameter_Entry.cpp. References isGotten, and sval. Referenced by APPSPACK::Parameter::List::getParameter(), and APPSPACK::Parameter::List::isParameterEqual(). |
|
Get Value value. Definition at line 338 of file APPSPACK_Parameter_Entry.cpp. References isGotten, and valueval. Referenced by APPSPACK::Parameter::List::getParameter(), APPSPACK::Parameter::List::getValueParameter(), and APPSPACK::Parameter::List::isParameterEqual(). |
|
Get Vector value. Definition at line 344 of file APPSPACK_Parameter_Entry.cpp. References isGotten, APPSPACK::Vector, and vectorval. Referenced by APPSPACK::Parameter::List::getParameter(), APPSPACK::Parameter::List::getVectorParameter(), and APPSPACK::Parameter::List::isParameterEqual(). |
|
Pack the Entry. Definition at line 388 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_BOOL, APPSPACK_DOUBLE, APPSPACK_INT, APPSPACK_LIST, APPSPACK_STRING, APPSPACK_VALUE, APPSPACK_VECTOR, bval, dval, APPSPACK::Value::getIsValue(), APPSPACK::Value::getValue(), isGotten, isSetByGet, ival, lval, APPSPACK::Parameter::List::pack(), APPSPACK::GCI::pack(), sval, type, valueval, and vectorval. Referenced by APPSPACK::Parameter::List::pack(). |
|
Unpack the Entry. Definition at line 434 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_BOOL, APPSPACK_DOUBLE, APPSPACK_INT, APPSPACK_LIST, APPSPACK_STRING, APPSPACK_VALUE, APPSPACK_VECTOR, bval, dval, isGotten, isSetByGet, ival, lval, APPSPACK::Value::setValueTo(), sval, type, APPSPACK::Parameter::List::unpack(), APPSPACK::GCI::unpack(), valueval, and vectorval. |
|
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 350 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_BOOL, APPSPACK_DOUBLE, APPSPACK_INT, APPSPACK_LIST, APPSPACK_STRING, APPSPACK_VALUE, APPSPACK_VECTOR, bval, dval, isGotten, isSetByGet, ival, sval, type, valueval, and vectorval. |
|
Reset the entry. Definition at line 189 of file APPSPACK_Parameter_Entry.cpp. References APPSPACK_NONE, isGotten, isSetByGet, lval, and type. Referenced by operator=(), setList(), setValue(), and ~Entry(). |
|
Type of parameter stored in this object. Definition at line 250 of file APPSPACK_Parameter_Entry.hpp. Referenced by isBool(), isDouble(), isInt(), isList(), isString(), isValue(), isVector(), leftshift(), operator=(), pack(), reset(), setList(), setValue(), and unpack(). |
|
Boolean value, if this is of type BOOL. Definition at line 253 of file APPSPACK_Parameter_Entry.hpp. Referenced by getBoolValue(), leftshift(), operator=(), pack(), setValue(), and unpack(). |
|
Integer value, if this is of type INT. Definition at line 256 of file APPSPACK_Parameter_Entry.hpp. Referenced by getIntValue(), leftshift(), operator=(), pack(), setValue(), and unpack(). |
|
Double value, if this is of type DOUBLE. Definition at line 259 of file APPSPACK_Parameter_Entry.hpp. Referenced by getDoubleValue(), leftshift(), operator=(), pack(), setValue(), and unpack(). |
|
String value, if this is of type STRING. Definition at line 262 of file APPSPACK_Parameter_Entry.hpp. Referenced by getStringValue(), leftshift(), operator=(), pack(), setValue(), and unpack(). |
|
Pointer to list, if this is of type LIST. Definition at line 265 of file APPSPACK_Parameter_Entry.hpp. Referenced by getListValue(), operator=(), pack(), reset(), setList(), and unpack(). |
|
Value value. Definition at line 268 of file APPSPACK_Parameter_Entry.hpp. Referenced by getValueValue(), leftshift(), operator=(), pack(), setValue(), and unpack(). |
|
Vector value. Definition at line 271 of file APPSPACK_Parameter_Entry.hpp. Referenced by getVectorValue(), leftshift(), operator=(), pack(), setValue(), and unpack(). |
|
True if this parameter been accessed by a "get" function. Definition at line 274 of file APPSPACK_Parameter_Entry.hpp. Referenced by getBoolValue(), getDoubleValue(), getIntValue(), getListValue(), getStringValue(), getValueValue(), getVectorValue(), leftshift(), operator=(), pack(), reset(), setList(), and unpack(). |
|
True if this parameter is a nominal value assigned by a "get" function. Definition at line 277 of file APPSPACK_Parameter_Entry.hpp. Referenced by leftshift(), operator=(), pack(), reset(), setList(), setValue(), and unpack(). |
© Sandia Corporation | Site Contact | Privacy and Security
Generated on Wed Dec 14 18:41:05 2005 for APPSPACK 4.0.2 by
1.3.8 written by Dimitri van Heesch,
© 1997-2002