00001 #ifndef _CEntry_H_
00002 #define _CEntry_H_
00003
00004 #include "sdag-globals.h"
00005 #include "xi-util.h"
00006
00007 #include <list>
00008
00009 namespace xi {
00010
00011 class Entry;
00012 class SdagConstruct;
00013 class WhenConstruct;
00014 class ParamList;
00015 class CStateVar;
00016
00017 class CEntry {
00018 std::list<CStateVar*> myParameters;
00019
00020 std::list<Entry*> candidateEntries_;
00021
00022 public:
00023 int first_line_, last_line_;
00024 XStr* entry;
00025 Entry* decl_entry;
00026
00027 ParamList* paramlist;
00028 int entryNum;
00029 int needsParamMarshalling;
00030 int refNumNeeded;
00031 std::list<WhenConstruct*> whenList;
00032 CEntry(XStr* e, ParamList* p, const std::list<CStateVar*>& list, int pm, int fl = -1,
00033 int ll = -1)
00034 : entry(e),
00035 paramlist(p),
00036 needsParamMarshalling(pm),
00037 first_line_(fl),
00038 last_line_(ll) {
00039 CStateVar* sv;
00040 myParameters = list;
00041 entryNum = numEntries++;
00042 refNumNeeded = 0;
00043 decl_entry = NULL;
00044 }
00045
00046 void print(int indent) {
00047 Indent(indent);
00048
00049 }
00050
00051 void generateCode(XStr& decls, XStr& defs);
00052 void generateDeps(XStr& op);
00053
00054 std::list<Entry*> getCandidates();
00055 void addCandidate(Entry* e);
00056 void check();
00057 };
00058
00059 }
00060
00061 #endif