CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/Fireworks/Core/interface/FWExpressionEvaluator.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef Fireworks_Core_FWExpressionEvaluator_h
00003 #define Fireworks_Core_FWExpressionEvaluator_h
00004 //
00005 // Package:     Core
00006 // Class  :     FWExpressionEvaluator
00007 //
00016 //
00017 // Original Author:  Chris Jones
00018 //         Created:  Fri Feb 29 13:39:51 PST 2008
00019 // $Id: FWExpressionEvaluator.h,v 1.3 2012/06/26 22:13:03 wmtan Exp $
00020 //
00021 
00022 // system include files
00023 #include <string>
00024 #include <Reflex/Type.h>
00025 
00026 // user include files
00027 #include "CommonTools/Utils/src/SelectorPtr.h"
00028 #include "CommonTools/Utils/src/SelectorBase.h"
00029 #include "CommonTools/Utils/src/ExpressionPtr.h"
00030 #include "CommonTools/Utils/src/ExpressionBase.h"
00031 
00032 
00033 // forward declarations
00034 
00035 class FWExpressionEvaluator {
00036 
00037 public:
00038    FWExpressionEvaluator(const std::string& iExpression,
00039                          const std::string& iClassName);
00040    virtual ~FWExpressionEvaluator();
00041 
00042    // ---------- const member functions ---------------------
00043 
00044    const std::string& expression() const;
00045 
00046    double evalExpression(const void*) const;
00047 
00048    // ---------- static member functions --------------------
00049 
00050    // ---------- member functions ---------------------------
00052    void setExpression(const std::string& );
00053    void setClassName(const std::string& );
00054 
00055 private:
00056    //FWExpressionEvaluator(const FWExpressionEvaluator&); // stop default
00057 
00058    //const FWExpressionEvaluator& operator=(const FWExpressionEvaluator&); // stop default
00059 
00060    // ---------- member data --------------------------------
00061    std::string m_expression;
00062    std::string m_className;
00063    reco::parser::ExpressionPtr m_expr;
00064    Reflex::Type m_type;
00065 };
00066 
00067 #endif