FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
fei::Param Class Reference

#include <fei_Param.hpp>

Public Types

enum  ParamType {
  STRING = 0, DOUBLE = 1, INT = 2, BOOL = 3,
  VOID = 4, BAD_TYPE = 5
}
 

Public Member Functions

 Param (const char *name, const char *value)
 
 Param (const char *name, double value)
 
 Param (const char *name, int value)
 
 Param (const char *name, const void *value)
 
 Param (const char *name, bool value)
 
 Param (const Param &src)
 
virtual ~Param ()
 
Paramoperator= (const Param &src)
 
const std::string & getName () const
 
ParamType getType () const
 
const std::string & getStringValue () const
 
double getDoubleValue () const
 
int getIntValue () const
 
bool getBoolValue () const
 
const void * getVoidValue () const
 

Private Attributes

ParamType type_
 
std::string name_
 
std::string string_value_
 
double double_value_
 
int int_value_
 
bool bool_value_
 
const void * void_value_
 

Detailed Description

Simple container that pairs a name with a parameter that can be one of several different primitive types. This container is used as the value-type of the class fei::ParameterSet.

Instances of fei::Param are fully defined at construction, and can not be altered later, except by assignment.

Definition at line 23 of file fei_Param.hpp.

Member Enumeration Documentation

enumeration for parameter-types

Enumerator
STRING 
DOUBLE 
INT 
BOOL 
VOID 
BAD_TYPE 

Definition at line 26 of file fei_Param.hpp.

Constructor & Destructor Documentation

fei::Param::Param ( const char *  name,
const char *  value 
)

Constructor

Definition at line 14 of file fei_Param.cpp.

References name_, and string_value_.

fei::Param::Param ( const char *  name,
double  value 
)

Constructor

Definition at line 28 of file fei_Param.cpp.

References name_.

fei::Param::Param ( const char *  name,
int  value 
)

Constructor

Definition at line 41 of file fei_Param.cpp.

References name_.

fei::Param::Param ( const char *  name,
const void *  value 
)

Constructor

Definition at line 67 of file fei_Param.cpp.

References name_.

fei::Param::Param ( const char *  name,
bool  value 
)

Constructor

Definition at line 54 of file fei_Param.cpp.

References name_.

fei::Param::Param ( const Param src)

Copy Constructor

Definition at line 80 of file fei_Param.cpp.

fei::Param::~Param ( )
virtual

Destructor

Definition at line 91 of file fei_Param.cpp.

Member Function Documentation

fei::Param & fei::Param::operator= ( const Param src)

Assignment operator

Definition at line 95 of file fei_Param.cpp.

References bool_value_, double_value_, int_value_, name_, string_value_, and void_value_.

const std::string & fei::Param::getName ( ) const
inline

Query for the name of the parameter

Definition at line 92 of file fei_Param.hpp.

References name_.

Referenced by fei::utils::convert_ParameterSet_to_strings(), Trilinos_Helpers::copy_parameterset(), and fei::ParameterSet::findOffset().

fei::Param::ParamType fei::Param::getType ( ) const
inline
const std::string & fei::Param::getStringValue ( ) const
inline
double fei::Param::getDoubleValue ( ) const
inline

Query for double value. Returned double is meaningless if getType() doesn't return Param::DOUBLE

Definition at line 110 of file fei_Param.hpp.

Referenced by fei::utils::convert_ParameterSet_to_strings(), Trilinos_Helpers::copy_parameterset(), and fei::ParameterSet::getDoubleParamValue().

int fei::Param::getIntValue ( ) const
inline
bool fei::Param::getBoolValue ( ) const
inline
const void * fei::Param::getVoidValue ( ) const
inline

Query for void-pointer value. Returned void-pointer is meaningless if getType() doesn't return Param::VOID

Definition at line 128 of file fei_Param.hpp.

Referenced by fei::ParameterSet::getVoidParamValue().

Member Data Documentation

ParamType fei::Param::type_
private

Definition at line 81 of file fei_Param.hpp.

std::string fei::Param::name_
private

Definition at line 82 of file fei_Param.hpp.

Referenced by getName(), operator=(), and Param().

std::string fei::Param::string_value_
private

Definition at line 83 of file fei_Param.hpp.

Referenced by operator=(), and Param().

double fei::Param::double_value_
private

Definition at line 84 of file fei_Param.hpp.

Referenced by operator=().

int fei::Param::int_value_
private

Definition at line 85 of file fei_Param.hpp.

Referenced by operator=().

bool fei::Param::bool_value_
private

Definition at line 86 of file fei_Param.hpp.

Referenced by operator=().

const void* fei::Param::void_value_
private

Definition at line 87 of file fei_Param.hpp.

Referenced by operator=().


The documentation for this class was generated from the following files: