Resolving Conflicts ... Still there're errors that should be fixed
[satune.git] / src / AST / element.h
1 #ifndef ELEMENT_H
2 #define ELEMENT_H
3 #include "classlist.h"
4 #include "mymemory.h"
5 #include "structs.h"
6 #include "astnode.h"
7 #include "functionencoding.h"
8 #include "elementencoding.h"
9
10 #define GETELEMENTTYPE(o) GETASTNODETYPE(o)
11 #define GETELEMENTPARENTS(o) (&((Element*)o)->parents)
12
13 struct Element {
14         ASTNode base;
15         VectorASTNode parents;
16 };
17
18 struct ElementSet {
19         Element base;
20         Set * set;
21         ElementEncoding encoding;
22 };
23
24 struct ElementFunction {
25         Element base;
26         Function * function;
27         ArrayElement inputs;
28         Boolean * overflowstatus;
29         FunctionEncoding functionencoding;
30         ElementEncoding domainencoding;
31 };
32
33 Element * allocElementSet(Set *s);
34 Element* allocElementFunction(Function * function, Element ** array, uint numArrays, Boolean * overflowstatus);
35 void deleteElement(Element *This);
36 #endif