/usr/share/gtk-doc/html/librdf/redland-iterator.html is in librdf0-dev 1.0.17-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Iterator</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Redland RDF Library Manual">
<link rel="up" href="reference-manual.html" title="Part II. Reference Manual">
<link rel="prev" href="redland-heuristics.html" title="Heuristics">
<link rel="next" href="redland-list.html" title="List">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="redland-heuristics.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference-manual.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Redland RDF Library Manual</th>
<td><a accesskey="n" href="redland-list.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#redland-iterator.synopsis" class="shortcut">Top</a>
|
<a href="#redland-iterator.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="redland-iterator"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="redland-iterator.top_of_page"></a>Iterator</span></h2>
<p>Iterator — Iterate a sequence of objects across some other object.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="redland-iterator.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">typedef <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator">librdf_iterator</a>;
enum <a class="link" href="redland-iterator.html#librdf-iterator-get-method-flags" title="enum librdf_iterator_get_method_flags">librdf_iterator_get_method_flags</a>;
<span class="returnvalue">void</span> * (<a class="link" href="redland-iterator.html#librdf-iterator-map-handler" title="librdf_iterator_map_handler ()">*librdf_iterator_map_handler</a>) (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>,
<em class="parameter"><code><span class="type">void</span> *map_context</code></em>,
<em class="parameter"><code><span class="type">void</span> *item</code></em>);
<span class="returnvalue">void</span> (<a class="link" href="redland-iterator.html#librdf-iterator-map-free-context-handler" title="librdf_iterator_map_free_context_handler ()">*librdf_iterator_map_free_context_handler</a>)
(<em class="parameter"><code><span class="type">void</span> *map_context</code></em>);
<a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></a> * <a class="link" href="redland-iterator.html#librdf-new-iterator" title="librdf_new_iterator ()">librdf_new_iterator</a> (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>,
<em class="parameter"><code><span class="type">void</span> *context</code></em>,
<em class="parameter"><code><span class="type">int</span> (*is_end_method) (void*)</code></em>,
<em class="parameter"><code><span class="type">int</span> (*next_method) (void*)</code></em>,
<em class="parameter"><code><span class="type">void</span>* (*get_method) (void*, int)</code></em>,
<em class="parameter"><code><span class="type">void</span> (*finished_method) (void*)</code></em>);
<span class="returnvalue">void</span> <a class="link" href="redland-iterator.html#librdf-free-iterator" title="librdf_free_iterator ()">librdf_free_iterator</a> (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>);
<span class="returnvalue">int</span> <a class="link" href="redland-iterator.html#librdf-iterator-end" title="librdf_iterator_end ()">librdf_iterator_end</a> (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>);
<span class="returnvalue">int</span> <a class="link" href="redland-iterator.html#librdf-iterator-have-elements" title="librdf_iterator_have_elements ()">librdf_iterator_have_elements</a> (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>);
<span class="returnvalue">int</span> <a class="link" href="redland-iterator.html#librdf-iterator-next" title="librdf_iterator_next ()">librdf_iterator_next</a> (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>);
<span class="returnvalue">void</span> * <a class="link" href="redland-iterator.html#librdf-iterator-get-object" title="librdf_iterator_get_object ()">librdf_iterator_get_object</a> (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>);
<span class="returnvalue">void</span> * <a class="link" href="redland-iterator.html#librdf-iterator-get-context" title="librdf_iterator_get_context ()">librdf_iterator_get_context</a> (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>);
<span class="returnvalue">void</span> * <a class="link" href="redland-iterator.html#librdf-iterator-get-key" title="librdf_iterator_get_key ()">librdf_iterator_get_key</a> (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>);
<span class="returnvalue">void</span> * <a class="link" href="redland-iterator.html#librdf-iterator-get-value" title="librdf_iterator_get_value ()">librdf_iterator_get_value</a> (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>);
<span class="returnvalue">int</span> <a class="link" href="redland-iterator.html#librdf-iterator-add-map" title="librdf_iterator_add_map ()">librdf_iterator_add_map</a> (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>,
<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator-map-handler" title="librdf_iterator_map_handler ()"><span class="type">librdf_iterator_map_handler</span></a> map_function</code></em>,
<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator-map-free-context-handler" title="librdf_iterator_map_free_context_handler ()"><span class="type">librdf_iterator_map_free_context_handler</span></a> free_context</code></em>,
<em class="parameter"><code><span class="type">void</span> *map_context</code></em>);
<a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></a> * <a class="link" href="redland-iterator.html#librdf-new-empty-iterator" title="librdf_new_empty_iterator ()">librdf_new_empty_iterator</a> (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="redland-iterator.description"></a><h2>Description</h2>
<p>
Provides a way to operate across a sequence of objects that are
generated one-by-one on demand. The returned objects can be of any
type but the main public methods are on the <a class="link" href="redland-model.html#librdf-model" title="librdf_model"><span class="type">librdf_model</span></a> classs and
return sequence of <a class="link" href="redland-node.html#librdf-node" title="librdf_node"><span class="type">librdf_node</span></a> objects such as <a class="link" href="redland-model.html#librdf-model-get-sources" title="librdf_model_get_sources ()"><code class="function">librdf_model_get_sources()</code></a>.
</p>
</div>
<div class="refsect1">
<a name="redland-iterator.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="librdf-iterator"></a><h3>librdf_iterator</h3>
<pre class="programlisting">typedef struct librdf_iterator_s librdf_iterator;
</pre>
<p>
Redland iterator class.
</p>
</div>
<hr>
<div class="refsect2">
<a name="librdf-iterator-get-method-flags"></a><h3>enum librdf_iterator_get_method_flags</h3>
<pre class="programlisting">typedef enum {
LIBRDF_ITERATOR_GET_METHOD_GET_OBJECT = 0,
LIBRDF_ITERATOR_GET_METHOD_GET_CONTEXT = 1,
LIBRDF_ITERATOR_GET_METHOD_GET_KEY = 2,
LIBRDF_ITERATOR_GET_METHOD_GET_VALUE = 3
} librdf_iterator_get_method_flags;
</pre>
<p>
Flags for <a class="link" href="redland-iterator.html#librdf-new-iterator" title="librdf_new_iterator ()"><code class="function">librdf_new_iterator()</code></a> get_method function pointer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="LIBRDF-ITERATOR-GET-METHOD-GET-OBJECT:CAPS"></a><span class="term"><code class="literal">LIBRDF_ITERATOR_GET_METHOD_GET_OBJECT</code></span></p></td>
<td>get object from iterator - implementing <a class="link" href="redland-iterator.html#librdf-iterator-get-context" title="librdf_iterator_get_context ()"><code class="function">librdf_iterator_get_context()</code></a>
</td>
</tr>
<tr>
<td><p><a name="LIBRDF-ITERATOR-GET-METHOD-GET-CONTEXT:CAPS"></a><span class="term"><code class="literal">LIBRDF_ITERATOR_GET_METHOD_GET_CONTEXT</code></span></p></td>
<td>get context from iterator - implementing <a class="link" href="redland-iterator.html#librdf-iterator-get-object" title="librdf_iterator_get_object ()"><code class="function">librdf_iterator_get_object()</code></a>
</td>
</tr>
<tr>
<td><p><a name="LIBRDF-ITERATOR-GET-METHOD-GET-KEY:CAPS"></a><span class="term"><code class="literal">LIBRDF_ITERATOR_GET_METHOD_GET_KEY</code></span></p></td>
<td>get iterator key object from iterator - implementing <a class="link" href="redland-iterator.html#librdf-iterator-get-key" title="librdf_iterator_get_key ()"><code class="function">librdf_iterator_get_key()</code></a>
</td>
</tr>
<tr>
<td><p><a name="LIBRDF-ITERATOR-GET-METHOD-GET-VALUE:CAPS"></a><span class="term"><code class="literal">LIBRDF_ITERATOR_GET_METHOD_GET_VALUE</code></span></p></td>
<td>get iterator value from iterator - implementing <a class="link" href="redland-iterator.html#librdf-iterator-get-value" title="librdf_iterator_get_value ()"><code class="function">librdf_iterator_get_value()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-iterator-map-handler"></a><h3>librdf_iterator_map_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> * (*librdf_iterator_map_handler) (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>,
<em class="parameter"><code><span class="type">void</span> *map_context</code></em>,
<em class="parameter"><code><span class="type">void</span> *item</code></em>);</pre>
<p>
Map function for a <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> map operation.
</p>
<p>
See <a class="link" href="redland-iterator.html#librdf-iterator-add-map" title="librdf_iterator_add_map ()"><code class="function">librdf_iterator_add_map()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iterator</code></em> :</span></p></td>
<td>Iterator that this map is operating over.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>map_context</code></em> :</span></p></td>
<td>Map data context pointer.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td>
<td>Pointer to the current item in the iteration.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>item in keep the iteration or NULL to remove it</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-iterator-map-free-context-handler"></a><h3>librdf_iterator_map_free_context_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> (*librdf_iterator_map_free_context_handler)
(<em class="parameter"><code><span class="type">void</span> *map_context</code></em>);</pre>
<p>
Free handler function for a <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> map operation.
</p>
<p>
See <a class="link" href="redland-iterator.html#librdf-iterator-add-map" title="librdf_iterator_add_map ()"><code class="function">librdf_iterator_add_map()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>map_context</code></em> :</span></p></td>
<td>Map data context pointer.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-new-iterator"></a><h3>librdf_new_iterator ()</h3>
<pre class="programlisting"><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></a> * librdf_new_iterator (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>,
<em class="parameter"><code><span class="type">void</span> *context</code></em>,
<em class="parameter"><code><span class="type">int</span> (*is_end_method) (void*)</code></em>,
<em class="parameter"><code><span class="type">int</span> (*next_method) (void*)</code></em>,
<em class="parameter"><code><span class="type">void</span>* (*get_method) (void*, int)</code></em>,
<em class="parameter"><code><span class="type">void</span> (*finished_method) (void*)</code></em>);</pre>
<p>
Constructor - create a new <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> object.
The iterator object takes ownership of <em class="parameter"><code>context</code></em> and frees it with <em class="parameter"><code>finished_method</code></em>.
The finished method is not called if librdf_new_iterator fails and returns NULL.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
<td>redland world object</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td>context to pass to the iterator functions</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>is_end_method</code></em> :</span></p></td>
<td>function to call to see if the iteration has ended</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>next_method</code></em> :</span></p></td>
<td>function to get the next element</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>get_method</code></em> :</span></p></td>
<td>function to get the next element</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>finished_method</code></em> :</span></p></td>
<td>function to destroy the iterator context (or NULL if not needed)</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> object or NULL on failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-free-iterator"></a><h3>librdf_free_iterator ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> librdf_free_iterator (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>);</pre>
<p>
Destructor - destroy a <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>iterator</code></em> :</span></p></td>
<td>the <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> object</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-iterator-end"></a><h3>librdf_iterator_end ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> librdf_iterator_end (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>);</pre>
<p>
Test if the iterator has finished.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iterator</code></em> :</span></p></td>
<td>the <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>non 0 if the iterator has finished</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-iterator-have-elements"></a><h3>librdf_iterator_have_elements ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> librdf_iterator_have_elements (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>);</pre>
<p>
Test if the iterator has finished.
</p>
<p>
DEPRECATED - use !librdf_iterator_end(iterator)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iterator</code></em> :</span></p></td>
<td>the <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 if the iterator has finished</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-iterator-next"></a><h3>librdf_iterator_next ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> librdf_iterator_next (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>);</pre>
<p>
Move to the next iterator element.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iterator</code></em> :</span></p></td>
<td>the <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>non 0 if the iterator has finished</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-iterator-get-object"></a><h3>librdf_iterator_get_object ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> * librdf_iterator_get_object (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>);</pre>
<p>
Get the current object from the iterator.
</p>
<p>
This method returns a SHARED pointer to the current iterator object
which should be copied by the caller to preserve it if the iterator
is moved on librdf_iterator_next or if it should last after the
iterator is closed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iterator</code></em> :</span></p></td>
<td>the <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The next element or NULL if the iterator has finished.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-iterator-get-context"></a><h3>librdf_iterator_get_context ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> * librdf_iterator_get_context (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>);</pre>
<p>
Get the context of the current object on the iterator.
</p>
<p>
This method returns a SHARED pointer to the current context node object
which should be copied by the caller to preserve it if the iterator
is moved on librdf_iterator_next or if it should last after the
iterator is closed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iterator</code></em> :</span></p></td>
<td>the <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The context (can be NULL) or NULL if the iterator has finished.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-iterator-get-key"></a><h3>librdf_iterator_get_key ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> * librdf_iterator_get_key (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>);</pre>
<p>
Get the key of the current object on the iterator.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iterator</code></em> :</span></p></td>
<td>the <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The context or NULL if the iterator has finished.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-iterator-get-value"></a><h3>librdf_iterator_get_value ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> * librdf_iterator_get_value (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>);</pre>
<p>
Get the value of the current object on the iterator.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iterator</code></em> :</span></p></td>
<td>the <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The context or NULL if the iterator has finished.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-iterator-add-map"></a><h3>librdf_iterator_add_map ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> librdf_iterator_add_map (<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> *iterator</code></em>,
<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator-map-handler" title="librdf_iterator_map_handler ()"><span class="type">librdf_iterator_map_handler</span></a> map_function</code></em>,
<em class="parameter"><code><a class="link" href="redland-iterator.html#librdf-iterator-map-free-context-handler" title="librdf_iterator_map_free_context_handler ()"><span class="type">librdf_iterator_map_free_context_handler</span></a> free_context</code></em>,
<em class="parameter"><code><span class="type">void</span> *map_context</code></em>);</pre>
<p>
Add a librdf_iterator mapping function.
</p>
<p>
Adds an iterator mapping function which operates over the iterator to
select which elements are returned; it will be applied as soon as
this method is called.
</p>
<p>
Several mapping functions can be added and they are applied in
the order given
</p>
<p>
The mapping function should return non 0 to allow the element to be
returned.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iterator</code></em> :</span></p></td>
<td>the iterator</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>map_function</code></em> :</span></p></td>
<td>the function to operate</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>free_context</code></em> :</span></p></td>
<td>the function to use to free the context (or NULL)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>map_context</code></em> :</span></p></td>
<td>the context to pass to the map function</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Non 0 on failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="librdf-new-empty-iterator"></a><h3>librdf_new_empty_iterator ()</h3>
<pre class="programlisting"><a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="returnvalue">librdf_iterator</span></a> * librdf_new_empty_iterator (<em class="parameter"><code><a class="link" href="redland-world.html#librdf-world" title="librdf_world"><span class="type">librdf_world</span></a> *world</code></em>);</pre>
<p>
Constructor - create a new <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> with no content.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>world</code></em> :</span></p></td>
<td>redland world object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="redland-iterator.html#librdf-iterator" title="librdf_iterator"><span class="type">librdf_iterator</span></a> object or NULL on failure</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>
|