1 #ifndef MATH_Environment_H
2 #define MATH_Environment_H
24 map<tString,SP::MATH_Variable> mVariables;
50 static inline SP::MATH_Environment
New() {
132 map<tString,SP::MATH_Variable>::const_iterator iter=mVariables.find(name);
133 if (iter==mVariables.end())
return null;
134 return iter->second.get();
140 map<tString,SP::MATH_Variable>::iterator iter=mVariables.find(name);
141 if (iter==mVariables.end())
return null;
142 return iter->second.get();
162 map<tString,SP::MATH_Variable>::const_iterator iter=mVariables.find(name);
164 return iter->second->getType();
176 map<tString,SP::MATH_Variable>::const_iterator iter=mVariables.begin();
178 while (iter!=mVariables.end()) {
179 variables.push_back(iter->first);
tFlag getVariableType(const tString &name) const
get variable type
Definition: MATH_Environment.h:161
This class decribes a variable class for evaluation.
Definition: MATH_Variable.h:16
static SP::MATH_Variable New()
create a node expression
Definition: MATH_Variable.h:65
MATH_Environment(void)
create
Definition: MATH_Environment.cpp:9
void clear()
clear
Definition: MATH_Environment.h:68
void getCurrentPoint(double p[3]) const
get current point
Definition: MATH_Environment.h:168
void getVariables(vector< tString > &variables) const
get all the variables
Definition: MATH_Environment.h:175
const MATH_Variable * getVariable(const tString &name) const
get variable
Definition: MATH_Environment.h:131
#define tBoolean
Definition: types.h:35
void setCurrentPoint(const tReal p[3])
get current point
Definition: MATH_Environment.h:115
#define null
Definition: types.h:13
virtual ~MATH_Environment(void)
destroy
Definition: MATH_Environment.cpp:12
void setVariable(const tString &name, const tString &value)
set variable
Definition: MATH_Environment.cpp:29
MATH_Variable * getVariable(const tString &name)
get variable
Definition: MATH_Environment.h:139
SP::MATH_Variable addVariable(const tString &name)
add variablewith no type
Definition: MATH_Environment.h:102
abstract base class for most classes.
Definition: CORE_Object.h:30
static SP::MATH_Environment New()
create a node expression
Definition: MATH_Environment.h:50
#define tString
Definition: types.h:36
This class decribes an environment class.
Definition: MATH_Environment.h:14
DEFINE_SPTR(MATH_Environment)
virtual void copy(const MATH_Environment &env)
copy
Definition: MATH_Environment.cpp:14
virtual tString toString() const
print the environment class in a string
Definition: MATH_Environment.cpp:239
void setCurrentPoint(const double p[3])
get current point
Definition: MATH_Environment.h:110
#define tReal
Definition: types.h:18
void setCurrentPoint(const double &x, const double &y, const double &z)
get current point
Definition: MATH_Environment.h:120
static const tFlag UNDEFINED
Definition: MATH_Variable.h:25
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:106
#define tFlag
Definition: types.h:14