CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ExprEvalInterface.h
Go to the documentation of this file.
1 #ifndef ExprEvalInterface_h
2 #define ExprEvalInterface_h
3 
4 #include <string>
5 //#include <vector>
6 //#include <utility>
7 
10 {
11 public:
12  //ExprEvalInterface();
13  virtual ~ExprEvalInterface();
14 
16  virtual
17  void set(const std::string & ns, //< current namespace
18  const std::string & name, //< name of variable inside current namespace
19  const std::string & valueExpr
20  ) = 0;
21 
23  virtual
24  double eval(const std::string & ns, //< current namespace
25  const std::string & expr //< expression to be evaluated inside current namespace
26  ) = 0;
27 
29  virtual
30  bool isDefined(const std::string & ns, //< current namespace
31  const std::string & name //< name of the variable inside current namespace
32  ) = 0;
33 
35 
36  //virtual size_t dictionary(std::vector<pair<std::string,std::string>,double> & result) const;
37 
39  virtual
40  void clear() = 0;
41 };
42 
43 #endif
virtual void set(const std::string &ns, const std::string &name, const std::string &valueExpr)=0
put a new variable named &#39;namespace:name&#39; into the dictionary of the evaluator
virtual ~ExprEvalInterface()
Interface of an Expression Evaluator.
virtual void clear()=0
access to the dictionary (namespace,name)-&gt;value
virtual double eval(const std::string &ns, const std::string &expr)=0
evaluate an expression expr inside the local namespace
virtual bool isDefined(const std::string &ns, const std::string &name)=0
check whether a variable is already defined or not