7 #include "functionencoding.h"
8 #include "elementencoding.h"
11 #define GETELEMENTTYPE(o) GETASTNODETYPE(o)
12 #define GETELEMENTPARENTS(o) (&((Element*)o)->parents)
15 VectorASTNode parents;
21 ElementEncoding encoding;
24 struct ElementFunction {
28 Boolean * overflowstatus;
29 FunctionEncoding functionencoding;
30 ElementEncoding rangeencoding;
33 Element * allocElementSet(Set *s);
34 Element* allocElementFunction(Function * function, Element ** array, uint numArrays, Boolean * overflowstatus);
35 void deleteElement(Element *This);
36 Set* getElementSet(Element* This);
38 static inline ElementEncoding* getElementEncoding(Element* This){
39 switch(GETELEMENTTYPE(This)){
41 return &((ElementSet*)This)->encoding;
43 return &((ElementFunction*)This)->rangeencoding;
50 static inline FunctionEncoding* getElementFunctionEncoding(ElementFunction* func){
51 return &func->functionencoding;