gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] libvob/include/vob/jni Types.hxx


From: Tuomas J. Lukka
Subject: [Gzz-commits] libvob/include/vob/jni Types.hxx
Date: Wed, 30 Jul 2003 06:49:33 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Branch:         
Changes by:     Tuomas J. Lukka <address@hidden>        03/07/30 06:49:33

Modified files:
        include/vob/jni: Types.hxx 

Log message:
        doc

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/jni/Types.hxx.diff?tr1=1.25&tr2=1.26&r1=text&r2=text

Patches:
Index: libvob/include/vob/jni/Types.hxx
diff -u libvob/include/vob/jni/Types.hxx:1.25 
libvob/include/vob/jni/Types.hxx:1.26
--- libvob/include/vob/jni/Types.hxx:1.25       Mon Jun 16 12:16:29 2003
+++ libvob/include/vob/jni/Types.hxx    Wed Jul 30 06:49:32 2003
@@ -165,6 +165,31 @@
        }                                                       \
        static void convert(JNIEnv *env, jint &in, type &out) {         
 
+    /* 
+     * Below, you see several different ways of converting
+     * Java primitives and objects to C++ ones.
+     *
+     * Some important points: for most objects, we make a copy on the C++
+     * side which has to get deleted when the struct it is in is deleted
+     * so we shall use types like vector<float> &c.
+     *
+     * However, there are several objects which we do not want to
+     * copy but want references or pointers to, like DefaultTextRendered
+     * or Vob::Paper::Paper. These have corresponding Java objects on 
+     * the Java side and are handled by integer ids to the objectstorer.
+     * Say we have a Foo which uses a Bar.
+     * The code will 
+     * 1) make the corresponding Foo *java* object contain a reference to the
+     *    Bar java object 
+     * 2) Pass the integer id of the Bar object for the objectstorer
+     * 3) the id will be used (inside START_VOB_JNI_CONVERSION_IDDED below)
+     *    to get the object from the objectstorer.
+     * Obviously, these must never be deleted.
+     *
+     * ByteVectors are intended for *large* arrays of data (screen
+     * captures &c) so copies would be "not so nice", so we use idded objects
+     * for them, too.
+     */
 
     VOB_JNI_CONVERSION_ASSIGN(float, "float", jfloat)
     VOB_JNI_CONVERSION_ASSIGN(int, "int", jint)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]