1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206
|
<html><head><base target=k-main></head><body bgcolor=white>
<font face=Times size=3>
Cursor objects can be used to point to specific entries in a view.
A cursor acts very much like a pointer to a row in a view, and is
returned when taking the address of a <A HREF="c4_RowRef.html" >c4_RowRef</A>. Dereferencing
a cursor leads to the original row reference again. You can construct a
cursor for a <A HREF="c4_Row.html" >c4_Row</A>, but since such rows are not part of a collection,
incrementing or decrementing these cursors is meaningless (and wrong).
<P>
The usual range of pointer operations can be applied to these objects:
pre/post-increment and decrement, adding or subtracting integer offsets,
as well as the full range of comparison operators. If two cursors
point to entries in the same view, their difference can be calculated.
<P>
As with regular pointers, care must be taken to avoid running off of
either end of a view (the debug build includes assertions to check this).
<P>
<hr size=1>
<dl>
<if !private>
<a name="c4_Cursor__index"><dt>
<nobr>
int
<b>_index</b>;
</nobr>
<dd>
<font face=Helvetica size=-1></font>
<p>
<if !private>
<a name="c4_Cursor__seq"><dt>
<nobr>
<A HREF="c4_Sequence.html" >c4_Sequence</A>*
<b>_seq</b>;
</nobr>
<dd>
<font face=Helvetica size=-1></font>
<p>
<if !private>
<a name="c4_Cursor_c4_Cursor_c4_Sequence_int_"><dt>
<nobr>
<b>c4_Cursor</b> (<A HREF="c4_Sequence.html" >c4_Sequence</A>& implementation_, int index_);
</nobr>
<dd>
<font face=Helvetica size=-1>Construct a new cursor</font>
<p>
<if !private>
<a name="c4_Cursor_operator_____const"><dt>
<nobr>
<A HREF="c4_RowRef.html" >c4_RowRef</A>
<b>operator* </b> () <i>const</i>;
</nobr>
<dd>
<font face=Helvetica size=-1>Dereference this cursor to "almost" a row</font>
<p>
<if !private>
<a name="c4_Cursor_operator_____"><dt>
<nobr>
<A HREF="c4_Cursor.html" >c4_Cursor</A>&
<b>operator++</b> ();
</nobr>
<dd>
<font face=Helvetica size=-1>Pre-increment the cursor</font>
<p>
<if !private>
<a name="c4_Cursor_operator___int__"><dt>
<nobr>
<A HREF="c4_Cursor.html" >c4_Cursor</A>
<b>operator++</b> (int);
</nobr>
<dd>
<font face=Helvetica size=-1>Post-increment the cursor</font>
<p>
<if !private>
<a name="c4_Cursor_operator___int__"><dt>
<nobr>
<A HREF="c4_Cursor.html" >c4_Cursor</A>&
<b>operator+=</b> (int offset_);
</nobr>
<dd>
<font face=Helvetica size=-1>Advance by a given offset</font>
<p>
<if !private>
<a name="c4_Cursor_operator___c4_Cursor__const"><dt>
<nobr>
int
<b>operator- </b> (<A HREF="c4_Cursor.html" >c4_Cursor</A> cursor_) <i>const</i>;
</nobr>
<dd>
<font face=Helvetica size=-1>Return the distance between two cursors</font>
<p>
<if !private>
<a name="c4_Cursor_operator___int__const"><dt>
<nobr>
<A HREF="c4_Cursor.html" >c4_Cursor</A>
<b>operator- </b> (int) <i>const</i>;
</nobr>
<dd>
<font face=Helvetica size=-1>Subtract a specified offset</font>
<p>
<if !private>
<a name="c4_Cursor_operator_____"><dt>
<nobr>
<A HREF="c4_Cursor.html" >c4_Cursor</A>&
<b>operator--</b> ();
</nobr>
<dd>
<font face=Helvetica size=-1>Pre-decrement the cursor</font>
<p>
<if !private>
<a name="c4_Cursor_operator___int__"><dt>
<nobr>
<A HREF="c4_Cursor.html" >c4_Cursor</A>
<b>operator--</b> (int);
</nobr>
<dd>
<font face=Helvetica size=-1>Post-decrement the cursor</font>
<p>
<if !private>
<a name="c4_Cursor_operator___int__"><dt>
<nobr>
<A HREF="c4_Cursor.html" >c4_Cursor</A>&
<b>operator-=</b> (int offset_);
</nobr>
<dd>
<font face=Helvetica size=-1>Back up by a given offset</font>
<p>
<if !private>
<a name="c4_Cursor_operator___int__const"><dt>
<nobr>
<A HREF="c4_RowRef.html" >c4_RowRef</A>
<b>operator[]</b> (int index_) <i>const</i>;
</nobr>
<dd>
<font face=Helvetica size=-1>This is the same as *(cursor + offset)</font>
<p>
</dl>
<hr size=1 width=50 align=left>
class
<b>c4_Cursor</b>
</font>
</body></html>
|