Off by 1 bug
[satune.git] / src / Encoders / functionencoding.h
1 #ifndef FUNCTIONENCODING_H
2 #define FUNCTIONENCODING_H
3 #include "classlist.h"
4
5 enum FunctionEncodingType {
6         FUNC_UNASSIGNED, ENUMERATEIMPLICATIONS, ENUMERATEIMPLICATIONSNEGATE, CIRCUIT
7 };
8
9 typedef enum FunctionEncodingType FunctionEncodingType;
10
11 union ElementPredicate {
12         Element *function;
13         Boolean *predicate;
14 };
15
16 typedef union ElementPredicate ElementPredicate;
17
18 class FunctionEncoding {
19 public:
20         FunctionEncodingType type;
21         bool isFunction;//true for function, false for predicate
22         ElementPredicate op;
23         FunctionEncoding(Element *function);
24         FunctionEncoding(Boolean *predicate);
25         void setFunctionEncodingType(FunctionEncodingType type);
26         FunctionEncodingType getFunctionEncodingType() {return type;}
27         CMEMALLOC;
28 };
29
30
31
32 #endif