diff options
Diffstat (limited to 'src/expr/emptyset.i')
-rw-r--r-- | src/expr/emptyset.i | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/expr/emptyset.i b/src/expr/emptyset.i index ada3dd583..bcd3a0a92 100644 --- a/src/expr/emptyset.i +++ b/src/expr/emptyset.i @@ -2,6 +2,48 @@ #include "expr/emptyset.h" %} +#ifdef SWIGJAVA + +%typemap(javabody) CVC4::EmptySet %{ + private long swigCPtr; + protected boolean swigCMemOwn; + private ExprManager em; + + protected $javaclassname(ExprManager em, long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + this.em = em; // keep ref to em in SWIG proxy class + } + + protected static long getCPtr($javaclassname obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + public $javaclassname(ExprManager em, SetType t) { + this(t); + this.em = em; + } +%} + +// Workaround for https://github.com/swig/swig/commit/63a5a8af88271559a7b170794b4c61c30b8934ea +%typemap(javaconstruct) EmptySet { + this(null, $imcall, true); +} + +%typemap(javaconstruct) CVC4::EmptySet { + this(null, $imcall, true); +} + +%javamethodmodifiers CVC4::EmptySet::EmptySet(Type t) "private"; + +%typemap(javaout) const CVC4::SetType& { + return new SetType(this.em, $jnicall, false); +} + +#endif + +%ignore CVC4::EmptySet::EmptySet(const CVC4::EmptySet& other); + %rename(equals) CVC4::EmptySet::operator==(const EmptySet&) const; %ignore CVC4::EmptySet::operator!=(const EmptySet&) const; |