Be consistent
[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
8 #define GETELEMENTTYPE(o) GETASTNODETYPE(o)
9 #define GETELEMENTPARENTS(o) (&((Element*)o)->parents)
10
11 struct Element {
12         ASTNode base;
13         VectorASTNode parents;
14 };
15
16 struct ElementSet {
17         Element base;
18         Set * set;
19         ElementEncoding * encoding;
20 };
21
22 struct ElementFunction {
23         Element base;
24         Function * function;
25         Element ** inputs;
26         uint numInputs;
27         Boolean * overflowstatus;
28 };
29
30 Element * allocElementSet(Set *s);
31 Element* allocElementFunction(Function * function, Element ** array, uint numArrays, Boolean * overflowstatus);
32 void deleteElement(Element *This);
33 #endif