SAMRAI::tbox::NullDatabase Class Reference

#include <source/toolbox/restartdb/NullDatabase.h>

Inheritance diagram for SAMRAI::tbox::NullDatabase:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 NullDatabase ()
virtual ~NullDatabase ()
virtual bool create (const std::string &name)
virtual bool open (const std::string &name)
virtual bool close ()
virtual bool keyExists (const std::string &key)
virtual Array< std::string > getAllKeys ()
virtual enum DataType getArrayType (const std::string &key)
virtual int getArraySize (const std::string &key)
virtual bool isDatabase (const std::string &key)
virtual Pointer< DatabaseputDatabase (const std::string &key)
virtual Pointer< DatabasegetDatabase (const std::string &key)
virtual bool isBool (const std::string &key)
virtual void putBoolArray (const std::string &key, const bool *const data, const int nelements)
virtual Array< bool > getBoolArray (const std::string &key)
virtual bool isDatabaseBox (const std::string &key)
virtual void putDatabaseBoxArray (const std::string &key, const DatabaseBox *const data, const int nelements)
virtual Array< DatabaseBoxgetDatabaseBoxArray (const std::string &key)
virtual bool isChar (const std::string &key)
virtual void putCharArray (const std::string &key, const char *const data, const int nelements)
virtual Array< char > getCharArray (const std::string &key)
virtual bool isComplex (const std::string &key)
virtual void putComplexArray (const std::string &key, const dcomplex *const data, const int nelements)
virtual Array< dcomplexgetComplexArray (const std::string &key)
virtual bool isDouble (const std::string &key)
virtual void putDoubleArray (const std::string &key, const double *const data, const int nelements)
virtual Array< double > getDoubleArray (const std::string &key)
virtual bool isFloat (const std::string &key)
virtual void putFloatArray (const std::string &key, const float *const data, const int nelements)
virtual Array< float > getFloatArray (const std::string &key)
virtual bool isInteger (const std::string &key)
virtual void putIntegerArray (const std::string &key, const int *const data, const int nelements)
virtual Array< int > getIntegerArray (const std::string &key)
virtual bool isString (const std::string &key)
virtual void putStringArray (const std::string &key, const std::string *const data, const int nelements)
virtual Array< std::string > getStringArray (const std::string &key)
virtual std::string getName ()
virtual void printClassData (std::ostream &os=pout)

Detailed Description

The NullDatabase provides an implementation of the Database interface with empty methods for the purpose of reducing the the number of guards necessary in methods from other classes that use databases.

See the Database class documentation for a description of the generic database interface.


Constructor & Destructor Documentation

SAMRAI::tbox::NullDatabase::NullDatabase (  )  [inline]

The null database constructor creates an empty database with the name "null".

SAMRAI::tbox::NullDatabase::~NullDatabase (  )  [inline, virtual]

The input database destructor deallocates the data in the database.


Member Function Documentation

bool SAMRAI::tbox::NullDatabase::create ( const std::string &  name  )  [inline, virtual]

Create a new database file.

Returns true if successful.

Parameters:
name name of database. Normally a filename.

Implements SAMRAI::tbox::Database.

bool SAMRAI::tbox::NullDatabase::open ( const std::string &  name  )  [inline, virtual]

Open an existing database file.

Returns true if successful.

Parameters:
name name of database. Normally a filename.

Implements SAMRAI::tbox::Database.

bool SAMRAI::tbox::NullDatabase::close (  )  [inline, virtual]

Close the database.

Returns true if successful.

If the database is currently open then close it. This should flush all data to the file (if the database is on disk).

Implements SAMRAI::tbox::Database.

bool SAMRAI::tbox::NullDatabase::keyExists ( const std::string &  key  )  [inline, virtual]

Always returns true.

Implements SAMRAI::tbox::Database.

Array< std::string > SAMRAI::tbox::NullDatabase::getAllKeys (  )  [inline, virtual]

Return an empty Array<string>.

Implements SAMRAI::tbox::Database.

Database::DataType SAMRAI::tbox::NullDatabase::getArrayType ( const std::string &  key  )  [inline, virtual]

Return INVALID.

Implements SAMRAI::tbox::Database.

int SAMRAI::tbox::NullDatabase::getArraySize ( const std::string &  key  )  [inline, virtual]

Always returns 0.

Implements SAMRAI::tbox::Database.

bool SAMRAI::tbox::NullDatabase::isDatabase ( const std::string &  key  )  [inline, virtual]

Always returns true.

Implements SAMRAI::tbox::Database.

Pointer< Database > SAMRAI::tbox::NullDatabase::putDatabase ( const std::string &  key  )  [inline, virtual]

Returns a pointer to the null database.

Implements SAMRAI::tbox::Database.

Pointer< Database > SAMRAI::tbox::NullDatabase::getDatabase ( const std::string &  key  )  [inline, virtual]

Returns a pointer to the null database.

Implements SAMRAI::tbox::Database.

bool SAMRAI::tbox::NullDatabase::isBool ( const std::string &  key  )  [inline, virtual]

Always returns true.

Implements SAMRAI::tbox::Database.

void SAMRAI::tbox::NullDatabase::putBoolArray ( const std::string &  key,
const bool *const   data,
const int  nelements 
) [inline, virtual]

Does nothing.

Implements SAMRAI::tbox::Database.

Array< bool > SAMRAI::tbox::NullDatabase::getBoolArray ( const std::string &  key  )  [inline, virtual]

Returns an empty Array<bool>.

Implements SAMRAI::tbox::Database.

bool SAMRAI::tbox::NullDatabase::isDatabaseBox ( const std::string &  key  )  [inline, virtual]

Always returns true.

Implements SAMRAI::tbox::Database.

void SAMRAI::tbox::NullDatabase::putDatabaseBoxArray ( const std::string &  key,
const DatabaseBox *const   data,
const int  nelements 
) [inline, virtual]

Does nothing.

Implements SAMRAI::tbox::Database.

Array< DatabaseBox > SAMRAI::tbox::NullDatabase::getDatabaseBoxArray ( const std::string &  key  )  [inline, virtual]

Returns an empty Array<box>.

Implements SAMRAI::tbox::Database.

bool SAMRAI::tbox::NullDatabase::isChar ( const std::string &  key  )  [inline, virtual]

Always returns true.

Implements SAMRAI::tbox::Database.

void SAMRAI::tbox::NullDatabase::putCharArray ( const std::string &  key,
const char *const   data,
const int  nelements 
) [inline, virtual]

Does nothing.

Implements SAMRAI::tbox::Database.

Array< char > SAMRAI::tbox::NullDatabase::getCharArray ( const std::string &  key  )  [inline, virtual]

Returns an empty Array<char>.

Implements SAMRAI::tbox::Database.

bool SAMRAI::tbox::NullDatabase::isComplex ( const std::string &  key  )  [inline, virtual]

Always returns true.

Implements SAMRAI::tbox::Database.

void SAMRAI::tbox::NullDatabase::putComplexArray ( const std::string &  key,
const dcomplex *const   data,
const int  nelements 
) [inline, virtual]

Does nothing.

Implements SAMRAI::tbox::Database.

Array< dcomplex > SAMRAI::tbox::NullDatabase::getComplexArray ( const std::string &  key  )  [inline, virtual]

Returns an empty Array<dcomplex>.

Implements SAMRAI::tbox::Database.

bool SAMRAI::tbox::NullDatabase::isDouble ( const std::string &  key  )  [inline, virtual]

Always returns true.

Implements SAMRAI::tbox::Database.

void SAMRAI::tbox::NullDatabase::putDoubleArray ( const std::string &  key,
const double *const   data,
const int  nelements 
) [inline, virtual]

Does nothing.

Implements SAMRAI::tbox::Database.

Array< double > SAMRAI::tbox::NullDatabase::getDoubleArray ( const std::string &  key  )  [inline, virtual]

Returns an empty Array<double>.

Implements SAMRAI::tbox::Database.

bool SAMRAI::tbox::NullDatabase::isFloat ( const std::string &  key  )  [inline, virtual]

Always return true.

Implements SAMRAI::tbox::Database.

void SAMRAI::tbox::NullDatabase::putFloatArray ( const std::string &  key,
const float *const  data,
const int  nelements 
) [inline, virtual]

Does nothing.

Implements SAMRAI::tbox::Database.

Array< float > SAMRAI::tbox::NullDatabase::getFloatArray ( const std::string &  key  )  [inline, virtual]

Returns an empty Array<float>.

Implements SAMRAI::tbox::Database.

bool SAMRAI::tbox::NullDatabase::isInteger ( const std::string &  key  )  [inline, virtual]

Always returns true.

Implements SAMRAI::tbox::Database.

void SAMRAI::tbox::NullDatabase::putIntegerArray ( const std::string &  key,
const int *const   data,
const int  nelements 
) [inline, virtual]

Does nothing.

Implements SAMRAI::tbox::Database.

Array< int > SAMRAI::tbox::NullDatabase::getIntegerArray ( const std::string &  key  )  [inline, virtual]

Returns an empty Array<int>.

Implements SAMRAI::tbox::Database.

bool SAMRAI::tbox::NullDatabase::isString ( const std::string &  key  )  [inline, virtual]

Always returns true.

Implements SAMRAI::tbox::Database.

void SAMRAI::tbox::NullDatabase::putStringArray ( const std::string &  key,
const std::string *const   data,
const int  nelements 
) [inline, virtual]

Does nothing.

Implements SAMRAI::tbox::Database.

Array< std::string > SAMRAI::tbox::NullDatabase::getStringArray ( const std::string &  key  )  [inline, virtual]

Returns an empty Array<std::string>.

Implements SAMRAI::tbox::Database.

std::string SAMRAI::tbox::NullDatabase::getName (  )  [inline, virtual]

Does nothing.

Implements SAMRAI::tbox::Database.

void SAMRAI::tbox::NullDatabase::printClassData ( std::ostream &  os = pout  )  [inline, virtual]

Does nothing.

Implements SAMRAI::tbox::Database.


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:29:07 2009 for SAMRAI by  doxygen 1.5.1