towards cloning
[satune.git] / src / AST / element.h
index f563586e77b2b5034ddcc18132cadc072aba5675..a230055fe70285712de99ec0212f869f0235d2ba 100644 (file)
 class Element : public ASTNode {
 public:
        Element(ASTNodeType type);
-       virtual ~Element();
+       virtual ~Element() {}
        Vector<ASTNode *> parents;
        ElementEncoding encoding;
+       virtual Element * clone(CSolver * solver, CloneMap * map);
        MEMALLOC;
 };
 
 class ElementConst : public Element {
 public:
-       ElementConst(uint64_t value, VarType type);
-       ~ElementConst();
+       ElementConst(uint64_t value, VarType type, Set *_set);
        Set *set;
        uint64_t value;
+       Element * clone(CSolver * solver, CloneMap * map);
        MEMALLOC;
 };
 
@@ -32,17 +33,18 @@ class ElementSet : public Element {
 public:
        ElementSet(Set *s);
        Set *set;
+       Element * clone(CSolver * solver, CloneMap * map);
        MEMALLOC;
 };
 
 class ElementFunction : public Element {
 public:
        ElementFunction(Function *function, Element **array, uint numArrays, Boolean *overflowstatus);
-       ~ElementFunction();
        Function *function;
        Array<Element *> inputs;
        Boolean *overflowstatus;
        FunctionEncoding functionencoding;
+       Element * clone(CSolver * solver, CloneMap * map);
        MEMALLOC;
 };