<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_09) on Tue Aug 07 16:57:27 CEST 2007 --> <TITLE> QNativePointer </TITLE> <META NAME="keywords" CONTENT="com.trolltech.qt.QNativePointer class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="QNativePointer"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../com/trolltech/qt/QFlags.html" title="class in com.trolltech.qt"><B>PREV CLASS</B></A> <A HREF="../../../com/trolltech/qt/QNativePointer.AutoDeleteMode.html" title="enum in com.trolltech.qt"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?com/trolltech/qt/QNativePointer.html" target="_top"><B>FRAMES</B></A> <A HREF="QNativePointer.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> com.trolltech.qt</FONT> <BR> Class QNativePointer</H2> <PRE> java.lang.Object <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.trolltech.qt.QNativePointer</B> </PRE> <HR> <DL> <DT><PRE>public class <B>QNativePointer</B><DT>extends java.lang.Object</DL> </PRE> <P> QNativePointer encapsulates a native C++ pointer. The class provides the functionality that you would get if you had direct access to the pointer through function calls. It is as such a low-level memory manager that should be used sparsely; its intended and legitimate use is for JNI bindings not handled by generator. Examples can be found in the <a href="qtjambi-generatorexample.html">generator example</a>. <p> QNativePointer does type checking of pointers. Also, if the pointer is pointing to an array, you must also specify the array length; array bounds checking is enforced by QNativePointer. Any number of indirections are allowed (i.e., arrays can have any number of dimensions). <p> The QNativePointer will by default delete the internal pointer when being garbage collected. However, if the ownership of the pointer is given to a c++ class, you do not want this behavior. The AutoDeleteMode enum values defines the ways in which deletion of the pointer can be handled. <p> The data types that can be pointed to are defined by the Type enum. An allocation of an Integer pointer can, for example, be done like this: <p> <code> QNativePointer ptr = new QNativePointer(QNativePointer.Type.Int);<br> ptr.setIntValue(10);<br> </code> <p> An array of length 5 is created in the following way: <p> <code> QNativePointer ptr = new QNativePointer(QNativePointer.Type.Int, 5);<br> for (int i = 0; i < 5, ++i) <pre> ptr.setIntAt(i, i*i);</pre><br> </code> <p> If you are creating a multi dimensional array, you have two possibilities. You can make QNativePointers of the Pointer type or specify the number indirections of a single QNativePointer. We recommend the second alternative since it creates type safe pointers. Here is an example using the first alternative: <p> <code> QNativePointer ptr = new QNativePointer(QNativePointer.Type.Pointer, 2);<br> QNativePointer charArray1 = new QNativePointer(QNativePointer.Type.Char, 5);<br> ptr.setPointerAt(0, carArray1); </code> <p> And here is the code for the second: <p> <code> QNativePointer ptr = new QNativePointer(Type.Char, 5, 2);<br> ptr.setPointerAt(0, createCharPointer(myString)); </code> <P> <P> <HR> <P> <!-- ======== NESTED CLASS SUMMARY ======== --> <A NAME="nested_class_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Nested Class Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.AutoDeleteMode.html" title="enum in com.trolltech.qt">QNativePointer.AutoDeleteMode</A></B></CODE> <BR> The AutoDeleteMode enum describes how garbage collection of the QNativePointer handles the deletion of the native pointer.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.Type.html" title="enum in com.trolltech.qt">QNativePointer.Type</A></B></CODE> <BR> The Type enum describe the Java types that can be used by a QNativePointer.</TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#QNativePointer(com.trolltech.qt.QNativePointer.Type)">QNativePointer</A></B>(<A HREF="../../../com/trolltech/qt/QNativePointer.Type.html" title="enum in com.trolltech.qt">QNativePointer.Type</A> type)</CODE> <BR> Creates a native pointer of the specified <code>type</endcode>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#QNativePointer(com.trolltech.qt.QNativePointer.Type, int)">QNativePointer</A></B>(<A HREF="../../../com/trolltech/qt/QNativePointer.Type.html" title="enum in com.trolltech.qt">QNativePointer.Type</A> type, int size)</CODE> <BR> Creates a native pointer to an arrow with <code>size</code> length of the specified <code>type</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#QNativePointer(com.trolltech.qt.QNativePointer.Type, int, int)">QNativePointer</A></B>(<A HREF="../../../com/trolltech/qt/QNativePointer.Type.html" title="enum in com.trolltech.qt">QNativePointer.Type</A> type, int size, int indirections)</CODE> <BR> Creates a native pointer of the specified <code>type</code>.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../com/trolltech/qt/QNativePointer.AutoDeleteMode.html" title="enum in com.trolltech.qt">QNativePointer.AutoDeleteMode</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#autoDeleteMode()">autoDeleteMode</A></B>()</CODE> <BR> Returns the auto-delete mode of the pointer.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#booleanAt(int)">booleanAt</A></B>(int pos)</CODE> <BR> Returns the value of the native pointer at the specified position.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#booleanValue()">booleanValue</A></B>()</CODE> <BR> If the native pointer is of boolean type, this function returns its value.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> byte</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#byteAt(int)">byteAt</A></B>(int pos)</CODE> <BR> Returns the value of the native pointer at the specified position.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> byte</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#byteValue()">byteValue</A></B>()</CODE> <BR> If the native pointer is of byte type, this function returns its value.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> char</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#charAt(int)">charAt</A></B>(int pos)</CODE> <BR> Returns the value of the native pointer at the specified position.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> char</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#charValue()">charValue</A></B>()</CODE> <BR> If the native pointer is of char type, this function returns its value.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#createCharPointer(java.lang.String)">createCharPointer</A></B>(java.lang.String string)</CODE> <BR> Creates a char* from the input string</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#createCharPointerPointer(java.lang.String[])">createCharPointerPointer</A></B>(java.lang.String[] strings)</CODE> <BR> Creates a char** native pointer from the input string.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#delete()">delete</A></B>()</CODE> <BR> This function deletes the internal pointer.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#deleteArray()">deleteArray</A></B>()</CODE> <BR> This function deletes elements in the array of this QNativePointer.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> double</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#doubleAt(int)">doubleAt</A></B>(int pos)</CODE> <BR> Returns the value of the native pointer at the specified position.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> double</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#doubleValue()">doubleValue</A></B>()</CODE> <BR> If the native pointer is of double type, this function returns its value.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#finalize()">finalize</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> float</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#floatAt(int)">floatAt</A></B>(int pos)</CODE> <BR> Returns the value of the native pointer at the specified position.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> float</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#floatValue()">floatValue</A></B>()</CODE> <BR> If the native pointer is of float type, this function returns its value.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#free()">free</A></B>()</CODE> <BR> This function deletes the internal pointer.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#fromNative(long, int, int)">fromNative</A></B>(long ptr, int type, int indirections)</CODE> <BR> This is an overloaded function provided for convenience.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#fromNative(long, com.trolltech.qt.QNativePointer.Type, int)">fromNative</A></B>(long ptr, <A HREF="../../../com/trolltech/qt/QNativePointer.Type.html" title="enum in com.trolltech.qt">QNativePointer.Type</A> type, int indirections)</CODE> <BR> This function creates a QNativePointer from an existing c++ pointer.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#indirections()">indirections</A></B>()</CODE> <BR> Returns the number of indirections of the pointer.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#intAt(int)">intAt</A></B>(int pos)</CODE> <BR> Returns the value of the native pointer at the specified position.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#intValue()">intValue</A></B>()</CODE> <BR> If the native pointer is of int type, this function returns its value.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#isNull()">isNull</A></B>()</CODE> <BR> Returns true if the native pointer is 0; otherwise false.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> long</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#longAt(int)">longAt</A></B>(int pos)</CODE> <BR> Returns the value of the native pointer at the specified position.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> long</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#longValue()">longValue</A></B>()</CODE> <BR> If the native pointer is of long type, this function returns its value.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> long</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#pointer()">pointer</A></B>()</CODE> <BR> Returns the native pointer.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#pointerAt(int)">pointerAt</A></B>(int pos)</CODE> <BR> Returns the value of the native pointer at the specified position.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#pointerValue()">pointerValue</A></B>()</CODE> <BR> If the native pointer is of pointer type, this function returns its value.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setAutoDeleteMode(com.trolltech.qt.QNativePointer.AutoDeleteMode)">setAutoDeleteMode</A></B>(<A HREF="../../../com/trolltech/qt/QNativePointer.AutoDeleteMode.html" title="enum in com.trolltech.qt">QNativePointer.AutoDeleteMode</A> autodelete)</CODE> <BR> This function sets the auto delete mode of the QNativePointer.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setBooleanAt(int, boolean)">setBooleanAt</A></B>(int pos, boolean value)</CODE> <BR> Sets the value of the array element at <code>pos</code> to which this native pointer points.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setBooleanValue(boolean)">setBooleanValue</A></B>(boolean value)</CODE> <BR> Sets the value of this pointer to <code>value</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setByteAt(int, byte)">setByteAt</A></B>(int pos, byte value)</CODE> <BR> Sets the value of the array element at <code>pos</code> to which this native pointer points.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setByteValue(byte)">setByteValue</A></B>(byte value)</CODE> <BR> Sets the value of this pointer to <code>value</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setCharAt(int, char)">setCharAt</A></B>(int pos, char value)</CODE> <BR> Sets the value of the array element at <code>pos</code> to which this native pointer points.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setCharValue(char)">setCharValue</A></B>(char value)</CODE> <BR> Sets the value of this pointer to <code>value</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setDoubleAt(int, double)">setDoubleAt</A></B>(int pos, double value)</CODE> <BR> Sets the value of the array element at <code>pos</code> to which this native pointer points.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setDoubleValue(double)">setDoubleValue</A></B>(double value)</CODE> <BR> Sets the value of this pointer to <code>value</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setFloatAt(int, float)">setFloatAt</A></B>(int pos, float value)</CODE> <BR> Sets the value of the array element at <code>pos</code> to which this native pointer points.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setFloatValue(float)">setFloatValue</A></B>(float value)</CODE> <BR> Sets the value of this pointer to <code>value</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setIntAt(int, int)">setIntAt</A></B>(int pos, int value)</CODE> <BR> Sets the value of the array element at <code>pos</code> to which this native pointer points.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setIntValue(int)">setIntValue</A></B>(int value)</CODE> <BR> Sets the value of this pointer to <code>value</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setLongAt(int, long)">setLongAt</A></B>(int pos, long value)</CODE> <BR> Sets the value of the array element at <code>pos</code> to which this native pointer points.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setLongValue(long)">setLongValue</A></B>(long value)</CODE> <BR> Sets the value of this pointer to <code>value</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setPointerAt(int, com.trolltech.qt.QNativePointer)">setPointerAt</A></B>(int pos, <A HREF="../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> value)</CODE> <BR> Sets the value of the array element at <code>pos</code> to which this native pointer points.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setPointerValue(com.trolltech.qt.QNativePointer)">setPointerValue</A></B>(<A HREF="../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> value)</CODE> <BR> Sets the value of this pointer to <code>value</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setShortAt(int, short)">setShortAt</A></B>(int pos, short value)</CODE> <BR> Sets the value of the array element at <code>pos</code> to which this native pointer points.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setShortValue(short)">setShortValue</A></B>(short value)</CODE> <BR> Sets the value of this pointer to <code>value</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setStringAt(int, java.lang.String)">setStringAt</A></B>(int pos, java.lang.String value)</CODE> <BR> Sets the value of the array element at <code>pos</code> to which this native pointer points.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setStringValue(java.lang.String)">setStringValue</A></B>(java.lang.String value)</CODE> <BR> Sets the value of this pointer to <code>value</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#setVerificationEnabled(boolean)">setVerificationEnabled</A></B>(boolean a)</CODE> <BR> Sets if the any accesses should be type verified or not.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> short</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#shortAt(int)">shortAt</A></B>(int pos)</CODE> <BR> Returns the value of the native pointer at the specified position.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> short</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#shortValue()">shortValue</A></B>()</CODE> <BR> If the native pointer is of short type, this function returns its value.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#stringAt(int)">stringAt</A></B>(int pos)</CODE> <BR> Returns the value of the native pointer at the specified position.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#stringValue()">stringValue</A></B>()</CODE> <BR> If the native pointer is of string type, this function returns its value.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../com/trolltech/qt/QNativePointer.Type.html" title="enum in com.trolltech.qt">QNativePointer.Type</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#type()">type</A></B>()</CODE> <BR> Returns the type of the native pointer.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/trolltech/qt/QNativePointer.html#verificationEnabled()">verificationEnabled</A></B>()</CODE> <BR> Returns if verification is enabled or not.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> <P> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="QNativePointer(com.trolltech.qt.QNativePointer.Type)"><!-- --></A><H3> QNativePointer</H3> <PRE> public <B>QNativePointer</B>(<A HREF="../../../com/trolltech/qt/QNativePointer.Type.html" title="enum in com.trolltech.qt">QNativePointer.Type</A> type)</PRE> <DL> <DD>Creates a native pointer of the specified <code>type</endcode>. The object has an indirection of 1 and the internal pointer will be deleted when the QNativePointer object is deleted. <P> <DL> <DT><B>Parameters:</B><DD><CODE>type</CODE> - the type of pointer to create.</DL> </DL> <HR> <A NAME="QNativePointer(com.trolltech.qt.QNativePointer.Type, int)"><!-- --></A><H3> QNativePointer</H3> <PRE> public <B>QNativePointer</B>(<A HREF="../../../com/trolltech/qt/QNativePointer.Type.html" title="enum in com.trolltech.qt">QNativePointer.Type</A> type, int size)</PRE> <DL> <DD>Creates a native pointer to an arrow with <code>size</code> length of the specified <code>type</code>. The pointer will have an indirection of 1 and be deleted when the QNativePointer is garbage collected. <P> <DL> <DT><B>Parameters:</B><DD><CODE>type</CODE> - the type of pointer to create.<DD><CODE>size</CODE> - the size of the array.</DL> </DL> <HR> <A NAME="QNativePointer(com.trolltech.qt.QNativePointer.Type, int, int)"><!-- --></A><H3> QNativePointer</H3> <PRE> public <B>QNativePointer</B>(<A HREF="../../../com/trolltech/qt/QNativePointer.Type.html" title="enum in com.trolltech.qt">QNativePointer.Type</A> type, int size, int indirections)</PRE> <DL> <DD>Creates a native pointer of the specified <code>type</code>. It will be an array if <code>size</code> is larger than one and have an indirection of <code>indirections</code>. For instance, the following Java statement will create a <code>**char</code> pointer with the first array dimension of length 5: <code>QNativePointer ptr = new QNativePointer(QNativePointer.Type.Int, 5, 2);</code> <P> <DL> <DT><B>Parameters:</B><DD><CODE>type</CODE> - the type of pointer to create.<DD><CODE>size</CODE> - the length of the array.<DD><CODE>indirections</CODE> - the number of indirections for the pointer.</DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="booleanValue()"><!-- --></A><H3> booleanValue</H3> <PRE> public boolean <B>booleanValue</B>()</PRE> <DL> <DD>If the native pointer is of boolean type, this function returns its value. If it is an array of booleans, the first element is returned. <P> <DD><DL> <DT><B>Returns:</B><DD>the value of the pointer.</DL> </DD> </DL> <HR> <A NAME="byteValue()"><!-- --></A><H3> byteValue</H3> <PRE> public byte <B>byteValue</B>()</PRE> <DL> <DD>If the native pointer is of byte type, this function returns its value. If it is an array of bytes, the first element is returned. <P> <DD><DL> <DT><B>Returns:</B><DD>the value of the pointer.</DL> </DD> </DL> <HR> <A NAME="charValue()"><!-- --></A><H3> charValue</H3> <PRE> public char <B>charValue</B>()</PRE> <DL> <DD>If the native pointer is of char type, this function returns its value. If it is an array of chars, the first element is returned. <P> <DD><DL> <DT><B>Returns:</B><DD>the value of the pointer.</DL> </DD> </DL> <HR> <A NAME="shortValue()"><!-- --></A><H3> shortValue</H3> <PRE> public short <B>shortValue</B>()</PRE> <DL> <DD>If the native pointer is of short type, this function returns its value. If it is an array of shorts, the first element is returned. <P> <DD><DL> <DT><B>Returns:</B><DD>the value of the pointer.</DL> </DD> </DL> <HR> <A NAME="intValue()"><!-- --></A><H3> intValue</H3> <PRE> public int <B>intValue</B>()</PRE> <DL> <DD>If the native pointer is of int type, this function returns its value. If it is an array of ints, the first element is returned. <P> <DD><DL> <DT><B>Returns:</B><DD>the value of the pointer.</DL> </DD> </DL> <HR> <A NAME="longValue()"><!-- --></A><H3> longValue</H3> <PRE> public long <B>longValue</B>()</PRE> <DL> <DD>If the native pointer is of long type, this function returns its value. If it is an array of longs, the first element is returned. <P> <DD><DL> <DT><B>Returns:</B><DD>the value of the pointer.</DL> </DD> </DL> <HR> <A NAME="floatValue()"><!-- --></A><H3> floatValue</H3> <PRE> public float <B>floatValue</B>()</PRE> <DL> <DD>If the native pointer is of float type, this function returns its value. If it is an array of floats, the first element is returned. <P> <DD><DL> <DT><B>Returns:</B><DD>the value of the pointer.</DL> </DD> </DL> <HR> <A NAME="doubleValue()"><!-- --></A><H3> doubleValue</H3> <PRE> public double <B>doubleValue</B>()</PRE> <DL> <DD>If the native pointer is of double type, this function returns its value. If it is an array of doubles, the first element is returned. <P> <DD><DL> <DT><B>Returns:</B><DD>the value of the pointer.</DL> </DD> </DL> <HR> <A NAME="pointerValue()"><!-- --></A><H3> pointerValue</H3> <PRE> public <A HREF="../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> <B>pointerValue</B>()</PRE> <DL> <DD>If the native pointer is of pointer type, this function returns its value. If it is an array of pointers, the first element is returned. <P> <DD><DL> <DT><B>Returns:</B><DD>the value of the pointer.</DL> </DD> </DL> <HR> <A NAME="stringValue()"><!-- --></A><H3> stringValue</H3> <PRE> public java.lang.String <B>stringValue</B>()</PRE> <DL> <DD>If the native pointer is of string type, this function returns its value. If it is an array of strings, the first element is returned. <P> <DD><DL> <DT><B>Returns:</B><DD>the value of the pointer.</DL> </DD> </DL> <HR> <A NAME="setBooleanValue(boolean)"><!-- --></A><H3> setBooleanValue</H3> <PRE> public void <B>setBooleanValue</B>(boolean value)</PRE> <DL> <DD>Sets the value of this pointer to <code>value</code>. The type of the pointer must be boolean. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>value</CODE> - the value to which the pointer is set.</DL> </DD> </DL> <HR> <A NAME="setByteValue(byte)"><!-- --></A><H3> setByteValue</H3> <PRE> public void <B>setByteValue</B>(byte value)</PRE> <DL> <DD>Sets the value of this pointer to <code>value</code>. The type of the pointer must be byte. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>value</CODE> - the value to which the pointer is set.</DL> </DD> </DL> <HR> <A NAME="setCharValue(char)"><!-- --></A><H3> setCharValue</H3> <PRE> public void <B>setCharValue</B>(char value)</PRE> <DL> <DD>Sets the value of this pointer to <code>value</code>. The type of the pointer must be char. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>value</CODE> - the value to which the pointer is set.</DL> </DD> </DL> <HR> <A NAME="setShortValue(short)"><!-- --></A><H3> setShortValue</H3> <PRE> public void <B>setShortValue</B>(short value)</PRE> <DL> <DD>Sets the value of this pointer to <code>value</code>. The type of the pointer must be short. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>value</CODE> - the value to which the pointer is set.</DL> </DD> </DL> <HR> <A NAME="setIntValue(int)"><!-- --></A><H3> setIntValue</H3> <PRE> public void <B>setIntValue</B>(int value)</PRE> <DL> <DD>Sets the value of this pointer to <code>value</code>. The type of the pointer must be int. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>value</CODE> - the value to which the pointer is set.</DL> </DD> </DL> <HR> <A NAME="setLongValue(long)"><!-- --></A><H3> setLongValue</H3> <PRE> public void <B>setLongValue</B>(long value)</PRE> <DL> <DD>Sets the value of this pointer to <code>value</code>. The type of the pointer must be long. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>value</CODE> - the value to which the pointer is set.</DL> </DD> </DL> <HR> <A NAME="setFloatValue(float)"><!-- --></A><H3> setFloatValue</H3> <PRE> public void <B>setFloatValue</B>(float value)</PRE> <DL> <DD>Sets the value of this pointer to <code>value</code>. The type of the pointer must be float. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>value</CODE> - the value to which the pointer is set.</DL> </DD> </DL> <HR> <A NAME="setDoubleValue(double)"><!-- --></A><H3> setDoubleValue</H3> <PRE> public void <B>setDoubleValue</B>(double value)</PRE> <DL> <DD>Sets the value of this pointer to <code>value</code>. The type of the pointer must double. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>value</CODE> - the value to which the pointer is set.</DL> </DD> </DL> <HR> <A NAME="setPointerValue(com.trolltech.qt.QNativePointer)"><!-- --></A><H3> setPointerValue</H3> <PRE> public void <B>setPointerValue</B>(<A HREF="../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> value)</PRE> <DL> <DD>Sets the value of this pointer to <code>value</code>. The pointer must be of pointer type. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>value</CODE> - the value to which the pointer is set.</DL> </DD> </DL> <HR> <A NAME="setStringValue(java.lang.String)"><!-- --></A><H3> setStringValue</H3> <PRE> public void <B>setStringValue</B>(java.lang.String value)</PRE> <DL> <DD>Sets the value of this pointer to <code>value</code>. The pointer must point to a string. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>value</CODE> - the value to which the pointer is set.</DL> </DD> </DL> <HR> <A NAME="booleanAt(int)"><!-- --></A><H3> booleanAt</H3> <PRE> public boolean <B>booleanAt</B>(int pos)</PRE> <DL> <DD>Returns the value of the native pointer at the specified position. If <code>pos</code> is larger than 1, QNativePointer will check that the position is within the array bounds. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index</DL> </DD> </DL> <HR> <A NAME="byteAt(int)"><!-- --></A><H3> byteAt</H3> <PRE> public byte <B>byteAt</B>(int pos)</PRE> <DL> <DD>Returns the value of the native pointer at the specified position. If <code>pos</code> is larger than 1, QNativePointer will check that the position is within the array bounds. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index</DL> </DD> </DL> <HR> <A NAME="charAt(int)"><!-- --></A><H3> charAt</H3> <PRE> public char <B>charAt</B>(int pos)</PRE> <DL> <DD>Returns the value of the native pointer at the specified position. If <code>pos</code> is larger than 1, QNativePointer will check that the position is within the array bounds. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index</DL> </DD> </DL> <HR> <A NAME="shortAt(int)"><!-- --></A><H3> shortAt</H3> <PRE> public short <B>shortAt</B>(int pos)</PRE> <DL> <DD>Returns the value of the native pointer at the specified position. If <code>pos</code> is larger than 1, QNativePointer will check that the position is within the array bounds. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index</DL> </DD> </DL> <HR> <A NAME="intAt(int)"><!-- --></A><H3> intAt</H3> <PRE> public int <B>intAt</B>(int pos)</PRE> <DL> <DD>Returns the value of the native pointer at the specified position. If <code>pos</code> is larger than 1, QNativePointer will check that the position is within the array bounds. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index</DL> </DD> </DL> <HR> <A NAME="longAt(int)"><!-- --></A><H3> longAt</H3> <PRE> public long <B>longAt</B>(int pos)</PRE> <DL> <DD>Returns the value of the native pointer at the specified position. If <code>pos</code> is larger than 1, QNativePointer will check that the position is within the array bounds. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index</DL> </DD> </DL> <HR> <A NAME="floatAt(int)"><!-- --></A><H3> floatAt</H3> <PRE> public float <B>floatAt</B>(int pos)</PRE> <DL> <DD>Returns the value of the native pointer at the specified position. If <code>pos</code> is larger than 1, QNativePointer will check that the position is within the array bounds. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index</DL> </DD> </DL> <HR> <A NAME="doubleAt(int)"><!-- --></A><H3> doubleAt</H3> <PRE> public double <B>doubleAt</B>(int pos)</PRE> <DL> <DD>Returns the value of the native pointer at the specified position. If <code>pos</code> is larger than 1, QNativePointer will check that the position is within the array bounds. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index</DL> </DD> </DL> <HR> <A NAME="pointerAt(int)"><!-- --></A><H3> pointerAt</H3> <PRE> public <A HREF="../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> <B>pointerAt</B>(int pos)</PRE> <DL> <DD>Returns the value of the native pointer at the specified position. If <code>pos</code> is larger than 1, QNativePointer will check that the position is within the array bounds. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index</DL> </DD> </DL> <HR> <A NAME="stringAt(int)"><!-- --></A><H3> stringAt</H3> <PRE> public java.lang.String <B>stringAt</B>(int pos)</PRE> <DL> <DD>Returns the value of the native pointer at the specified position. If <code>pos</code> is larger than 1, QNativePointer will check that the position is within the array bounds. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index</DL> </DD> </DL> <HR> <A NAME="setBooleanAt(int, boolean)"><!-- --></A><H3> setBooleanAt</H3> <PRE> public void <B>setBooleanAt</B>(int pos, boolean value)</PRE> <DL> <DD>Sets the value of the array element at <code>pos</code> to which this native pointer points. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index<DD><CODE>value</CODE> - the value to set the index to</DL> </DD> </DL> <HR> <A NAME="setByteAt(int, byte)"><!-- --></A><H3> setByteAt</H3> <PRE> public void <B>setByteAt</B>(int pos, byte value)</PRE> <DL> <DD>Sets the value of the array element at <code>pos</code> to which this native pointer points. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index<DD><CODE>value</CODE> - the value to set the index to</DL> </DD> </DL> <HR> <A NAME="setCharAt(int, char)"><!-- --></A><H3> setCharAt</H3> <PRE> public void <B>setCharAt</B>(int pos, char value)</PRE> <DL> <DD>Sets the value of the array element at <code>pos</code> to which this native pointer points. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index<DD><CODE>value</CODE> - the value to set the index to</DL> </DD> </DL> <HR> <A NAME="setShortAt(int, short)"><!-- --></A><H3> setShortAt</H3> <PRE> public void <B>setShortAt</B>(int pos, short value)</PRE> <DL> <DD>Sets the value of the array element at <code>pos</code> to which this native pointer points. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index<DD><CODE>value</CODE> - the value to set the index to</DL> </DD> </DL> <HR> <A NAME="setIntAt(int, int)"><!-- --></A><H3> setIntAt</H3> <PRE> public void <B>setIntAt</B>(int pos, int value)</PRE> <DL> <DD>Sets the value of the array element at <code>pos</code> to which this native pointer points. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index<DD><CODE>value</CODE> - the value to set the index to</DL> </DD> </DL> <HR> <A NAME="setLongAt(int, long)"><!-- --></A><H3> setLongAt</H3> <PRE> public void <B>setLongAt</B>(int pos, long value)</PRE> <DL> <DD>Sets the value of the array element at <code>pos</code> to which this native pointer points. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index<DD><CODE>value</CODE> - the value to set the index to</DL> </DD> </DL> <HR> <A NAME="setFloatAt(int, float)"><!-- --></A><H3> setFloatAt</H3> <PRE> public void <B>setFloatAt</B>(int pos, float value)</PRE> <DL> <DD>Sets the value of the array element at <code>pos</code> to which this native pointer points. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index<DD><CODE>value</CODE> - the value to set the index to</DL> </DD> </DL> <HR> <A NAME="setDoubleAt(int, double)"><!-- --></A><H3> setDoubleAt</H3> <PRE> public void <B>setDoubleAt</B>(int pos, double value)</PRE> <DL> <DD>Sets the value of the array element at <code>pos</code> to which this native pointer points. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index<DD><CODE>value</CODE> - the value to set the index to</DL> </DD> </DL> <HR> <A NAME="setPointerAt(int, com.trolltech.qt.QNativePointer)"><!-- --></A><H3> setPointerAt</H3> <PRE> public void <B>setPointerAt</B>(int pos, <A HREF="../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> value)</PRE> <DL> <DD>Sets the value of the array element at <code>pos</code> to which this native pointer points. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index<DD><CODE>value</CODE> - the value to set the index to</DL> </DD> </DL> <HR> <A NAME="setStringAt(int, java.lang.String)"><!-- --></A><H3> setStringAt</H3> <PRE> public void <B>setStringAt</B>(int pos, java.lang.String value)</PRE> <DL> <DD>Sets the value of the array element at <code>pos</code> to which this native pointer points. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pos</CODE> - the array index<DD><CODE>value</CODE> - the value to set the index to</DL> </DD> </DL> <HR> <A NAME="type()"><!-- --></A><H3> type</H3> <PRE> public <A HREF="../../../com/trolltech/qt/QNativePointer.Type.html" title="enum in com.trolltech.qt">QNativePointer.Type</A> <B>type</B>()</PRE> <DL> <DD>Returns the type of the native pointer. <P> <DD><DL> <DT><B>Returns:</B><DD>the data type of the native pointer</DL> </DD> </DL> <HR> <A NAME="indirections()"><!-- --></A><H3> indirections</H3> <PRE> public int <B>indirections</B>()</PRE> <DL> <DD>Returns the number of indirections of the pointer. <P> <DD><DL> <DT><B>Returns:</B><DD>the number of indirections of the pointer</DL> </DD> </DL> <HR> <A NAME="isNull()"><!-- --></A><H3> isNull</H3> <PRE> public boolean <B>isNull</B>()</PRE> <DL> <DD>Returns true if the native pointer is 0; otherwise false. <P> <DD><DL> <DT><B>Returns:</B><DD>true if the native pointer is 0.</DL> </DD> </DL> <HR> <A NAME="autoDeleteMode()"><!-- --></A><H3> autoDeleteMode</H3> <PRE> public <A HREF="../../../com/trolltech/qt/QNativePointer.AutoDeleteMode.html" title="enum in com.trolltech.qt">QNativePointer.AutoDeleteMode</A> <B>autoDeleteMode</B>()</PRE> <DL> <DD>Returns the auto-delete mode of the pointer. <P> <DD><DL> <DT><B>Returns:</B><DD>the auto-delete mode of this QNativePointer</DL> </DD> </DL> <HR> <A NAME="setAutoDeleteMode(com.trolltech.qt.QNativePointer.AutoDeleteMode)"><!-- --></A><H3> setAutoDeleteMode</H3> <PRE> public void <B>setAutoDeleteMode</B>(<A HREF="../../../com/trolltech/qt/QNativePointer.AutoDeleteMode.html" title="enum in com.trolltech.qt">QNativePointer.AutoDeleteMode</A> autodelete)</PRE> <DL> <DD>This function sets the auto delete mode of the QNativePointer. The internal pointer is deleted by default when the QNativePointer object is garbage collected, so you only need to call this function when you want to keep the pointer valid after the Java object is garbage collected. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>autodelete</CODE> - the new auto delete mode.</DL> </DD> </DL> <HR> <A NAME="free()"><!-- --></A><H3> free</H3> <PRE> public void <B>free</B>()</PRE> <DL> <DD>This function deletes the internal pointer. Currently, all QNativePointer's should be deleted using the delete() function. After the pointer has been deleted, you cannot use the same QNativePointer to allocate further data. Note also that the pointer will by default be deleted upon garbage collection. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="delete()"><!-- --></A><H3> delete</H3> <PRE> public void <B>delete</B>()</PRE> <DL> <DD>This function deletes the internal pointer. After the pointer has been deleted, you cannot allocate it again. The pointer is by default deleted when the QNativePointer object is garbage collected. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="deleteArray()"><!-- --></A><H3> deleteArray</H3> <PRE> public void <B>deleteArray</B>()</PRE> <DL> <DD>This function deletes elements in the array of this QNativePointer. After the pointer has been deleted, you cannot use this QNativePointer object again. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="pointer()"><!-- --></A><H3> pointer</H3> <PRE> public long <B>pointer</B>()</PRE> <DL> <DD>Returns the native pointer. The returned long is the <code>void *</code> value in c++. <P> <DD><DL> <DT><B>Returns:</B><DD>the native pointer.</DL> </DD> </DL> <HR> <A NAME="fromNative(long, com.trolltech.qt.QNativePointer.Type, int)"><!-- --></A><H3> fromNative</H3> <PRE> public static <A HREF="../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> <B>fromNative</B>(long ptr, <A HREF="../../../com/trolltech/qt/QNativePointer.Type.html" title="enum in com.trolltech.qt">QNativePointer.Type</A> type, int indirections)</PRE> <DL> <DD>This function creates a QNativePointer from an existing c++ pointer. The long is the <code>void *</code> (i.e., address) value of the pointer. There are several ways of acquiring a native pointer. For instance, QNativePointer internal pointer is returned by pointer(), and QtJambiObject.nativeId() returns the c++ pointer to its Qt object. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>ptr</CODE> - the void * value of the pointer.<DD><CODE>type</CODE> - the Type of the pointer<DD><CODE>indirections</CODE> - the number of pointer indirections <DT><B>Returns:</B><DD>a QNativePointer object with ptr as the native pointer</DL> </DD> </DL> <HR> <A NAME="verificationEnabled()"><!-- --></A><H3> verificationEnabled</H3> <PRE> public boolean <B>verificationEnabled</B>()</PRE> <DL> <DD>Returns if verification is enabled or not. <P> <DD><DL> <DT><B>Returns:</B><DD>true if verification is enabled; otherwise false.</DL> </DD> </DL> <HR> <A NAME="setVerificationEnabled(boolean)"><!-- --></A><H3> setVerificationEnabled</H3> <PRE> public void <B>setVerificationEnabled</B>(boolean a)</PRE> <DL> <DD>Sets if the any accesses should be type verified or not. By default this value is set to true, meaning that trying to access a char pointer as an int pointer will trigger an exception. Disabling this value allows complete access, but without any safety, so incorrect usage may lead to memory corruption in the C++ implementation. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>a</CODE> - Set to true if verification should be enabled.</DL> </DD> </DL> <HR> <A NAME="fromNative(long, int, int)"><!-- --></A><H3> fromNative</H3> <PRE> public static <A HREF="../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> <B>fromNative</B>(long ptr, int type, int indirections)</PRE> <DL> <DD>This is an overloaded function provided for convenience. <P> <DD><DL> <DT><B>See Also:</B><DD><A HREF="../../../com/trolltech/qt/QNativePointer.html#fromNative(long, com.trolltech.qt.QNativePointer.Type, int)"><CODE>QNativePointer.fromNative(long ptr, Type type, int indirections)</CODE></A></DL> </DD> </DL> <HR> <A NAME="createCharPointerPointer(java.lang.String[])"><!-- --></A><H3> createCharPointerPointer</H3> <PRE> public static <A HREF="../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> <B>createCharPointerPointer</B>(java.lang.String[] strings)</PRE> <DL> <DD>Creates a char** native pointer from the input string. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>strings</CODE> - the input strings <DT><B>Returns:</B><DD>a char **</DL> </DD> </DL> <HR> <A NAME="createCharPointer(java.lang.String)"><!-- --></A><H3> createCharPointer</H3> <PRE> public static <A HREF="../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> <B>createCharPointer</B>(java.lang.String string)</PRE> <DL> <DD>Creates a char* from the input string <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>string</CODE> - The input string <DT><B>Returns:</B><DD>The char*</DL> </DD> </DL> <HR> <A NAME="finalize()"><!-- --></A><H3> finalize</H3> <PRE> protected void <B>finalize</B>()</PRE> <DL> <DD><DL> <DT><B>Overrides:</B><DD><CODE>finalize</CODE> in class <CODE>java.lang.Object</CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../com/trolltech/qt/QFlags.html" title="class in com.trolltech.qt"><B>PREV CLASS</B></A> <A HREF="../../../com/trolltech/qt/QNativePointer.AutoDeleteMode.html" title="enum in com.trolltech.qt"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?com/trolltech/qt/QNativePointer.html" target="_top"><B>FRAMES</B></A> <A HREF="QNativePointer.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>