#include <Trilinos_Util_CommandLineParser.h>
Public Member Functions | |
Trilinos_Util_Map () | |
virtual | ~Trilinos_Util_Map () |
virtual int | Get (const string input, const int def_value) |
Gets the value of the specified option as an integer. If not found, returns the specified default value. | |
virtual double | Get (const string input, const double def_value) |
Gets the value of the specified option as a double. If not found, returns the specified default value. | |
virtual string | Get (const string input, const string def_value) |
Gets the value of the specified option as a string. If not found, returns the specified default value. | |
virtual bool | Set (const string input, const char *value) |
Modify the value of a database entry. | |
virtual bool | Set (const string input, const string value) |
virtual bool | Set (const string input, const int value) |
virtual bool | Set (const string input, const double value) |
virtual bool | Add (const string input, const string value) |
Add an entry to the databse. | |
bool | SetLabel (string Label) |
string | GetLabel (string Label) |
virtual bool | Has (const string input) |
Check wheter an option is in the database or not. | |
virtual void | ShowAll () const |
Show all the databse entries. | |
virtual void | ShowReallyAll () const |
Show all the databse entries, including entries beginning with "_". | |
virtual void | Reset (void) |
Friends | |
ostream & | operator<< (ostream &os, const Trilinos_Util_Map &S) |
Trilinos_Util_Map::Trilinos_Util_Map | ( | void | ) |
References SetLabel().
virtual Trilinos_Util_Map::~Trilinos_Util_Map | ( | ) | [inline, virtual] |
bool Trilinos_Util_Map::Add | ( | const string | input, | |
const string | value | |||
) | [virtual] |
Add an entry to the databse.
This method add an entry to the databse. First, it checks that this entry does not exist. If it exists, the method returns false
. Otherwise, it adds the entry and returns true
.
References Has().
string Trilinos_Util_Map::Get | ( | const string | input, | |
const string | def_value | |||
) | [virtual] |
Gets the value of the specified option as a string. If not found, returns the specified default value.
double Trilinos_Util_Map::Get | ( | const string | input, | |
const double | def_value | |||
) | [virtual] |
Gets the value of the specified option as a double. If not found, returns the specified default value.
int Trilinos_Util_Map::Get | ( | const string | input, | |
const int | def_value | |||
) | [virtual] |
Gets the value of the specified option as an integer. If not found, returns the specified default value.
Referenced by Trilinos_Util::CommandLineParser::GetProgramName(), and Trilinos_Util::CrsMatrixGallery::Set().
string Trilinos_Util_Map::GetLabel | ( | string | Label | ) | [inline] |
bool Trilinos_Util_Map::Has | ( | const string | input | ) | [virtual] |
Check wheter an option is in the database or not.
This method checks whether option input
is in the databse or not. It returns true
if it is, false
otherwise.
Referenced by Add(), and Trilinos_Util::CrsMatrixGallery::Set().
void Trilinos_Util_Map::Reset | ( | void | ) | [virtual] |
bool Trilinos_Util_Map::Set | ( | const string | input, | |
const double | value | |||
) | [virtual] |
References Set().
bool Trilinos_Util_Map::Set | ( | const string | input, | |
const int | value | |||
) | [virtual] |
References Set().
bool Trilinos_Util_Map::Set | ( | const string | input, | |
const string | value | |||
) | [virtual] |
bool Trilinos_Util_Map::Set | ( | const string | input, | |
const char * | value | |||
) | [virtual] |
Modify the value of a database entry.
This method modifies the value of a database entry. If the entry does not exist in the database, return false
. Otherwise, returns true
.
References SPBLASMAT_STRUCT::val.
Referenced by Trilinos_Util::CommandLineParser::CommandLineParser(), Trilinos_Util::InputFileReader::ReadFile(), and Set().
bool Trilinos_Util_Map::SetLabel | ( | string | Label | ) | [inline] |
Referenced by Trilinos_Util::CommandLineParser::CommandLineParser(), Reset(), and Trilinos_Util_Map().
void Trilinos_Util_Map::ShowAll | ( | ) | const [virtual] |
void Trilinos_Util_Map::ShowReallyAll | ( | ) | const [virtual] |
Show all the databse entries, including entries beginning with "_".
ostream& operator<< | ( | ostream & | os, | |
const Trilinos_Util_Map & | S | |||
) | [friend] |