00001 #ifndef _CONSTRUCT_H 00002 #define _CONSTRUCT_H 00003 00004 #include "xi-AstNode.h" 00005 00006 namespace xi { 00007 00008 class Module; 00009 00010 class Construct : public virtual AstNode { 00011 protected: 00012 int external; 00013 00014 public: 00015 // FIXME?: isn't this circular since Module < Construct? 00016 Module* containerModule; 00017 explicit Construct(); 00018 void setExtern(int& e); 00019 void setModule(Module* m); 00020 virtual bool isTramTarget() { return false; } 00021 }; 00022 00023 // FIXME?: shouldn't the "public virtual" be here instead of in the Construct baseclass? 00024 class ConstructList : public AstChildren<Construct>, public Construct { 00025 public: 00026 ConstructList(int l, Construct* c, ConstructList* n = 0); 00027 using AstChildren<Construct>::isTramTarget; 00028 }; 00029 00030 /******************** AccelBlock : Block of code for accelerator **********************/ 00031 class AccelBlock : public Construct { 00032 protected: 00033 XStr* code; 00034 00035 private: 00036 void outputCode(XStr& str); 00037 00038 public: 00040 AccelBlock(int l, XStr* c); 00041 ~AccelBlock(); 00042 00044 void print(XStr& str); 00045 00047 void genDefs(XStr& str); 00048 00050 int genAccels_spe_c_funcBodies(XStr& str); 00051 }; 00052 00053 } // namespace xi 00054 00055 #endif // ifndef _CONSTRUCT_H