diff options
Diffstat (limited to '')
-rw-r--r-- | docs/html/raptor2-section-avltree.html | 799 |
1 files changed, 799 insertions, 0 deletions
diff --git a/docs/html/raptor2-section-avltree.html b/docs/html/raptor2-section-avltree.html new file mode 100644 index 0000000..c76017d --- /dev/null +++ b/docs/html/raptor2-section-avltree.html @@ -0,0 +1,799 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>section-avltree: Raptor RDF Syntax Library Manual</title> +<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> +<link rel="home" href="index.html" title="Raptor RDF Syntax Library Manual"> +<link rel="up" href="reference-manual.html" title="Part II. Raptor Reference Manual"> +<link rel="prev" href="raptor2-section-memory.html" title="section-memory"> +<link rel="next" href="raptor2-section-constants.html" title="section-constants"> +<meta name="generator" content="GTK-Doc V1.33.1 (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="5"><tr valign="middle"> +<td width="100%" align="left" class="shortcuts"> +<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> + <a href="#raptor2-section-avltree.description" class="shortcut">Description</a></span> +</td> +<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> +<td><a accesskey="u" href="reference-manual.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> +<td><a accesskey="p" href="raptor2-section-memory.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> +<td><a accesskey="n" href="raptor2-section-constants.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> +</tr></table> +<div class="refentry"> +<a name="raptor2-section-avltree"></a><div class="titlepage"></div> +<div class="refnamediv"><table width="100%"><tr> +<td valign="top"> +<h2><span class="refentrytitle"><a name="raptor2-section-avltree.top_of_page"></a>section-avltree</span></h2> +<p>section-avltree</p> +</td> +<td class="gallery_image" valign="top" align="right"></td> +</tr></table></div> +<div class="refsect1"> +<a name="raptor2-section-avltree.functions"></a><h2>Functions</h2> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="functions_proto_type"> +<col class="functions_proto_name"> +</colgroup> +<tbody> +<tr> +<td class="function_type"> +<a class="link" href="raptor2-section-avltree.html#raptor-avltree" title="raptor_avltree"><span class="returnvalue">raptor_avltree</span></a> * +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-avltree.html#raptor-new-avltree" title="raptor_new_avltree ()">raptor_new_avltree</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-avltree.html#raptor-free-avltree" title="raptor_free_avltree ()">raptor_free_avltree</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-avltree.html#raptor-avltree-add" title="raptor_avltree_add ()">raptor_avltree_add</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-avltree.html#raptor-avltree-delete" title="raptor_avltree_delete ()">raptor_avltree_delete</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-avltree.html#raptor-avltree-print" title="raptor_avltree_print ()">raptor_avltree_print</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> * +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-avltree.html#raptor-avltree-remove" title="raptor_avltree_remove ()">raptor_avltree_remove</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> * +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-avltree.html#raptor-avltree-search" title="raptor_avltree_search ()">raptor_avltree_search</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-avltree.html#raptor-avltree-set-print-handler" title="raptor_avltree_set_print_handler ()">raptor_avltree_set_print_handler</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-avltree.html#raptor-avltree-size" title="raptor_avltree_size ()">raptor_avltree_size</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-avltree.html#raptor-avltree-trim" title="raptor_avltree_trim ()">raptor_avltree_trim</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-avltree.html#raptor-avltree-visit" title="raptor_avltree_visit ()">raptor_avltree_visit</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<a class="link" href="raptor2-section-avltree.html#raptor-avltree-iterator" title="raptor_avltree_iterator"><span class="returnvalue">raptor_avltree_iterator</span></a> * +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-avltree.html#raptor-new-avltree-iterator" title="raptor_new_avltree_iterator ()">raptor_new_avltree_iterator</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-avltree.html#raptor-free-avltree-iterator" title="raptor_free_avltree_iterator ()">raptor_free_avltree_iterator</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">void</span> * +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-avltree.html#raptor-avltree-iterator-get" title="raptor_avltree_iterator_get ()">raptor_avltree_iterator_get</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-avltree.html#raptor-avltree-iterator-is-end" title="raptor_avltree_iterator_is_end ()">raptor_avltree_iterator_is_end</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<a class="link" href="raptor2-section-avltree.html#raptor-avltree-iterator-next" title="raptor_avltree_iterator_next ()">raptor_avltree_iterator_next</a> <span class="c_punctuation">()</span> +</td> +</tr> +<tr> +<td class="function_type"> +<span class="returnvalue">int</span> +</td> +<td class="function_name"> +<span class="c_punctuation">(</span><a class="link" href="raptor2-section-avltree.html#raptor-avltree-visit-handler" title="raptor_avltree_visit_handler ()">*raptor_avltree_visit_handler</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> +</td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect1"> +<a name="raptor2-section-avltree.other"></a><h2>Types and Values</h2> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="other_proto_type"> +<col class="other_proto_name"> +</colgroup> +<tbody> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="raptor2-section-avltree.html#raptor-avltree" title="raptor_avltree">raptor_avltree</a></td> +</tr> +<tr> +<td class="datatype_keyword">enum</td> +<td class="function_name"><a class="link" href="raptor2-section-avltree.html#raptor-avltree-bitflags" title="enum raptor_avltree_bitflags">raptor_avltree_bitflags</a></td> +</tr> +<tr> +<td class="typedef_keyword">typedef</td> +<td class="function_name"><a class="link" href="raptor2-section-avltree.html#raptor-avltree-iterator" title="raptor_avltree_iterator">raptor_avltree_iterator</a></td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect1"> +<a name="raptor2-section-avltree.description"></a><h2>Description</h2> +</div> +<div class="refsect1"> +<a name="raptor2-section-avltree.functions_details"></a><h2>Functions</h2> +<div class="refsect2"> +<a name="raptor-new-avltree"></a><h3>raptor_new_avltree ()</h3> +<pre class="programlisting"><a class="link" href="raptor2-section-avltree.html#raptor-avltree" title="raptor_avltree"><span class="returnvalue">raptor_avltree</span></a> * +raptor_new_avltree (<em class="parameter"><code><a class="link" href="raptor2-section-general.html#raptor-data-compare-handler" title="raptor_data_compare_handler ()"><span class="type">raptor_data_compare_handler</span></a> compare_handler</code></em>, + <em class="parameter"><code><a class="link" href="raptor2-section-general.html#raptor-data-free-handler" title="raptor_data_free_handler ()"><span class="type">raptor_data_free_handler</span></a> free_handler</code></em>, + <em class="parameter"><code>unsigned <span class="type">int</span> flags</code></em>);</pre> +<p>AVL Tree Constructor</p> +<div class="refsect3"> +<a name="raptor-new-avltree.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>compare_handler</p></td> +<td class="parameter_description"><p>item comparison handler for ordering</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>free_handler</p></td> +<td class="parameter_description"><p>item free handler (or NULL)</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>flags</p></td> +<td class="parameter_description"><p>AVLTree flags - bitmask of <a class="link" href="raptor2-section-avltree.html#raptor-avltree-bitflags" title="enum raptor_avltree_bitflags"><span class="type">raptor_avltree_bitflags</span></a> flags.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-new-avltree.returns"></a><h4>Returns</h4> +<p> new AVL Tree or NULL on failure</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="raptor-free-avltree"></a><h3>raptor_free_avltree ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +raptor_free_avltree (<em class="parameter"><code><a class="link" href="raptor2-section-avltree.html#raptor-avltree" title="raptor_avltree"><span class="type">raptor_avltree</span></a> *tree</code></em>);</pre> +<p>AVL Tree destructor</p> +<div class="refsect3"> +<a name="raptor-free-avltree.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>tree</p></td> +<td class="parameter_description"><p>AVLTree object</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="raptor-avltree-add"></a><h3>raptor_avltree_add ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +raptor_avltree_add (<em class="parameter"><code><a class="link" href="raptor2-section-avltree.html#raptor-avltree" title="raptor_avltree"><span class="type">raptor_avltree</span></a> *tree</code></em>, + <em class="parameter"><code><span class="type">void</span> *p_data</code></em>);</pre> +<p>add an item to an AVL Tree</p> +<p>The item added becomes owned by the AVL Tree, and will be freed by +the free_handler argument given to <a class="link" href="raptor2-section-avltree.html#raptor-new-avltree" title="raptor_new_avltree ()"><code class="function">raptor_new_avltree()</code></a>.</p> +<div class="refsect3"> +<a name="raptor-avltree-add.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>tree</p></td> +<td class="parameter_description"><p>AVL Tree object</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>p_data</p></td> +<td class="parameter_description"><p>pointer to data item</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-avltree-add.returns"></a><h4>Returns</h4> +<p> 0 on success, >0 if equivalent item exists (and the old element remains in the tree), <0 on failure</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="raptor-avltree-delete"></a><h3>raptor_avltree_delete ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +raptor_avltree_delete (<em class="parameter"><code><a class="link" href="raptor2-section-avltree.html#raptor-avltree" title="raptor_avltree"><span class="type">raptor_avltree</span></a> *tree</code></em>, + <em class="parameter"><code><span class="type">void</span> *p_data</code></em>);</pre> +<p>Remove an item from an AVL Tree and free it</p> +<div class="refsect3"> +<a name="raptor-avltree-delete.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>tree</p></td> +<td class="parameter_description"><p>AVL Tree object</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>p_data</p></td> +<td class="parameter_description"><p>pointer to data item</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-avltree-delete.returns"></a><h4>Returns</h4> +<p> non-0 on failure</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="raptor-avltree-print"></a><h3>raptor_avltree_print ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +raptor_avltree_print (<em class="parameter"><code><a class="link" href="raptor2-section-avltree.html#raptor-avltree" title="raptor_avltree"><span class="type">raptor_avltree</span></a> *tree</code></em>, + <em class="parameter"><code><span class="type">FILE</span> *stream</code></em>);</pre> +<p>Print the items in the tree in order to a stream (for debugging)</p> +<div class="refsect3"> +<a name="raptor-avltree-print.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>tree</p></td> +<td class="parameter_description"><p>AVL Tree</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>stream</p></td> +<td class="parameter_description"><p>stream to print to</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-avltree-print.returns"></a><h4>Returns</h4> +<p> non-0 on failure</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="raptor-avltree-remove"></a><h3>raptor_avltree_remove ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> * +raptor_avltree_remove (<em class="parameter"><code><a class="link" href="raptor2-section-avltree.html#raptor-avltree" title="raptor_avltree"><span class="type">raptor_avltree</span></a> *tree</code></em>, + <em class="parameter"><code><span class="type">void</span> *p_data</code></em>);</pre> +<p>Remove an item from an AVL Tree and return it</p> +<p>The item removed is no longer owned by the AVL Tree and is +owned by the caller.</p> +<div class="refsect3"> +<a name="raptor-avltree-remove.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>tree</p></td> +<td class="parameter_description"><p>AVL Tree object</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>p_data</p></td> +<td class="parameter_description"><p>pointer to data item</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-avltree-remove.returns"></a><h4>Returns</h4> +<p> object or NULL on failure or if not found</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="raptor-avltree-search"></a><h3>raptor_avltree_search ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> * +raptor_avltree_search (<em class="parameter"><code><a class="link" href="raptor2-section-avltree.html#raptor-avltree" title="raptor_avltree"><span class="type">raptor_avltree</span></a> *tree</code></em>, + <em class="parameter"><code>const <span class="type">void</span> *p_data</code></em>);</pre> +<p>Find an item in an AVL Tree</p> +<div class="refsect3"> +<a name="raptor-avltree-search.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>tree</p></td> +<td class="parameter_description"><p>AVL Tree object</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>p_data</p></td> +<td class="parameter_description"><p>pointer to data item</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-avltree-search.returns"></a><h4>Returns</h4> +<p> shared pointer to item (still owned by AVL Tree) or NULL on failure or if not found</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="raptor-avltree-set-print-handler"></a><h3>raptor_avltree_set_print_handler ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +raptor_avltree_set_print_handler (<em class="parameter"><code><a class="link" href="raptor2-section-avltree.html#raptor-avltree" title="raptor_avltree"><span class="type">raptor_avltree</span></a> *tree</code></em>, + <em class="parameter"><code><a class="link" href="raptor2-section-general.html#raptor-data-print-handler" title="raptor_data_print_handler ()"><span class="type">raptor_data_print_handler</span></a> print_handler</code></em>);</pre> +<p>Set the handler for printing an item in a tree</p> +<div class="refsect3"> +<a name="raptor-avltree-set-print-handler.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>tree</p></td> +<td class="parameter_description"><p>AVL Tree object</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>print_handler</p></td> +<td class="parameter_description"><p>print function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="raptor-avltree-size"></a><h3>raptor_avltree_size ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +raptor_avltree_size (<em class="parameter"><code><a class="link" href="raptor2-section-avltree.html#raptor-avltree" title="raptor_avltree"><span class="type">raptor_avltree</span></a> *tree</code></em>);</pre> +<p>Get the number of items in the AVL Tree</p> +<div class="refsect3"> +<a name="raptor-avltree-size.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>tree</p></td> +<td class="parameter_description"><p>AVL Tree object</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-avltree-size.returns"></a><h4>Returns</h4> +<p> number of items in tree</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="raptor-avltree-trim"></a><h3>raptor_avltree_trim ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +raptor_avltree_trim (<em class="parameter"><code><a class="link" href="raptor2-section-avltree.html#raptor-avltree" title="raptor_avltree"><span class="type">raptor_avltree</span></a> *tree</code></em>);</pre> +<p>Delete all nodes from an AVL tree but keep the shell.</p> +<div class="refsect3"> +<a name="raptor-avltree-trim.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>tree</p></td> +<td class="parameter_description"><p>AVLTree object</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="raptor-avltree-visit"></a><h3>raptor_avltree_visit ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +raptor_avltree_visit (<em class="parameter"><code><a class="link" href="raptor2-section-avltree.html#raptor-avltree" title="raptor_avltree"><span class="type">raptor_avltree</span></a> *tree</code></em>, + <em class="parameter"><code><a class="link" href="raptor2-section-avltree.html#raptor-avltree-visit-handler" title="raptor_avltree_visit_handler ()"><span class="type">raptor_avltree_visit_handler</span></a> visit_handler</code></em>, + <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre> +<p>Perform an in-order visit of the items in the AVL Tree</p> +<div class="refsect3"> +<a name="raptor-avltree-visit.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>tree</p></td> +<td class="parameter_description"><p>AVL Tree object</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>visit_handler</p></td> +<td class="parameter_description"><p>visit function to call at each item</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>user_data</p></td> +<td class="parameter_description"><p>user data pointer fo visit function</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-avltree-visit.returns"></a><h4>Returns</h4> +<p> non-0 if traversal was terminated early by <em class="parameter"><code>visit_handler</code></em> +</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="raptor-new-avltree-iterator"></a><h3>raptor_new_avltree_iterator ()</h3> +<pre class="programlisting"><a class="link" href="raptor2-section-avltree.html#raptor-avltree-iterator" title="raptor_avltree_iterator"><span class="returnvalue">raptor_avltree_iterator</span></a> * +raptor_new_avltree_iterator (<em class="parameter"><code><a class="link" href="raptor2-section-avltree.html#raptor-avltree" title="raptor_avltree"><span class="type">raptor_avltree</span></a> *tree</code></em>, + <em class="parameter"><code><span class="type">void</span> *range</code></em>, + <em class="parameter"><code><a class="link" href="raptor2-section-general.html#raptor-data-free-handler" title="raptor_data_free_handler ()"><span class="type">raptor_data_free_handler</span></a> range_free_handler</code></em>, + <em class="parameter"><code><span class="type">int</span> direction</code></em>);</pre> +<p>Get an in-order iterator for the start of a range, or the entire contents</p> +<p>If range is NULL, the entire tree is walked in order. If range +specifies a range (i.e. the tree comparison function will 'match' +(return 0 for) range and /several/ nodes), the iterator will be +placed at the leftmost child matching range, and +raptor_avltree_iterator_next will iterate over all nodes (and only +nodes) that match range.</p> +<div class="refsect3"> +<a name="raptor-new-avltree-iterator.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>tree</p></td> +<td class="parameter_description"><p><a class="link" href="raptor2-section-avltree.html#raptor-avltree" title="raptor_avltree"><span class="type">raptor_avltree</span></a> object</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>range</p></td> +<td class="parameter_description"><p>range</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>range_free_handler</p></td> +<td class="parameter_description"><p>function to free <em class="parameter"><code>range</code></em> +object</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>direction</p></td> +<td class="parameter_description"><p><0 to go 'backwards' otherwise 'forwards'</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-new-avltree-iterator.returns"></a><h4>Returns</h4> +<p> a new <a class="link" href="raptor2-section-avltree.html#raptor-avltree-iterator" title="raptor_avltree_iterator"><span class="type">raptor_avltree_iterator</span></a> object or NULL on failure</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="raptor-free-avltree-iterator"></a><h3>raptor_free_avltree_iterator ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +raptor_free_avltree_iterator (<em class="parameter"><code><a class="link" href="raptor2-section-avltree.html#raptor-avltree-iterator" title="raptor_avltree_iterator"><span class="type">raptor_avltree_iterator</span></a> *iterator</code></em>);</pre> +<p>AVL Tree Iterator destructor</p> +<div class="refsect3"> +<a name="raptor-free-avltree-iterator.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>iterator</p></td> +<td class="parameter_description"><p>AVL Tree iterator object</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="raptor-avltree-iterator-get"></a><h3>raptor_avltree_iterator_get ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> * +raptor_avltree_iterator_get (<em class="parameter"><code><a class="link" href="raptor2-section-avltree.html#raptor-avltree-iterator" title="raptor_avltree_iterator"><span class="type">raptor_avltree_iterator</span></a> *iterator</code></em>);</pre> +<p>Get current iteration object</p> +<div class="refsect3"> +<a name="raptor-avltree-iterator-get.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>iterator</p></td> +<td class="parameter_description"><p>AVL Tree iterator object</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-avltree-iterator-get.returns"></a><h4>Returns</h4> +<p> object or NULL if iteration is finished</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="raptor-avltree-iterator-is-end"></a><h3>raptor_avltree_iterator_is_end ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +raptor_avltree_iterator_is_end (<em class="parameter"><code><a class="link" href="raptor2-section-avltree.html#raptor-avltree-iterator" title="raptor_avltree_iterator"><span class="type">raptor_avltree_iterator</span></a> *iterator</code></em>);</pre> +<p>Test if an iteration is finished</p> +<div class="refsect3"> +<a name="raptor-avltree-iterator-is-end.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>iterator</p></td> +<td class="parameter_description"><p>AVL Tree iterator object</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-avltree-iterator-is-end.returns"></a><h4>Returns</h4> +<p> non-0 if iteration is finished</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="raptor-avltree-iterator-next"></a><h3>raptor_avltree_iterator_next ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +raptor_avltree_iterator_next (<em class="parameter"><code><a class="link" href="raptor2-section-avltree.html#raptor-avltree-iterator" title="raptor_avltree_iterator"><span class="type">raptor_avltree_iterator</span></a> *iterator</code></em>);</pre> +<p>Move iteration to next/prev object</p> +<div class="refsect3"> +<a name="raptor-avltree-iterator-next.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>iterator</p></td> +<td class="parameter_description"><p>AVL Tree iterator object</p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-avltree-iterator-next.returns"></a><h4>Returns</h4> +<p> non-0 if iteration is finished</p> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="raptor-avltree-visit-handler"></a><h3>raptor_avltree_visit_handler ()</h3> +<pre class="programlisting"><span class="returnvalue">int</span> +<span class="c_punctuation">(</span>*raptor_avltree_visit_handler<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">int</span> depth</code></em>, + <em class="parameter"><code><span class="type">void</span> *data</code></em>, + <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre> +<p>AVL Tree visitor function as given to <a class="link" href="raptor2-section-avltree.html#raptor-avltree-visit" title="raptor_avltree_visit ()"><code class="function">raptor_avltree_visit()</code></a></p> +<div class="refsect3"> +<a name="raptor-avltree-visit-handler.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>depth</p></td> +<td class="parameter_description"><p>depth of object in tree</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>data</p></td> +<td class="parameter_description"><p>data object being visited</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>user_data</p></td> +<td class="parameter_description"><p>user data arg to <a class="link" href="raptor2-section-avltree.html#raptor-avltree-visit" title="raptor_avltree_visit ()"><code class="function">raptor_avltree_visit()</code></a></p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="raptor-avltree-visit-handler.returns"></a><h4>Returns</h4> +<p> non-0 to terminate visit early.</p> +</div> +</div> +</div> +<div class="refsect1"> +<a name="raptor2-section-avltree.other_details"></a><h2>Types and Values</h2> +<div class="refsect2"> +<a name="raptor-avltree"></a><h3>raptor_avltree</h3> +<pre class="programlisting">typedef struct raptor_avltree_s raptor_avltree; +</pre> +<p>AVL Tree</p> +</div> +<hr> +<div class="refsect2"> +<a name="raptor-avltree-bitflags"></a><h3>enum raptor_avltree_bitflags</h3> +<p>Bit flags for AVL Tree class constructor <a class="link" href="raptor2-section-avltree.html#raptor-new-avltree" title="raptor_new_avltree ()"><code class="function">raptor_new_avltree()</code></a></p> +<div class="refsect3"> +<a name="raptor-avltree-bitflags.members"></a><h4>Members</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="300px" class="enum_members_name"> +<col class="enum_members_description"> +<col width="200px" class="enum_members_annotations"> +</colgroup> +<tbody><tr> +<td class="enum_member_name"><p><a name="RAPTOR-AVLTREE-FLAG-REPLACE-DUPLICATES:CAPS"></a>RAPTOR_AVLTREE_FLAG_REPLACE_DUPLICATES</p></td> +<td class="enum_member_description"> +<p>If set <a class="link" href="raptor2-section-avltree.html#raptor-avltree-add" title="raptor_avltree_add ()"><code class="function">raptor_avltree_add()</code></a> will replace any duplicate items. If not set, <a class="link" href="raptor2-section-avltree.html#raptor-avltree-add" title="raptor_avltree_add ()"><code class="function">raptor_avltree_add()</code></a> will not replace them and will return status >0 when adding a duplicate. (Default is not set)</p> +</td> +<td class="enum_member_annotations"> </td> +</tr></tbody> +</table></div> +</div> +</div> +<hr> +<div class="refsect2"> +<a name="raptor-avltree-iterator"></a><h3>raptor_avltree_iterator</h3> +<pre class="programlisting">typedef struct raptor_avltree_iterator_s raptor_avltree_iterator; +</pre> +<p>AVL Tree Iterator as created by <a class="link" href="raptor2-section-avltree.html#raptor-new-avltree-iterator" title="raptor_new_avltree_iterator ()"><code class="function">raptor_new_avltree_iterator()</code></a></p> +</div> +</div> +</div> +<div class="footer"> +<hr>Generated by GTK-Doc V1.33.1</div> +</body> +</html>
\ No newline at end of file |