summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2013-02-25 16:13:39 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2013-02-25 16:13:39 +1100
commit6234ba40fc2911a6caa032bfee805cd663c5f4d0 (patch)
tree6be9e5dd68233ae263572577db48da60f3de4ccc /lang
parent0de8433ffa58b137ee8c82456fffb39d43fad156 (diff)
downloadmongo-6234ba40fc2911a6caa032bfee805cd663c5f4d0.tar.gz
Improvements for the Java API documentation: create a Java API module, link to class documentation and wiredtiger_open documentation.
Diffstat (limited to 'lang')
-rw-r--r--lang/java/wiredtiger.i35
-rw-r--r--lang/python/wiredtiger.i4
2 files changed, 31 insertions, 8 deletions
diff --git a/lang/java/wiredtiger.i b/lang/java/wiredtiger.i
index a5f03ad9416..6bb90b00793 100644
--- a/lang/java/wiredtiger.i
+++ b/lang/java/wiredtiger.i
@@ -105,17 +105,34 @@ static void throwWiredTigerException(JNIEnv *jenv, const char *msg) {
* and we use consecutive argument matching of typemaps to convert two args to
* one.
*/
-%define SELFHELPER(type, name)
+%define WT_CLASS(type, class, name)
%typemap(in, numinputs=0) type *name "$1 = *(type **)&jarg1;"
+%typemap(javaimports) type "
+/**
+ * @copydoc class
+ * @ingroup wt_java
+ */"
%enddef
-SELFHELPER(struct __wt_connection, connection)
-SELFHELPER(struct __wt_session, session)
-SELFHELPER(struct __wt_cursor, cursor)
+%pragma(java) moduleimports=%{
+/**
+ * @defgroup wt_java WiredTiger Java API
+ *
+ * Java wrappers around the WiredTiger C API.
+ */
+
+/**
+ * @ingroup wt_java
+ */
+%}
+
+WT_CLASS(struct __wt_connection, WT_CONNECTION, connection)
+WT_CLASS(struct __wt_session, WT_SESSION, session)
+WT_CLASS(struct __wt_cursor, WT_CURSOR, cursor)
%define COPYDOC(SIGNATURE_CLASS, CLASS, METHOD)
-%javamethodmodifiers SIGNATURE_CLASS::METHOD
-"/**
+%javamethodmodifiers SIGNATURE_CLASS::METHOD "
+ /**
* @copydoc CLASS::METHOD
*/
public ";
@@ -749,6 +766,12 @@ enum SearchStatus { FOUND, NOTFOUND, SMALLER, LARGER };
%ignore wiredtiger_extension_init;
%ignore wiredtiger_open;
+%javamethodmodifiers wiredtiger_open_wrap "
+ /**
+ * @copydoc ::wiredtiger_open
+ */
+ public ";
+
%rename(open) wiredtiger_open_wrap;
%ignore __wt_connection::open_session;
%rename(open_session) __wt_connection::open_session_wrap;
diff --git a/lang/python/wiredtiger.i b/lang/python/wiredtiger.i
index a6a8ed532ae..8c381d5aae5 100644
--- a/lang/python/wiredtiger.i
+++ b/lang/python/wiredtiger.i
@@ -442,8 +442,6 @@ typedef int int_void;
%include "wiredtiger.h"
%pythoncode %{
-## @}
-
class stat:
'''keys for statistics cursors'''
@@ -455,6 +453,8 @@ class stat:
'''keys for cursors on data source statistics'''
pass
+## @}
+
import sys
# All names starting with 'WT_STAT_DSRC_' are renamed to
# the wiredtiger.stat.dsrc class, those starting with 'WT_STAT_CONN' are