edits
[satune.git] / src / AST / set.h
1 /*
2  * File:   set.h
3  * Author: hamed
4  *
5  * Created on June 13, 2017, 3:01 PM
6  */
7
8 #ifndef SET_H
9 #define SET_H
10
11 #include "classlist.h"
12 #include "structs.h"
13 #include "mymemory.h"
14
15 class Set {
16  public:
17         Set(VarType t, uint64_t *elements, uint num);
18         Set(VarType t, uint64_t lowrange, uint64_t highrange);
19         ~Set();
20         bool exists(uint64_t element);
21         uint getSize();
22         uint64_t getElement(uint index);
23         
24         VarType type;
25         bool isRange;
26         uint64_t low;//also used to count unique items
27         uint64_t high;
28         VectorInt *members;
29         MEMALLOC;
30 };
31
32
33 #endif/* SET_H */
34