EvalToConstVisitorIRInterface.hpp

Go to the documentation of this file.
00001 
00016 #ifndef EvalToConstVisitorIRInterface_h
00017 #define EvalToConstVisitorIRInterface_h
00018 
00019 //#include <list>
00020 //#include <utility>      // for pair datatype
00021 #include <OpenAnalysis/IRInterface/IRHandles.hpp>
00022 #include <OpenAnalysis/Utils/OA_ptr.hpp>
00023 #include <OpenAnalysis/IRInterface/ConstValBasicInterface.hpp>
00024 
00025 namespace OA {
00026 
00027 //typedef std::pair<MemRefHandle,ExprHandle> ExprStmtPair;
00028 //typedef std::list<ExprStmtPair> ExprStmtPairList;
00029 
00035 class EvalToConstVisitorIRInterface : public virtual IRHandlesIRInterface {
00036  public:
00037   EvalToConstVisitorIRInterface() { }
00038   virtual ~EvalToConstVisitorIRInterface() { }
00039 
00044   virtual OA_ptr<ConstValBasicInterface> 
00045       evalOp(OpHandle op, OA_ptr<ConstValBasicInterface> operand1, 
00046                           OA_ptr<ConstValBasicInterface> operand2) = 0;
00047   
00051   virtual OA_ptr<ConstValBasicInterface> 
00052       getConstValBasic(ConstSymHandle c) = 0;
00053 
00057   virtual OA_ptr<ConstValBasicInterface> 
00058       getConstValBasic(ConstValHandle c) = 0;
00059 
00061   // given a ConstValBasicInterface, print out value if any
00062   virtual std::string toString(OA_ptr<ConstValBasicInterface> cvPtr) = 0;
00063   // need all for full override
00064   virtual std::string toString(const ProcHandle h) = 0;
00065   virtual std::string toString(const StmtHandle h) = 0;
00066   virtual std::string toString(const ExprHandle h) = 0;
00067   virtual std::string toString(const OpHandle h) = 0;
00068   virtual std::string toString(const MemRefHandle h) = 0;
00069   virtual std::string toString(const SymHandle h) = 0;
00070   virtual std::string toString(const ConstSymHandle h) = 0;
00071   virtual std::string toString(const ConstValHandle h) = 0;
00072 
00074   // Given an unsigned int, return a ConstValBAsicInterface for it
00075   virtual OA_ptr<ConstValBasicInterface> 
00076       getConstValBasic (unsigned int val) = 0;
00077 
00079   // should be removed after testing
00080   virtual int returnOpEnumValInt(OA::OpHandle op) = 0;
00081 
00082 };
00083 
00084 } // end of namespace OA
00085 
00086 #endif 

Generated on Sat Oct 31 05:21:21 2009 for OpenAnalysis by  doxygen 1.6.1