FEI
Version of the Day
base
fei_Param.hpp
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
15
namespace
fei
{
23
class
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
:
81
ParamType
type_;
82
std::string name_;
83
std::string string_value_;
84
double
double_value_;
85
int
int_value_;
86
bool
bool_value_;
87
const
void
* void_value_;
88
};
89
}
//namespace fei
90
91
inline
92
const
std::string&
fei::Param::getName
()
const
93
{
94
return
name_;
95
}
96
97
inline
98
fei::Param::ParamType
fei::Param::getType
()
const
99
{
100
return
type_;
101
}
102
103
inline
104
const
std::string&
fei::Param::getStringValue
()
const
105
{
106
return
string_value_;
107
}
108
109
inline
110
double
fei::Param::getDoubleValue
()
const
111
{
112
return
double_value_;
113
}
114
115
inline
116
int
fei::Param::getIntValue
()
const
117
{
118
return
int_value_;
119
}
120
121
inline
122
bool
fei::Param::getBoolValue
()
const
123
{
124
return
bool_value_;
125
}
126
127
inline
128
const
void
*
fei::Param::getVoidValue
()
const
129
{
130
return
void_value_;
131
}
132
#endif
fei::Param::operator=
Param & operator=(const Param &src)
Definition:
fei_Param.cpp:95
fei::Param::getVoidValue
const void * getVoidValue() const
Definition:
fei_Param.hpp:128
fei::Param::getStringValue
const std::string & getStringValue() const
Definition:
fei_Param.hpp:104
fei::Param::getBoolValue
bool getBoolValue() const
Definition:
fei_Param.hpp:122
fei::Param::~Param
virtual ~Param()
Definition:
fei_Param.cpp:91
fei::Param::Param
Param(const char *name, const char *value)
Definition:
fei_Param.cpp:14
fei::Param::getType
ParamType getType() const
Definition:
fei_Param.hpp:98
fei::Param::getName
const std::string & getName() const
Definition:
fei_Param.hpp:92
fei::Param::getIntValue
int getIntValue() const
Definition:
fei_Param.hpp:116
fei::Param
Definition:
fei_Param.hpp:23
fei::Param::getDoubleValue
double getDoubleValue() const
Definition:
fei_Param.hpp:110
fei
Definition:
fei_ArrayUtils.hpp:16
fei::Param::ParamType
ParamType
Definition:
fei_Param.hpp:26
Generated by
1.8.16