Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SAMRAI::tbox::InputDatabase Class Reference

#include <source/toolbox/inputdb/InputDatabase.h>

Inheritance diagram for SAMRAI::tbox::InputDatabase:

Inheritance graph
[legend]
List of all members.

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< DatabaseputDatabase (const string &key)
virtual Pointer< DatabasegetDatabase (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< DatabaseBoxgetDatabaseBoxArray (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< dcomplexgetComplexArray (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

Detailed Description

Class InputDatabase stores (key,value) pairs in a hierarchical database. Each value may be another database, boolean, box, character, complex, double, float, integer, or string. Note that boxes are stored using the toolbox box class that can store boxes of any dimension in the same data structure.

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.


Constructor & Destructor Documentation

SAMRAI::tbox::InputDatabase::InputDatabase const string &  name  )  [inline]
 

The input database constructor creates an empty database with the specified name.

SAMRAI::tbox::InputDatabase::~InputDatabase  )  [virtual]
 

The input database destructor deallocates the data in the database.


Member Function Documentation

string SAMRAI::tbox::InputDatabase::getName  )  const [inline, virtual]
 

Return string name of input database object.

bool SAMRAI::tbox::InputDatabase::keyExists const string &  key  )  [virtual]
 

Return true if the specified key exists in the database and false otherwise.

Implements SAMRAI::tbox::Database.

Array< string > SAMRAI::tbox::InputDatabase::getAllKeys  )  [virtual]
 

Return all keys in the database.

Implements SAMRAI::tbox::Database.

int SAMRAI::tbox::InputDatabase::getArraySize const string &  key  )  [virtual]
 

Return the size of the array associated with the key. If the key does not exist, then zero is returned.

Implements SAMRAI::tbox::Database.

bool SAMRAI::tbox::InputDatabase::isDatabase const string &  key  )  [virtual]
 

Return whether the specified key represents a database entry. If the key does not exist, then false is returned.

Implements SAMRAI::tbox::Database.

Pointer< Database > SAMRAI::tbox::InputDatabase::putDatabase const string &  key  )  [virtual]
 

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.

Pointer< Database > SAMRAI::tbox::InputDatabase::getDatabase const string &  key  )  [virtual]
 

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.

bool SAMRAI::tbox::InputDatabase::isBool const string &  key  )  [virtual]
 

Return whether the specified key represents a boolean entry. If the key does not exist, then false is returned.

Implements SAMRAI::tbox::Database.

void SAMRAI::tbox::InputDatabase::putBool const string &  key,
const bool &  data
[virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putBoolArray const string &  key,
const Array< bool > &  data
[virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putBoolArray const string &  key,
const bool *const   data,
const int  nelements
[virtual]
 

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.

bool SAMRAI::tbox::InputDatabase::getBool const string &  key  )  [virtual]
 

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.

bool SAMRAI::tbox::InputDatabase::getBoolWithDefault const string &  key,
const bool &  defaultvalue
[virtual]
 

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.

Array< bool > SAMRAI::tbox::InputDatabase::getBoolArray const string &  key  )  [virtual]
 

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.

void SAMRAI::tbox::InputDatabase::getBoolArray const string &  key,
bool *  data,
const int  nelements
[virtual]
 

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.

bool SAMRAI::tbox::InputDatabase::isDatabaseBox const string &  key  )  [virtual]
 

Return whether the specified key represents a box entry. If the key does not exist, then false is returned.

Implements SAMRAI::tbox::Database.

void SAMRAI::tbox::InputDatabase::putDatabaseBox const string &  key,
const DatabaseBox data
[virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putDatabaseBoxArray const string &  key,
const Array< DatabaseBox > &  data
[virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putDatabaseBoxArray const string &  key,
const DatabaseBox *const   data,
const int  nelements
[virtual]
 

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.

DatabaseBox SAMRAI::tbox::InputDatabase::getDatabaseBox const string &  key  )  [virtual]
 

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.

DatabaseBox SAMRAI::tbox::InputDatabase::getDatabaseBoxWithDefault const string &  key,
const DatabaseBox defaultvalue
[virtual]
 

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.

Array< DatabaseBox > SAMRAI::tbox::InputDatabase::getDatabaseBoxArray const string &  key  )  [virtual]
 

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.

void SAMRAI::tbox::InputDatabase::getDatabaseBoxArray const string &  key,
DatabaseBox data,
const int  nelements
[virtual]
 

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.

bool SAMRAI::tbox::InputDatabase::isChar const string &  key  )  [virtual]
 

Return whether the specified key represents a character entry. If the key does not exist, then false is returned.

Implements SAMRAI::tbox::Database.

void SAMRAI::tbox::InputDatabase::putChar const string &  key,
const char &  data
[virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putCharArray const string &  key,
const Array< char > &  data
[virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putCharArray const string &  key,
const char *const   data,
const int  nelements
[virtual]
 

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.

char SAMRAI::tbox::InputDatabase::getChar const string &  key  )  [virtual]
 

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.

char SAMRAI::tbox::InputDatabase::getCharWithDefault const string &  key,
const char &  defaultvalue
[virtual]
 

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.

Array< char > SAMRAI::tbox::InputDatabase::getCharArray const string &  key  )  [virtual]
 

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.

void SAMRAI::tbox::InputDatabase::getCharArray const string &  key,
char *  data,
const int  nelements
[virtual]
 

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.

bool SAMRAI::tbox::InputDatabase::isComplex const string &  key  )  [virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putComplex const string &  key,
const dcomplex data
[virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putComplexArray const string &  key,
const Array< dcomplex > &  data
[virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putComplexArray const string &  key,
const dcomplex *const   data,
const int  nelements
[virtual]
 

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.

dcomplex SAMRAI::tbox::InputDatabase::getComplex const string &  key  )  [virtual]
 

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.

dcomplex SAMRAI::tbox::InputDatabase::getComplexWithDefault const string &  key,
const dcomplex defaultvalue
[virtual]
 

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.

Array< dcomplex > SAMRAI::tbox::InputDatabase::getComplexArray const string &  key  )  [virtual]
 

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.

void SAMRAI::tbox::InputDatabase::getComplexArray const string &  key,
dcomplex data,
const int  nelements
[virtual]
 

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.

bool SAMRAI::tbox::InputDatabase::isDouble const string &  key  )  [virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putDouble const string &  key,
const double &  data
[virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putDoubleArray const string &  key,
const Array< double > &  data
[virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putDoubleArray const string &  key,
const double *const   data,
const int  nelements
[virtual]
 

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.

double SAMRAI::tbox::InputDatabase::getDouble const string &  key  )  [virtual]
 

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.

double SAMRAI::tbox::InputDatabase::getDoubleWithDefault const string &  key,
const double &  defaultvalue
[virtual]
 

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.

Array< double > SAMRAI::tbox::InputDatabase::getDoubleArray const string &  key  )  [virtual]
 

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.

void SAMRAI::tbox::InputDatabase::getDoubleArray const string &  key,
double *  data,
const int  nelements
[virtual]
 

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.

bool SAMRAI::tbox::InputDatabase::isFloat const string &  key  )  [virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putFloat const string &  key,
const float &  data
[virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putFloatArray const string &  key,
const Array< float > &  data
[virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putFloatArray const string &  key,
const float *const   data,
const int  nelements
[virtual]
 

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.

float SAMRAI::tbox::InputDatabase::getFloat const string &  key  )  [virtual]
 

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.

float SAMRAI::tbox::InputDatabase::getFloatWithDefault const string &  key,
const float &  defaultvalue
[virtual]
 

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.

Array< float > SAMRAI::tbox::InputDatabase::getFloatArray const string &  key  )  [virtual]
 

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.

void SAMRAI::tbox::InputDatabase::getFloatArray const string &  key,
float *  data,
const int  nelements
[virtual]
 

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.

bool SAMRAI::tbox::InputDatabase::isInteger const string &  key  )  [virtual]
 

Return whether the specified key represents an integer entry. If the key does not exist, then false is returned.

Implements SAMRAI::tbox::Database.

void SAMRAI::tbox::InputDatabase::putInteger const string &  key,
const int &  data
[virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putIntegerArray const string &  key,
const Array< int > &  data
[virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putIntegerArray const string &  key,
const int *const   data,
const int  nelements
[virtual]
 

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.

int SAMRAI::tbox::InputDatabase::getInteger const string &  key  )  [virtual]
 

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.

int SAMRAI::tbox::InputDatabase::getIntegerWithDefault const string &  key,
const int &  defaultvalue
[virtual]
 

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.

Array< int > SAMRAI::tbox::InputDatabase::getIntegerArray const string &  key  )  [virtual]
 

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.

void SAMRAI::tbox::InputDatabase::getIntegerArray const string &  key,
int *  data,
const int  nelements
[virtual]
 

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.

bool SAMRAI::tbox::InputDatabase::isString const string &  key  )  [virtual]
 

Return whether the specified key represents a string entry. If the key does not exist, then false is returned.

Implements SAMRAI::tbox::Database.

void SAMRAI::tbox::InputDatabase::putString const string &  key,
const string &  data
[virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putStringArray const string &  key,
const Array< string > &  data
[virtual]
 

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.

void SAMRAI::tbox::InputDatabase::putStringArray const string &  key,
const string *const   data,
const int  nelements
[virtual]
 

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.

string SAMRAI::tbox::InputDatabase::getString const string &  key  )  [virtual]
 

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.

string SAMRAI::tbox::InputDatabase::getStringWithDefault const string &  key,
const string &  defaultvalue
[virtual]
 

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.

Array< string > SAMRAI::tbox::InputDatabase::getStringArray const string &  key  )  [virtual]
 

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.

void SAMRAI::tbox::InputDatabase::getStringArray const string &  key,
string *  data,
const int  nelements
[virtual]
 

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.

bool SAMRAI::tbox::InputDatabase::keyAccessed const string &  key  )  [inline]
 

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.

void SAMRAI::tbox::InputDatabase::printClassData ostream &  os = pout  )  [virtual]
 

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.

void SAMRAI::tbox::InputDatabase::printUnusedKeys ostream &  os = pout  )  const
 

Print the database keys that were not used to the specified output stream.

void SAMRAI::tbox::InputDatabase::printDefaultKeys ostream &  os = pout  )  const
 

Print the database keys that were set via default calls to the specified output stream.


The documentation for this class was generated from the following files:
Generated on Fri Dec 2 11:33:19 2005 for SAMRAI by  doxygen 1.4.2