FEI Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
fei_Param.hpp
Go to the documentation of this file.
1/*--------------------------------------------------------------------*/
2/* Copyright 2005 Sandia Corporation. */
3/* Under the terms of Contract DE-AC04-94AL85000, there is a */
4/* non-exclusive license for use of this work by or on behalf */
5/* of the U.S. Government. Export of this program may require */
6/* a license from the United States Government. */
7/*--------------------------------------------------------------------*/
8
9#ifndef _fei_Param_hpp_
10#define _fei_Param_hpp_
11
12#include <fei_macros.hpp>
13#include <string>
14
15namespace fei {
23class Param {
24 public:
26 enum ParamType {
27 STRING = 0,
28 DOUBLE = 1,
29 INT = 2,
30 BOOL = 3,
31 VOID = 4,
32 BAD_TYPE = 5
33 };
34
36 Param(const char* name, const char* value);
38 Param(const char* name, double value);
40 Param(const char* name, int value);
42 Param(const char* name, const void* value);
44 Param(const char* name, bool value);
46 Param(const Param& src);
47
49 virtual ~Param();
50
52 Param& operator=(const Param& src);
53
55 const std::string& getName() const;
56
58 ParamType getType() const;
59
62 const std::string& getStringValue() const;
63
66 double getDoubleValue() const;
67
70 int getIntValue() const;
71
74 bool getBoolValue() const;
75
78 const void* getVoidValue() const;
79
80 private:
82 std::string name_;
83 std::string string_value_;
87 const void* void_value_;
88};
89}//namespace fei
90
91inline
92const std::string& fei::Param::getName() const
93{
94 return name_;
95}
96
97inline
99{
100 return type_;
101}
102
103inline
104const std::string& fei::Param::getStringValue() const
105{
106 return string_value_;
107}
108
109inline
111{
112 return double_value_;
113}
114
115inline
117{
118 return int_value_;
119}
120
121inline
123{
124 return bool_value_;
125}
126
127inline
128const void* fei::Param::getVoidValue() const
129{
130 return void_value_;
131}
132#endif
const std::string & getStringValue() const
std::string string_value_
Definition fei_Param.hpp:83
Param(const char *name, const char *value)
Definition fei_Param.cpp:14
double getDoubleValue() const
virtual ~Param()
Definition fei_Param.cpp:91
ParamType getType() const
Definition fei_Param.hpp:98
const void * void_value_
Definition fei_Param.hpp:87
bool getBoolValue() const
const std::string & getName() const
Definition fei_Param.hpp:92
Param & operator=(const Param &src)
Definition fei_Param.cpp:95
ParamType type_
Definition fei_Param.hpp:81
const void * getVoidValue() const
int getIntValue() const
double double_value_
Definition fei_Param.hpp:84
std::string name_
Definition fei_Param.hpp:82
bool bool_value_
Definition fei_Param.hpp:86