00001 #ifndef gridripper_math_expr_StkVar_h
00002 #define gridripper_math_expr_StkVar_h
00003
00004 #include <gridripper/math/expr/StkFunc.h>
00005
00006 namespace gridripper { namespace math { namespace expr {
00007
00008 using namespace std;
00009
00017 class StkVar: public StkFunc
00018 {
00019 public:
00021 GReal_t value;
00022 public:
00028 StkVar(const string& name, GReal_t value = 0):
00029 StkFunc(name, 0), value(value) { }
00030
00035 StkVar(const StkVar& other): StkFunc(other), value(other.value) { }
00036
00041 void evalStack(GReal_t* &p) const { *(++p) = value; }
00042
00047 virtual string getClassName() const { return "StkVar"; }
00048 };
00049
00050 } } }
00051
00052 #endif