Loop.hpp

Go to the documentation of this file.
00001 
00012 #ifndef Loop_H
00013 #define Loop_H
00014 
00015 #include <OpenAnalysis/IRInterface/IRHandles.hpp>
00016 #include <OpenAnalysis/Utils/SetIterator.hpp>
00017 #include <OpenAnalysis/Utils/OA_ptr.hpp>
00018 #include <OpenAnalysis/OABase/Annotation.hpp>
00019 #include <OpenAnalysis/Utils/GenOutputTool.hpp>
00020 #include "LoopIndex.hpp"
00021 #include <list>
00022 using namespace std;
00023 
00024 namespace OA {
00025 
00026 typedef SetIterator<StmtHandle> StmtIterator;
00027 
00028 class Loop : public virtual Annotation {
00029   public:
00030     Loop(OA_ptr<LoopIndex> loopIndex);
00031 
00033     StmtIterator getStmtIterator();
00034 
00041     int getStmtOrder(StmtHandle stm1, StmtHandle stm2);
00042 
00043     //- [Accessor methods] -
00044     OA_ptr<LoopIndex> getLoopIndex() { return mLoopIndex; }
00045 
00046     // - [output methods] - (derived from Annotation)
00047     virtual void output(IRHandlesIRInterface &ir);
00048 
00049   private:
00050   OUTPUT
00051     GENOUT  set<StmtHandle>   mStatements;
00052     GENOUT  OA_ptr<LoopIndex> mLoopIndex;
00053 };
00054 
00055 
00056 } // namespaces
00057 
00058 #endif
00059