Cleanup #1489: Delete GPU dummy mempool
[charm.git] / src / xlat-i / xi-Member.h
blob502c255f392678d1b64eae9e4e714fc778a89ed9
1 #ifndef _MEMBER_H
2 #define _MEMBER_H
4 #include "xi-Construct.h"
6 namespace xi {
8 class SdagCollection;
9 class ValueList;
10 class WhenStatementEChecker;
11 class Chare;
12 class CEntry;
13 class Type;
14 class NamedType;
16 /* Member of a chare or group, i.e. entry, RO or ROM */
17 class Member : public Construct {
18 // friend class CParsedFile;
19 protected:
20 Chare* container;
22 public:
23 TVarList* tspec;
24 Member() : container(0), tspec(0) {}
25 inline Chare* getContainer() const { return container; }
26 virtual void setChare(Chare* c) { container = c; }
27 virtual void preprocessSDAG() {}
28 virtual int isSdag(void) { return 0; }
29 virtual void collectSdagCode(SdagCollection*) { return; }
30 virtual void collectSdagCode(WhenStatementEChecker*) { return; }
31 XStr makeDecl(const XStr& returnType, int forProxy = 0, bool isStatic = false, XStr fwdStr = XStr());
32 virtual void genPythonDecls(XStr&) {}
33 virtual void genIndexDecls(XStr&) {}
34 virtual void genPythonDefs(XStr&) {}
35 virtual void genPythonStaticDefs(XStr&) {}
36 virtual void genPythonStaticDocs(XStr&) {}
37 virtual void lookforCEntry(CEntry*) {}
38 virtual void genTramTypes() {}
39 virtual bool isTramTarget() { return false; }
42 class Readonly : public Member {
43 int msg; // is it a readonly var(0) or msg(1) ?
44 Type* type;
45 const char* name;
46 ValueList* dims;
47 XStr qName(void) const;
49 public:
50 Readonly(int l, Type* t, const char* n, ValueList* d, int m = 0);
51 void print(XStr& str);
52 void genDecls(XStr& str);
53 void genIndexDecls(XStr& str);
54 void genDefs(XStr& str);
55 void genReg(XStr& str);
58 class InitCall : public Member {
59 const char* name; // Name of subroutine to call
60 int isNodeCall;
62 // DMK - Accel Support
63 int isAccelFlag;
65 public:
66 InitCall(int l, const char* n, int nodeCall);
67 void print(XStr& str);
68 void genReg(XStr& str);
70 // DMK - Accel Support
71 void genAccels_spe_c_callInits(XStr& str);
73 void setAccel();
74 void clearAccel();
75 int isAccel();
78 class PUPableClass : public Member {
79 NamedType* type;
80 PUPableClass* next; // Linked-list of PUPable classes
81 public:
82 PUPableClass(int l, NamedType* type_, PUPableClass* next_);
83 void print(XStr& str);
84 void genDefs(XStr& str);
85 void genReg(XStr& str);
87 // DMK - Accel Support
88 int genAccels_spe_c_funcBodies(XStr& str);
89 void genAccels_spe_c_regFuncs(XStr& str);
90 void genAccels_spe_c_callInits(XStr& str);
91 void genAccels_spe_h_includes(XStr& str);
92 void genAccels_spe_h_fiCountDefs(XStr& str);
93 void genAccels_ppe_c_regFuncs(XStr& str);
96 class IncludeFile : public Member {
97 const char* name; // Name of include file
98 public:
99 IncludeFile(int l, const char* name_);
100 void print(XStr& str);
101 void genDecls(XStr& str);
104 class ClassDeclaration : public Member {
105 const char* name; // Name of class
106 public:
107 ClassDeclaration(int l, const char* name_);
108 void print(XStr& str);
109 void genDecls(XStr& str);
112 } // namespace xi
114 #endif // ifndef _MEMBER_H