X-Git-Url: http://plrg.eecs.uci.edu/git/?p=satune.git;a=blobdiff_plain;f=src%2FAST%2Fset.h;h=bb246b6f690d7e1c0542bb869f6f2b2e7780a441;hp=5139927e690e759592ab18ab5d326f090e0fffca;hb=7ab5516d0205e463969af92c1b200a316d4a08f0;hpb=77f9b4609b853b25543629ff3aba5cbe755e6e96 diff --git a/src/AST/set.h b/src/AST/set.h index 5139927..bb246b6 100644 --- a/src/AST/set.h +++ b/src/AST/set.h @@ -12,18 +12,23 @@ #include "structs.h" #include "mymemory.h" -struct Set { +class Set { +public: + Set(VarType t); + Set(VarType t, uint64_t *elements, uint num); + Set(VarType t, uint64_t lowrange, uint64_t highrange); + ~Set(); + bool exists(uint64_t element); + uint getSize(); + uint64_t getElement(uint index); + VarType type; bool isRange; uint64_t low;//also used to count unique items uint64_t high; - VectorInt * members; + Vector *members; + MEMALLOC; }; -Set * allocSet(VarType t, uint64_t * elements, uint num); -Set * allocSetRange(VarType t, uint64_t lowrange, uint64_t highrange); -bool existsInSet(Set * This, uint64_t element); -uint getSetSize(Set * This); -void deleteSet(Set * This); #endif/* SET_H */