diff options
Diffstat (limited to 'src/expr/expr_sequence.i')
-rw-r--r-- | src/expr/expr_sequence.i | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/expr/expr_sequence.i b/src/expr/expr_sequence.i index 42e130466..294937024 100644 --- a/src/expr/expr_sequence.i +++ b/src/expr/expr_sequence.i @@ -2,6 +2,42 @@ #include "expr/expr_sequence.h" %} +#ifdef SWIGJAVA + +%typemap(javabody) CVC4::ExprSequence %{ + 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, Type type, vectorExpr seq) { + this(type, seq); + this.em = em; + } +%} + +// Workaround for https://github.com/swig/swig/commit/63a5a8af88271559a7b170794b4c61c30b8934ea +%typemap(javaconstruct) ExprSequence { + this(null, $imcall, true); +} + +%typemap(javaconstruct) CVC4::ExprSequence { + this(null, $imcall, true); +} + +%javamethodmodifiers CVC4::ExprSequence::ExprSequence(Type type, vectorExpr seq) "private"; + +#endif + %rename(equals) CVC4::ExprSequence::operator==(const ExprSequence&) const; %ignore CVC4::ExprSequence::operator!=(const ExprSequence&) const; %ignore CVC4::ExprSequence::getSequence() const; |