DifferentiableLocsVisitor.hpp

Go to the documentation of this file.
00001 
00017 #ifndef DifferentiableLocsVisitor_H
00018 #define DifferentiableLocsVisitor_H
00019 
00020 #include <OpenAnalysis/ExprTree/ExprTreeVisitor.hpp>
00021 #include <OpenAnalysis/Alias/Interface.hpp>
00022 
00023 namespace OA {
00024 
00025 //--------------------------------------------------------------------
00028 class DifferentiableLocsVisitor : public ExprTreeVisitor {
00029 public:
00030   DifferentiableLocsVisitor(OA_ptr<Alias::Interface> alias);
00031   ~DifferentiableLocsVisitor() {}
00032 
00033   void visitExprTreeBefore(ExprTree&) 
00034     { mDiffLocs = new LocSet; }
00035   void visitExprTreeAfter(ExprTree&) { }
00036 
00037   //---------------------------------------
00038   // method for each ExprTree::Node subclass
00039   //---------------------------------------
00040   // default base class so that visitors can handle unknown
00041   // node sub-classes in a generic fashion
00042   void visitNode(ExprTree::Node&);
00043 
00044   void visitOpNode(ExprTree::OpNode& n);
00045   void visitCallNode(ExprTree::CallNode& n);
00046   void visitMemRefNode(ExprTree::MemRefNode& n);
00047   void visitConstSymNode(ExprTree::ConstSymNode& n);
00048   void visitConstValNode(ExprTree::ConstValNode& n);
00049 
00051   OA_ptr<LocIterator> getDiffLocsIterator()
00052   { OA_ptr<LocIterator> retval;
00053     retval = new LocSetIterator(mDiffLocs);
00054     return retval;
00055   }
00056 
00057 private:
00058   OA_ptr<LocSet> mDiffLocs;
00059   OA_ptr<Alias::Interface> mAlias;
00060 };
00061 
00062 
00063 } // end of OA namespace
00064 
00065 #endif

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