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