00001 00017 #ifndef OutputExprTreeVisitor_H 00018 #define OutputExprTreeVisitor_H 00019 00020 #include <OpenAnalysis/IRInterface/IRHandles.hpp> 00021 #include <OpenAnalysis/IRInterface/LinearityIRInterface.hpp> 00022 #include <OpenAnalysis/NewExprTree/NewExprTree.hpp> 00023 #include <OpenAnalysis/NewExprTree/NewExprTreeVisitor.hpp> 00024 #include <OpenAnalysis/Alias/Interface.hpp> 00025 #include <OpenAnalysis/OABase/Annotation.hpp> 00026 00027 namespace OA { 00028 00029 //-------------------------------------------------------------------- 00032 class OutputNewExprTreeVisitor : public NewExprTreeVisitor, public Annotation { 00033 public: 00034 OutputNewExprTreeVisitor(IRHandlesIRInterface& ir); 00035 ~OutputNewExprTreeVisitor() {} 00036 00037 void visitExprTreeBefore(NewExprTree&) { } 00038 void visitExprTreeAfter(NewExprTree&) { } 00039 00040 //--------------------------------------- 00041 // method for each ExprTree::Node subclass 00042 //--------------------------------------- 00043 // default base class so that visitors can handle unknown 00044 // node sub-classes in a generic fashion 00045 void visitNode(NewExprTree::Node&); 00046 00047 void visitOpNode(NewExprTree::OpNode& n); 00048 void visitCallNode(NewExprTree::CallNode& n); 00049 void visitMemRefNode(NewExprTree::MemRefNode& n); 00050 void visitConstSymNode(NewExprTree::ConstSymNode& n); 00051 void visitConstValNode(NewExprTree::ConstValNode& n); 00052 00053 void output(IRHandlesIRInterface&); 00054 00055 bool getIsConst() { return mIsConst; } 00056 00057 00058 private: 00059 bool mIsConst; 00060 int mId; 00061 IRHandlesIRInterface& mIR; 00062 }; 00063 00064 00065 } // end of OA namespace 00066 00067 #endif
1.7.1