insnameelem.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2001, The University of Queensland
00003  *
00004  * See the file "LICENSE.TERMS" for information on usage and
00005  * redistribution of this file, and for a DISCLAIMER OF ALL
00006  * WARRANTIES.
00007  *
00008  */
00009 
00010 /*
00011  * insnameelem.h
00012  *
00013  * header for insnameelem.cc
00014  * class declarations for class InsNameElem
00015  *
00016  * Last Modified
00017  * 19 Feb 01 - Simon: created
00018  */
00019 
00020 #ifndef INSNAMEELEM_H
00021 #define INSNAMEELEM_H
00022 
00023 #include "table.h"
00024 
00025 class InsNameElem {
00026 
00027 public:
00028     InsNameElem(const char *name);
00029     virtual ~InsNameElem(void);
00030     virtual int ntokens(void);
00031     virtual std::string getinstruction(void);
00032     virtual std::string getinspattern(void);
00033     virtual void getrefmap(std::map<std::string, InsNameElem*> &m);
00034  
00035     int ninstructions(void);
00036     void append(InsNameElem* next);
00037     bool increment(void);
00038     void reset(void);
00039     int getvalue(void);
00040     
00041 protected:
00042     InsNameElem* nextelem;
00043     std::string elemname;
00044     int value;
00045 };
00046 
00047 class InsOptionElem : public InsNameElem {
00048 
00049 public:
00050     InsOptionElem(const char *name);
00051     virtual int ntokens(void);
00052     virtual std::string getinstruction(void);
00053     virtual std::string getinspattern(void);
00054  
00055 };
00056 
00057 class InsListElem : public InsNameElem {
00058 
00059 public:
00060     InsListElem(const char *name, Table* t, const char *idx);
00061     virtual int ntokens(void);
00062     virtual std::string getinstruction(void);
00063     virtual std::string getinspattern(void);
00064     virtual void getrefmap(std::map<std::string, InsNameElem*> &m);
00065 
00066     std::string getindex(void);
00067 
00068 protected:
00069     std::string indexname;
00070     Table* thetable;
00071 };
00072 
00073 #endif

Generated on Tue Sep 19 21:18:24 2006 for Boomerang by  doxygen 1.4.6