#include <source/toolbox/inputdb/InputDatabase.h>
Inheritance diagram for SAMRAI::tbox::InputDatabase:
Public Member Functions | |
InputDatabase (const string &name) | |
virtual | ~InputDatabase () |
virtual string | getName () const |
virtual bool | keyExists (const string &key) |
virtual Array< string > | getAllKeys () |
virtual int | getArraySize (const string &key) |
virtual bool | isDatabase (const string &key) |
virtual Pointer< Database > | putDatabase (const string &key) |
virtual Pointer< Database > | getDatabase (const string &key) |
virtual bool | isBool (const string &key) |
virtual void | putBool (const string &key, const bool &data) |
virtual void | putBoolArray (const string &key, const Array< bool > &data) |
virtual void | putBoolArray (const string &key, const bool *const data, const int nelements) |
virtual bool | getBool (const string &key) |
virtual bool | getBoolWithDefault (const string &key, const bool &defaultvalue) |
virtual Array< bool > | getBoolArray (const string &key) |
virtual void | getBoolArray (const string &key, bool *data, const int nelements) |
virtual bool | isDatabaseBox (const string &key) |
virtual void | putDatabaseBox (const string &key, const DatabaseBox &data) |
virtual void | putDatabaseBoxArray (const string &key, const Array< DatabaseBox > &data) |
virtual void | putDatabaseBoxArray (const string &key, const DatabaseBox *const data, const int nelements) |
virtual DatabaseBox | getDatabaseBox (const string &key) |
virtual DatabaseBox | getDatabaseBoxWithDefault (const string &key, const DatabaseBox &defaultvalue) |
virtual Array< DatabaseBox > | getDatabaseBoxArray (const string &key) |
virtual void | getDatabaseBoxArray (const string &key, DatabaseBox *data, const int nelements) |
virtual bool | isChar (const string &key) |
virtual void | putChar (const string &key, const char &data) |
virtual void | putCharArray (const string &key, const Array< char > &data) |
virtual void | putCharArray (const string &key, const char *const data, const int nelements) |
virtual char | getChar (const string &key) |
virtual char | getCharWithDefault (const string &key, const char &defaultvalue) |
virtual Array< char > | getCharArray (const string &key) |
virtual void | getCharArray (const string &key, char *data, const int nelements) |
virtual bool | isComplex (const string &key) |
virtual void | putComplex (const string &key, const dcomplex &data) |
virtual void | putComplexArray (const string &key, const Array< dcomplex > &data) |
virtual void | putComplexArray (const string &key, const dcomplex *const data, const int nelements) |
virtual dcomplex | getComplex (const string &key) |
virtual dcomplex | getComplexWithDefault (const string &key, const dcomplex &defaultvalue) |
virtual Array< dcomplex > | getComplexArray (const string &key) |
virtual void | getComplexArray (const string &key, dcomplex *data, const int nelements) |
virtual bool | isDouble (const string &key) |
virtual void | putDouble (const string &key, const double &data) |
virtual void | putDoubleArray (const string &key, const Array< double > &data) |
virtual void | putDoubleArray (const string &key, const double *const data, const int nelements) |
virtual double | getDouble (const string &key) |
virtual double | getDoubleWithDefault (const string &key, const double &defaultvalue) |
virtual Array< double > | getDoubleArray (const string &key) |
virtual void | getDoubleArray (const string &key, double *data, const int nelements) |
virtual bool | isFloat (const string &key) |
virtual void | putFloat (const string &key, const float &data) |
virtual void | putFloatArray (const string &key, const Array< float > &data) |
virtual void | putFloatArray (const string &key, const float *const data, const int nelements) |
virtual float | getFloat (const string &key) |
virtual float | getFloatWithDefault (const string &key, const float &defaultvalue) |
virtual Array< float > | getFloatArray (const string &key) |
virtual void | getFloatArray (const string &key, float *data, const int nelements) |
virtual bool | isInteger (const string &key) |
virtual void | putInteger (const string &key, const int &data) |
virtual void | putIntegerArray (const string &key, const Array< int > &data) |
virtual void | putIntegerArray (const string &key, const int *const data, const int nelements) |
virtual int | getInteger (const string &key) |
virtual int | getIntegerWithDefault (const string &key, const int &defaultvalue) |
virtual Array< int > | getIntegerArray (const string &key) |
virtual void | getIntegerArray (const string &key, int *data, const int nelements) |
virtual bool | isString (const string &key) |
virtual void | putString (const string &key, const string &data) |
virtual void | putStringArray (const string &key, const Array< string > &data) |
virtual void | putStringArray (const string &key, const string *const data, const int nelements) |
virtual string | getString (const string &key) |
virtual string | getStringWithDefault (const string &key, const string &defaultvalue) |
virtual Array< string > | getStringArray (const string &key) |
virtual void | getStringArray (const string &key, string *data, const int nelements) |
bool | keyAccessed (const string &key) |
virtual void | printClassData (ostream &os=pout) |
void | printUnusedKeys (ostream &os=pout) const |
void | printDefaultKeys (ostream &os=pout) const |
See the Database class documentation for a description of the generic database interface.
Note that the input database will attempt to promote numerical types where appropriate. The promotion chain is int -> float -> double -> complex. For example, an integer key will be promoted to a complex value if isComplex() or getComplex() is called. Double values will also be truncated to floats (with loss of information) if a float call is made on a double value.
It is assumed that all processors will access the database in the same manner. Thus, all error messages are output to pout instead of perr.
|
The input database constructor creates an empty database with the specified name. |
|
The input database destructor deallocates the data in the database. |
|
Return string name of input database object. |
|
Return true if the specified key exists in the database and false otherwise. Implements SAMRAI::tbox::Database. |
|
Return all keys in the database. Implements SAMRAI::tbox::Database. |
|
Return the size of the array associated with the key. If the key does not exist, then zero is returned. Implements SAMRAI::tbox::Database. |
|
Return whether the specified key represents a database entry. If the key does not exist, then false is returned. Implements SAMRAI::tbox::Database. |
|
Create a new database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Get the database with the specified key name. If the specified key does not exist in the database or it is not a database, then an error message is printed and the program exits. Implements SAMRAI::tbox::Database. |
|
Return whether the specified key represents a boolean entry. If the key does not exist, then false is returned. Implements SAMRAI::tbox::Database. |
|
Create a boolean scalar entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Create a boolean array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Create a boolean array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Get a boolean entry in the database with the specified key name. If the specified key does not exist in the database or is not a boolean scalar, then an error message is printed and the program exits. Implements SAMRAI::tbox::Database. |
|
Get a boolean entry in the database with the specified key name. If the specified key does not exist in the database, then the default value is returned. If the key exists but is not a boolean scalar, then an error message is printed and the program exits. Implements SAMRAI::tbox::Database. |
|
Get a boolean entry from the database with the specified key name. If the specified key does not exist in the database or is not a boolean array, then an error message is printed and the program exits. Implements SAMRAI::tbox::Database. |
|
Get a boolean entry from the database with the specified key name. If the specified key does not exist in the database or is not a boolean array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database. Implements SAMRAI::tbox::Database. |
|
Return whether the specified key represents a box entry. If the key does not exist, then false is returned. Implements SAMRAI::tbox::Database. |
|
Create a box scalar entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Create a box array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Create a box array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Get a box entry in the database with the specified key name. If the specified key does not exist in the database or is not a box scalar, then an error message is printed and the program exits. Implements SAMRAI::tbox::Database. |
|
Get a box entry in the database with the specified key name. If the specified key does not exist in the database, then the default value is returned. If the key exists but is not a box scalar, then an error message is printed and the program exits. Implements SAMRAI::tbox::Database. |
|
Get a box entry from the database with the specified key name. If the specified key does not exist in the database or is not a box array, then an error message is printed and the program exits. Implements SAMRAI::tbox::Database. |
|
Get a box entry from the database with the specified key name. If the specified key does not exist in the database or is not a box array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database. Implements SAMRAI::tbox::Database. |
|
Return whether the specified key represents a character entry. If the key does not exist, then false is returned. Implements SAMRAI::tbox::Database. |
|
Create a character scalar entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Create a character array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Create a character array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Get a character entry in the database with the specified key name. If the specified key does not exist in the database or is not an character scalar, then an error message is printed and the program exits. Implements SAMRAI::tbox::Database. |
|
Get a character entry in the database with the specified key name. If the specified key does not exist in the database, then the default value is returned. If the key exists but is not a character scalar, then an error message is printed and the program exits. Implements SAMRAI::tbox::Database. |
|
Get a character entry from the database with the specified key name. If the specified key does not exist in the database or is not a character array, then an error message is printed and the program exits. Implements SAMRAI::tbox::Database. |
|
Get a character entry from the database with the specified key name. If the specified key does not exist in the database or is not a character array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database. Implements SAMRAI::tbox::Database. |
|
Return whether the specified key represents a complex entry. If the key does not exist, then false is returned. Complex values may be promoted from integers, floats, or doubles. Implements SAMRAI::tbox::Database. |
|
Create a complex scalar entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Create a complex array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Create a complex array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Get a complex entry in the database with the specified key name. If the specified key does not exist in the database or is not a complex scalar, then an error message is printed and the program exits. Complex values may be promoted from integers, floats, or doubles. Implements SAMRAI::tbox::Database. |
|
Get a complex entry in the database with the specified key name. If the specified key does not exist in the database, then the default value is returned. If the key exists but is not a complex scalar, then an error message is printed and the program exits. Complex values may be promoted from integers, floats, or doubles. Implements SAMRAI::tbox::Database. |
|
Get a complex entry from the database with the specified key name. If the specified key does not exist in the database or is not a complex array, then an error message is printed and the program exits. Complex values may be promoted from integers, floats, or doubles. Implements SAMRAI::tbox::Database. |
|
Get a complex entry from the database with the specified key name. If the specified key does not exist in the database or is not a complex array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database. Complex values may be promoted from integers, floats, or doubles. Implements SAMRAI::tbox::Database. |
|
Return whether the specified key represents a double entry. If the key does not exist, then false is returned. Double values may be promoted from integers or floats. Implements SAMRAI::tbox::Database. |
|
Create a double scalar entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Create a double array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Create a double array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Get a double entry in the database with the specified key name. If the specified key does not exist in the database or is not a double scalar, then an error message is printed and the program exits. Double values may be promoted from integers or floats. Implements SAMRAI::tbox::Database. |
|
Get a double entry in the database with the specified key name. If the specified key does not exist in the database, then the default value is returned. If the key exists but is not a double scalar, then an error message is printed and the program exits. Double values may be promoted from integers or floats. Implements SAMRAI::tbox::Database. |
|
Get a double entry from the database with the specified key name. If the specified key does not exist in the database or is not a double array, then an error message is printed and the program exits. Double values may be promoted from integers or floats. Implements SAMRAI::tbox::Database. |
|
Get a double entry from the database with the specified key name. If the specified key does not exist in the database or is not a double array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database. Double values may be promoted from integers or floats. Implements SAMRAI::tbox::Database. |
|
Return whether the specified key represents a float entry. If the key does not exist, then false is returned. Float values may be promoted from integers or silently truncated from doubles. Implements SAMRAI::tbox::Database. |
|
Create a float scalar entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Create a float array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Create a float array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Get a float entry in the database with the specified key name. If the specified key does not exist in the database or is not a float scalar, then an error message is printed and the program exits. Float values may be promoted from integers or silently truncated from doubles. Implements SAMRAI::tbox::Database. |
|
Get a float entry in the database with the specified key name. If the specified key does not exist in the database, then the default value is returned. If the key exists but is not a float scalar, then an error message is printed and the program exits. Float values may be promoted from integers or silently truncated from doubles. Implements SAMRAI::tbox::Database. |
|
Get a float entry from the database with the specified key name. If the specified key does not exist in the database or is not a float array, then an error message is printed and the program exits. Float values may be promoted from integers or silently truncated from doubles. Implements SAMRAI::tbox::Database. |
|
Get a float entry from the database with the specified key name. If the specified key does not exist in the database or is not a float array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database. Float values may be promoted from integers or silently truncated from doubles. Implements SAMRAI::tbox::Database. |
|
Return whether the specified key represents an integer entry. If the key does not exist, then false is returned. Implements SAMRAI::tbox::Database. |
|
Create an integer scalar entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Create an integer array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Create an integer array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Get an integer entry in the database with the specified key name. If the specified key does not exist in the database or is not an integer scalar, then an error message is printed and the program exits. Implements SAMRAI::tbox::Database. |
|
Get an integer entry in the database with the specified key name. If the specified key does not exist in the database, then the default value is returned. If the key exists but is not an integer scalar, then an error message is printed and the program exits. Implements SAMRAI::tbox::Database. |
|
Get an integer entry from the database with the specified key name. If the specified key does not exist in the database or is not an integer array, then an error message is printed and the program exits. Implements SAMRAI::tbox::Database. |
|
Get an integer entry from the database with the specified key name. If the specified key does not exist in the database or is not an integer array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database. Implements SAMRAI::tbox::Database. |
|
Return whether the specified key represents a string entry. If the key does not exist, then false is returned. Implements SAMRAI::tbox::Database. |
|
Create a string scalar entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Create a string array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Create a string array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place. Implements SAMRAI::tbox::Database. |
|
Get a string entry in the database with the specified key name. If the specified key does not exist in the database or is not an string scalar, then an error message is printed and the program exits. Implements SAMRAI::tbox::Database. |
|
Get a string entry in the database with the specified key name. If the specified key does not exist in the database, then the default value is returned. If the key exists but is not a string scalar, then an error message is printed and the program exits. Implements SAMRAI::tbox::Database. |
|
Get a string entry from the database with the specified key name. If the specified key does not exist in the database or is not a string array, then an error message is printed and the program exits. Implements SAMRAI::tbox::Database. |
|
Get a string entry from the database with the specified key name. If the specified key does not exist in the database or is not a string array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database. Implements SAMRAI::tbox::Database. |
|
Return whether the specified key has been accessed by one of the lookup member functions. If the key does not exist in the database, then false is returned. |
|
Print the current database to the specified output stream. After each key, print whether that key came from the input file and was used (input), came from the input file but was not used (unused), or came from a default key value (default). If no output stream is specified, then data is written to stream pout. NOTE: under the g++ compiler libraries, printClassData has a maximum output of 4096 characters per line. Implements SAMRAI::tbox::Database. |
|
Print the database keys that were not used to the specified output stream. |
|
Print the database keys that were set via default calls to the specified output stream. |