Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

belong.h

Go to the documentation of this file.
00001 #ifndef _BELONG_H_
00002 #define _BELONG_H_
00003 
00004 class SuccNode;
00005 
00006 class Belong {
00007 
00008 private:
00009    bool is_start;
00010    insn macro;
00011    SuccNode *successor;
00012 
00013 public:
00014 
00015    // default constructor
00016    Belong () {}
00017 
00018    // constructor
00019    Belong (RuleIter rule, InsnVecIter vec) {
00020       is_start = (vec == (rule->second).begin() + 1) ? true : false;
00021       macro = *((rule->second).begin());
00022       successor = (vec != (rule->second).end() - 1) ? (new SuccNode(rule, vec+1)) : NULL;
00023    }
00024 
00025    // destructor
00026    //~Belong() {
00027    //   delete successor;
00028    // }
00029 
00030    // copy-constructor
00031    Belong (const Belong& b) {
00032       is_start = b.is_start;
00033       macro = b.macro;
00034       successor = b.successor;
00035    }
00036 
00037    bool IsStartOp () { return is_start; }
00038    insn GetMacroInsn () { return macro; }
00039    SuccNode *GetSuccessor () { return successor; }
00040 
00041 };
00042 
00043 #endif // _BELONG_H_

Generated on Mon Jul 21 20:24:00 2003 for TINKER LEGO DOC by doxygen 1.3.2