diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2020-02-20 09:02:58 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-20 11:02:58 -0600 |
commit | 92f5835e86e6741eb6b273047e0a003212a8b638 (patch) | |
tree | 8a3ee295b4858201ad94d3633a31ea9fc584e7ba /src/smt/command.i | |
parent | 508ecb3007a2b6aa8b76b28dc8282247b5dba957 (diff) |
Remove parser from bindings (#3779)
Diffstat (limited to 'src/smt/command.i')
-rw-r--r-- | src/smt/command.i | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/src/smt/command.i b/src/smt/command.i deleted file mode 100644 index bd28fa8e5..000000000 --- a/src/smt/command.i +++ /dev/null @@ -1,72 +0,0 @@ -%{ -#include "smt/command.h" - -#ifdef SWIGJAVA - -#include "bindings/java_iterator_adapter.h" -#include "bindings/java_stream_adapters.h" - -#endif /* SWIGJAVA */ -%} - -%ignore CVC4::operator<<(std::ostream&, const Command&); -%ignore CVC4::operator<<(std::ostream&, const Command*); -%ignore CVC4::operator<<(std::ostream&, const CommandStatus&); -%ignore CVC4::operator<<(std::ostream&, const CommandStatus*); -%ignore CVC4::operator<<(std::ostream&, BenchmarkStatus status); -%ignore CVC4::operator<<(std::ostream&, CommandPrintSuccess); - -%ignore CVC4::GetProofCommand; - -#ifdef SWIGJAVA - -// Instead of CommandSequence::begin() and end(), create an -// iterator() method on the Java side that returns a Java-style -// Iterator. -%ignore CVC4::CommandSequence::begin(); -%ignore CVC4::CommandSequence::end(); -%ignore CVC4::CommandSequence::begin() const; -%ignore CVC4::CommandSequence::end() const; -%extend CVC4::CommandSequence { - CVC4::JavaIteratorAdapter<CVC4::CommandSequence, CVC4::Command*> iterator() - { - return CVC4::JavaIteratorAdapter<CVC4::CommandSequence, CVC4::Command*>( - *$self); - } -} - -// CommandSequence is "iterable" on the Java side -%typemap(javainterfaces) CVC4::CommandSequence "java.lang.Iterable<edu.stanford.CVC4.Command>"; - -// the JavaIteratorAdapter should not be public, and implements Iterator -%typemap(javaclassmodifiers) CVC4::JavaIteratorAdapter<CVC4::CommandSequence, CVC4::Command*> "class"; -%typemap(javainterfaces) CVC4::JavaIteratorAdapter<CVC4::CommandSequence, CVC4::Command*> "java.util.Iterator<edu.stanford.CVC4.Command>"; -// add some functions to the Java side (do it here because there's no way to do these in C++) -%typemap(javacode) CVC4::JavaIteratorAdapter<CVC4::CommandSequence, CVC4::Command*> " - public void remove() { - throw new java.lang.UnsupportedOperationException(); - } - - public edu.stanford.CVC4.Command next() { - if(hasNext()) { - return getNext(); - } else { - throw new java.util.NoSuchElementException(); - } - } -" -// getNext() just allows C++ iterator access from Java-side next(), make it private -%javamethodmodifiers CVC4::JavaIteratorAdapter<CVC4::CommandSequence, CVC4::Command*>::getNext() "private"; - -#endif /* SWIGJAVA */ - -%include "smt/command.h" - -#ifdef SWIGJAVA - -%include "bindings/java_iterator_adapter.h" -%include "bindings/java_stream_adapters.h" - -%template(JavaIteratorAdapter_CommandSequence) CVC4::JavaIteratorAdapter<CVC4::CommandSequence, CVC4::Command*>; - -#endif /* SWIGJAVA */ |