summaryrefslogtreecommitdiff
path: root/src/bindings
diff options
context:
space:
mode:
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/java_iterator_adapter.h34
-rw-r--r--src/bindings/java_output_stream_adapter.h37
2 files changed, 71 insertions, 0 deletions
diff --git a/src/bindings/java_iterator_adapter.h b/src/bindings/java_iterator_adapter.h
index 16c968a47..61bc68330 100644
--- a/src/bindings/java_iterator_adapter.h
+++ b/src/bindings/java_iterator_adapter.h
@@ -1,3 +1,35 @@
+/********************* */
+/*! \file java_iterator_adapter.h
+ ** \verbatim
+ ** Original author: mdeters
+ ** Major contributors: none
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 prototype.
+ ** Copyright (c) 2009-2012 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief An iterator adapter for the Java bindings, giving Java iterators
+ ** the ability to access elements from STL iterators.
+ **
+ ** An iterator adapter for the Java bindings, giving Java iterators the
+ ** ability to access elements from STL iterators. This class is mapped
+ ** into Java by SWIG, where it implements Iterator (some additional
+ ** Java-side functions are added by the SWIG layer to implement the full
+ ** interface).
+ **
+ ** The functionality requires significant assistance from the ".i" SWIG
+ ** interface files, applying a variety of typemaps.
+ **/
+
+// private to the bindings layer
+#ifndef SWIGJAVA
+# error This should only be included from the Java bindings layer.
+#endif /* SWIGJAVA */
+
+#ifndef __CVC4__BINDINGS__JAVA_ITERATOR_ADAPTER_H
+#define __CVC4__BINDINGS__JAVA_ITERATOR_ADAPTER_H
+
namespace CVC4 {
template <class T>
@@ -23,3 +55,5 @@ public:
};/* class JavaIteratorAdapter<T> */
}/* CVC4 namespace */
+
+#endif /* __CVC4__BINDINGS__JAVA_ITERATOR_ADAPTER_H */
diff --git a/src/bindings/java_output_stream_adapter.h b/src/bindings/java_output_stream_adapter.h
index e6f7d6786..6830e508d 100644
--- a/src/bindings/java_output_stream_adapter.h
+++ b/src/bindings/java_output_stream_adapter.h
@@ -1,3 +1,38 @@
+/********************* */
+/*! \file java_output_stream_adapter.h
+ ** \verbatim
+ ** Original author: mdeters
+ ** Major contributors: none
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 prototype.
+ ** Copyright (c) 2009-2012 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief An OutputStream adapter for the Java bindings
+ **
+ ** An OutputStream adapter for the Java bindings. This works with a lot
+ ** of help from SWIG, and custom typemaps in the ".i" SWIG interface files
+ ** for CVC4. The basic idea is that, when a CVC4 function with a
+ ** std::ostream& parameter is called, a Java-side binding is generated
+ ** taking a java.io.OutputStream. Now, the problem is that std::ostream
+ ** has no Java equivalent, and java.io.OutputStream has no C++ equivalent,
+ ** so we use this class (which exists on both sides) as the go-between.
+ ** The wrapper connecting the Java function (taking an OutputStream) and
+ ** the C++ function (taking an ostream) creates a JavaOutputStreamAdapter,
+ ** and call the C++ function with the stringstream inside. After the call,
+ ** the generated stream material is collected and output to the Java-side
+ ** OutputStream.
+ **/
+
+// private to the bindings layer
+#ifndef SWIGJAVA
+# error This should only be included from the Java bindings layer.
+#endif /* SWIGJAVA */
+
+#ifndef __CVC4__BINDINGS__JAVA_OUTPUT_STREAM_ADAPTER_H
+#define __CVC4__BINDINGS__JAVA_OUTPUT_STREAM_ADAPTER_H
+
namespace CVC4 {
class JavaOutputStreamAdapter {
@@ -11,3 +46,5 @@ public:
};/* class JavaOutputStreamAdapter */
}/* CVC4 namespace */
+
+#endif /* __CVC4__BINDINGS__JAVA_OUTPUT_STREAM_ADAPTER_H */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback