Fixing memory buggit status
[satune.git] / src / Encoders / functionencoding.h
index c7cf27e3c0743cf17b26225f614518195f00cd8f..a7b6364a67af95d71d617c8423475ff69c91a707 100644 (file)
@@ -3,26 +3,30 @@
 #include "classlist.h"
 
 enum FunctionEncodingType {
-       FUNC_UNASSIGNED, ENUMERATEIMPLICATIONS, CIRCUIT
+       FUNC_UNASSIGNED, ENUMERATEIMPLICATIONS, ENUMERATEIMPLICATIONSNEGATE, CIRCUIT
 };
 
 typedef enum FunctionEncodingType FunctionEncodingType;
 
 union ElementPredicate {
-       Element * function;
-       Boolean * predicate;
+       Element *function;
+       Boolean *predicate;
 };
 
 typedef union ElementPredicate ElementPredicate;
 
-struct FunctionEncoding {
+class FunctionEncoding {
+public:
        FunctionEncodingType type;
        bool isFunction;//true for function, false for predicate
        ElementPredicate op;
+       FunctionEncoding(Element *function);
+       FunctionEncoding(Boolean *predicate);
+       void setFunctionEncodingType(FunctionEncodingType type);
+       FunctionEncodingType getFunctionEncodingType() {return type;}
+       CMEMALLOC;
 };
 
-void initFunctionEncoding(FunctionEncoding *encoding, Element *function);
-void initPredicateEncoding(FunctionEncoding *encoding, Boolean *predicate);
-void deleteFunctionEncoding(FunctionEncoding *This);
+
 
 #endif