~ubuntu-branches/ubuntu/natty/raptor/natty-updates

« back to all changes in this revision

Viewing changes to docs/html/raptor-section-sequence.html

  • Committer: Bazaar Package Importer
  • Author(s): Dave Beckett
  • Date: 2008-04-01 22:06:01 UTC
  • mfrom: (1.1.8 upstream) (2.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20080401220601-4h1tzxtwyziurokj
Tags: 1.4.17-1
* New upstream release
* Rebuild against libcurl4-gnutls-dev rather than libcurl4-openssl-dev
  (Closes: #463344)
* debian/control: depend on libtool 1.5 rather than older debian specific
  release
* debian/copyright: 2008
* debian/libraptor1-doc.doc-base: Use a correct Section:

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
2
<html>
3
3
<head>
4
 
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>Sequence</title>
6
6
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
7
7
<link rel="start" href="index.html" title="Raptor RDF Syntax Parsing and Serializing Library Manual">
8
 
<link rel="up" href="reference-manual.html" title="Part&#160;II.&#160;Raptor Reference Manual">
9
 
<link rel="prev" href="raptor-section-parser.html" title="Parser">
 
8
<link rel="up" href="reference-manual.html" title="Part II. Raptor Reference Manual">
 
9
<link rel="prev" href="raptor-section-sax2.html" title="SAX2">
10
10
<link rel="next" href="raptor-section-serializer.html" title="Serializer">
11
 
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="chapter" href="introduction.html" title="Raptor Overview">
14
 
<link rel="part" href="tutorial.html" title="Part&#160;I.&#160;Raptor Tutorial">
 
14
<link rel="part" href="tutorial.html" title="Part I. Raptor Tutorial">
15
15
<link rel="chapter" href="tutorial-initialising-finishing.html" title="Initialising and Finishing using the Library">
16
16
<link rel="chapter" href="tutorial-querying-functionality.html" title="Listing built-in functionality">
17
17
<link rel="chapter" href="tutorial-parsing.html" title="Parsing syntaxes to RDF Triples">
18
18
<link rel="chapter" href="tutorial-serializing.html" title="Serializing RDF triples to a syntax">
19
 
<link rel="part" href="reference-manual.html" title="Part&#160;II.&#160;Raptor Reference Manual">
 
19
<link rel="part" href="reference-manual.html" title="Part II. Raptor Reference Manual">
20
20
<link rel="chapter" href="raptor-parsers.html" title="Parsers in Raptor (syntax to triples)">
21
21
<link rel="chapter" href="raptor-serializers.html" title="Serializers in Raptor (triples to syntax)">
22
22
<link rel="index" href="ix01.html" title="Index">
24
24
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
25
25
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
26
26
<tr valign="middle">
27
 
<td><a accesskey="p" href="raptor-section-parser.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
27
<td><a accesskey="p" href="raptor-section-sax2.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
28
28
<td><a accesskey="u" href="reference-manual.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
29
29
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
30
30
<th width="100%" align="center">Raptor RDF Syntax Parsing and Serializing Library Manual</th>
31
31
<td><a accesskey="n" href="raptor-section-serializer.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
32
32
</tr>
33
 
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2615848" class="shortcut">Top</a>
34
 
                  &#160;|&#160;
35
 
                  <a href="#id2643534" class="shortcut">Description</a></nobr></td></tr>
 
33
<tr><td colspan="5" class="shortcuts"><nobr><a href="#raptor-section-sequence.synopsis" class="shortcut">Top</a>
 
34
                   | 
 
35
                  <a href="#raptor-section-sequence.description" class="shortcut">Description</a></nobr></td></tr>
36
36
</table>
37
37
<div class="refentry" lang="en">
38
38
<a name="raptor-section-sequence"></a><div class="titlepage"></div>
39
39
<div class="refnamediv"><table width="100%"><tr>
40
40
<td valign="top">
41
 
<h2>
42
 
<a name="id2615848"></a><span class="refentrytitle">Sequence</span>
43
 
</h2>
44
 
<p>Sequence &#8212; Ordered sequence of items.</p>
 
41
<h2><span class="refentrytitle"><a name="raptor-section-sequence.top_of_page"></a>Sequence</span></h2>
 
42
<p>Sequence — Ordered sequence of items.</p>
45
43
</td>
46
44
<td valign="top" align="right"></td>
47
45
</tr></table></div>
48
46
<div class="refsynopsisdiv">
49
 
<h2>Synopsis</h2>
 
47
<a name="raptor-section-sequence.synopsis"></a><h2>Synopsis</h2>
50
48
<pre class="synopsis">
51
 
 
52
 
 
53
 
 
54
 
typedef             <a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a>;
55
 
<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a>*    <a class="link" href="raptor-section-sequence.html#raptor-new-sequence">raptor_new_sequence</a>                 (raptor_sequence_free_handler *free_handler,
 
49
typedef             <a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a>;
 
50
<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a>*    <a class="link" href="raptor-section-sequence.html#raptor-new-sequence" title="raptor_new_sequence ()">raptor_new_sequence</a>                 (raptor_sequence_free_handler *free_handler,
56
51
                                                         raptor_sequence_print_handler *print_handler);
57
 
void                <a class="link" href="raptor-section-sequence.html#raptor-free-sequence">raptor_free_sequence</a>                (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq);
58
 
int                 <a class="link" href="raptor-section-sequence.html#raptor-sequence-size">raptor_sequence_size</a>                (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq);
59
 
int                 <a class="link" href="raptor-section-sequence.html#raptor-sequence-set-at">raptor_sequence_set_at</a>              (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq,
 
52
void                <a class="link" href="raptor-section-sequence.html#raptor-free-sequence" title="raptor_free_sequence ()">raptor_free_sequence</a>                (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq);
 
53
int                 <a class="link" href="raptor-section-sequence.html#raptor-sequence-size" title="raptor_sequence_size ()">raptor_sequence_size</a>                (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq);
 
54
int                 <a class="link" href="raptor-section-sequence.html#raptor-sequence-set-at" title="raptor_sequence_set_at ()">raptor_sequence_set_at</a>              (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq,
60
55
                                                         int idx,
61
56
                                                         void *data);
62
 
int                 <a class="link" href="raptor-section-sequence.html#raptor-sequence-push">raptor_sequence_push</a>                (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq,
63
 
                                                         void *data);
64
 
int                 <a class="link" href="raptor-section-sequence.html#raptor-sequence-shift">raptor_sequence_shift</a>               (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq,
65
 
                                                         void *data);
66
 
void*               <a class="link" href="raptor-section-sequence.html#raptor-sequence-get-at">raptor_sequence_get_at</a>              (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq,
 
57
int                 <a class="link" href="raptor-section-sequence.html#raptor-sequence-push" title="raptor_sequence_push ()">raptor_sequence_push</a>                (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq,
 
58
                                                         void *data);
 
59
int                 <a class="link" href="raptor-section-sequence.html#raptor-sequence-shift" title="raptor_sequence_shift ()">raptor_sequence_shift</a>               (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq,
 
60
                                                         void *data);
 
61
void*               <a class="link" href="raptor-section-sequence.html#raptor-sequence-get-at" title="raptor_sequence_get_at ()">raptor_sequence_get_at</a>              (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq,
67
62
                                                         int idx);
68
 
void*               <a class="link" href="raptor-section-sequence.html#raptor-sequence-pop">raptor_sequence_pop</a>                 (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq);
69
 
void*               <a class="link" href="raptor-section-sequence.html#raptor-sequence-unshift">raptor_sequence_unshift</a>             (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq);
70
 
int                 <a class="link" href="raptor-section-sequence.html#raptor-compare-strings">raptor_compare_strings</a>              (const void *a,
 
63
void*               <a class="link" href="raptor-section-sequence.html#raptor-sequence-pop" title="raptor_sequence_pop ()">raptor_sequence_pop</a>                 (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq);
 
64
void*               <a class="link" href="raptor-section-sequence.html#raptor-sequence-unshift" title="raptor_sequence_unshift ()">raptor_sequence_unshift</a>             (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq);
 
65
int                 <a class="link" href="raptor-section-sequence.html#raptor-compare-strings" title="raptor_compare_strings ()">raptor_compare_strings</a>              (const void *a,
71
66
                                                         const void *b);
72
 
void                <a class="link" href="raptor-section-sequence.html#raptor-sequence-sort">raptor_sequence_sort</a>                (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq,
73
 
                                                         int (*compare) (const void *, const void *));
74
 
void                <a class="link" href="raptor-section-sequence.html#raptor-sequence-print-string">raptor_sequence_print_string</a>        (char *data,
75
 
                                                         FILE *fh);
76
 
void                <a class="link" href="raptor-section-sequence.html#raptor-sequence-print-uri">raptor_sequence_print_uri</a>           (char *data,
77
 
                                                         FILE *fh);
78
 
void                <a class="link" href="raptor-section-sequence.html#raptor-sequence-set-print-handler">raptor_sequence_set_print_handler</a>   (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq,
 
67
void                <a class="link" href="raptor-section-sequence.html#raptor-sequence-sort" title="raptor_sequence_sort ()">raptor_sequence_sort</a>                (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq,
 
68
                                                         int (compareconst void *, const void *) ());
 
69
void                <a class="link" href="raptor-section-sequence.html#raptor-sequence-print-string" title="raptor_sequence_print_string ()">raptor_sequence_print_string</a>        (char *data,
 
70
                                                         FILE *fh);
 
71
void                <a class="link" href="raptor-section-sequence.html#raptor-sequence-print-uri" title="raptor_sequence_print_uri ()">raptor_sequence_print_uri</a>           (char *data,
 
72
                                                         FILE *fh);
 
73
void                <a class="link" href="raptor-section-sequence.html#raptor-sequence-set-print-handler" title="raptor_sequence_set_print_handler ()">raptor_sequence_set_print_handler</a>   (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq,
79
74
                                                         raptor_sequence_print_handler *print_handler);
80
 
void                <a class="link" href="raptor-section-sequence.html#raptor-sequence-print">raptor_sequence_print</a>               (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq,
 
75
void                <a class="link" href="raptor-section-sequence.html#raptor-sequence-print" title="raptor_sequence_print ()">raptor_sequence_print</a>               (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq,
81
76
                                                         FILE *fh);
82
 
int                 <a class="link" href="raptor-section-sequence.html#raptor-sequence-join">raptor_sequence_join</a>                (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *dest,
83
 
                                                         <a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *src);
 
77
int                 <a class="link" href="raptor-section-sequence.html#raptor-sequence-join" title="raptor_sequence_join ()">raptor_sequence_join</a>                (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *dest,
 
78
                                                         <a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *src);
84
79
</pre>
85
80
</div>
86
81
<div class="refsect1" lang="en">
87
 
<a name="id2643534"></a><h2>Description</h2>
 
82
<a name="raptor-section-sequence.description"></a><h2>Description</h2>
88
83
<p>
89
84
A utility class that provides access to small sequence of items
90
85
that grow at the end and require quick ordered and indexed access.
93
88
</p>
94
89
</div>
95
90
<div class="refsect1" lang="en">
96
 
<a name="id2643553"></a><h2>Details</h2>
 
91
<a name="raptor-section-sequence.details"></a><h2>Details</h2>
97
92
<div class="refsect2" lang="en">
98
 
<a name="id2643564"></a><h3>
99
 
<a name="raptor-sequence"></a>raptor_sequence</h3>
100
 
<a class="indexterm" name="id2643577"></a><pre class="programlisting">raptor_sequence* raptor_sequence;
 
93
<a name="raptor-sequence"></a><h3>raptor_sequence</h3>
 
94
<pre class="programlisting">raptor_sequence* raptor_sequence;
101
95
</pre>
102
96
<p>
103
97
Raptor sequence class</p>
107
101
</div>
108
102
<hr>
109
103
<div class="refsect2" lang="en">
110
 
<a name="id2643596"></a><h3>
111
 
<a name="raptor-new-sequence"></a>raptor_new_sequence ()</h3>
112
 
<a class="indexterm" name="id2643608"></a><pre class="programlisting"><a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a>*    raptor_new_sequence                 (raptor_sequence_free_handler *free_handler,
 
104
<a name="raptor-new-sequence"></a><h3>raptor_new_sequence ()</h3>
 
105
<pre class="programlisting"><a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a>*    raptor_new_sequence                 (raptor_sequence_free_handler *free_handler,
113
106
                                                         raptor_sequence_print_handler *print_handler);</pre>
114
107
<p>
115
108
Constructor - create a new sequence with the given handlers.</p>
120
113
<col align="left" valign="top">
121
114
<tbody>
122
115
<tr>
123
 
<td><p><span class="term"><em class="parameter"><code>free_handler</code></em>&#160;:</span></p></td>
 
116
<td><p><span class="term"><em class="parameter"><code>free_handler</code></em> :</span></p></td>
124
117
<td> handler to free a sequence item
125
118
</td>
126
119
</tr>
127
120
<tr>
128
 
<td><p><span class="term"><em class="parameter"><code>print_handler</code></em>&#160;:</span></p></td>
 
121
<td><p><span class="term"><em class="parameter"><code>print_handler</code></em> :</span></p></td>
129
122
<td> handler to print a sequence item to a FILE*
130
123
</td>
131
124
</tr>
132
125
<tr>
133
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
134
 
<td> a new <a class="link" href="raptor-section-sequence.html#raptor-sequence"><span class="type">raptor_sequence</span></a> or NULL on failure 
 
126
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
127
<td> a new <a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence"><span class="type">raptor_sequence</span></a> or NULL on failure 
135
128
</td>
136
129
</tr>
137
130
</tbody>
139
132
</div>
140
133
<hr>
141
134
<div class="refsect2" lang="en">
142
 
<a name="id2643696"></a><h3>
143
 
<a name="raptor-free-sequence"></a>raptor_free_sequence ()</h3>
144
 
<a class="indexterm" name="id2643708"></a><pre class="programlisting">void                raptor_free_sequence                (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq);</pre>
 
135
<a name="raptor-free-sequence"></a><h3>raptor_free_sequence ()</h3>
 
136
<pre class="programlisting">void                raptor_free_sequence                (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq);</pre>
145
137
<p>
146
 
Destructor - free a <a class="link" href="raptor-section-sequence.html#raptor-sequence"><span class="type">raptor_sequence</span></a></p>
 
138
Destructor - free a <a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence"><span class="type">raptor_sequence</span></a></p>
147
139
<p>
148
140
 
149
141
</p>
150
142
<div class="variablelist"><table border="0">
151
143
<col align="left" valign="top">
152
144
<tbody><tr>
153
 
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
 
145
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
154
146
<td> sequence to destroy
155
147
</td>
156
148
</tr></tbody>
158
150
</div>
159
151
<hr>
160
152
<div class="refsect2" lang="en">
161
 
<a name="id2644106"></a><h3>
162
 
<a name="raptor-sequence-size"></a>raptor_sequence_size ()</h3>
163
 
<a class="indexterm" name="id2644117"></a><pre class="programlisting">int                 raptor_sequence_size                (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq);</pre>
 
153
<a name="raptor-sequence-size"></a><h3>raptor_sequence_size ()</h3>
 
154
<pre class="programlisting">int                 raptor_sequence_size                (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq);</pre>
164
155
<p>
165
156
Get the number of items in a sequence.</p>
166
157
<p>
170
161
<col align="left" valign="top">
171
162
<tbody>
172
163
<tr>
173
 
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
 
164
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
174
165
<td> sequence object
175
166
</td>
176
167
</tr>
177
168
<tr>
178
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 
169
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
179
170
<td> the sequence size (&gt;=0)
180
171
</td>
181
172
</tr>
184
175
</div>
185
176
<hr>
186
177
<div class="refsect2" lang="en">
187
 
<a name="id2644177"></a><h3>
188
 
<a name="raptor-sequence-set-at"></a>raptor_sequence_set_at ()</h3>
189
 
<a class="indexterm" name="id2644188"></a><pre class="programlisting">int                 raptor_sequence_set_at              (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq,
 
178
<a name="raptor-sequence-set-at"></a><h3>raptor_sequence_set_at ()</h3>
 
179
<pre class="programlisting">int                 raptor_sequence_set_at              (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq,
190
180
                                                         int idx,
191
181
                                                         void *data);</pre>
192
182
<p>
204
194
<col align="left" valign="top">
205
195
<tbody>
206
196
<tr>
207
 
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
 
197
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
208
198
<td> sequence object
209
199
</td>
210
200
</tr>
211
201
<tr>
212
 
<td><p><span class="term"><em class="parameter"><code>idx</code></em>&#160;:</span></p></td>
 
202
<td><p><span class="term"><em class="parameter"><code>idx</code></em> :</span></p></td>
213
203
<td> index into sequence to operate at
214
204
</td>
215
205
</tr>
216
206
<tr>
217
 
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
 
207
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
218
208
<td> new data item.
219
209
</td>
220
210
</tr>
221
211
<tr>
222
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 
212
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
223
213
<td> non-0 on failure
224
214
</td>
225
215
</tr>
228
218
</div>
229
219
<hr>
230
220
<div class="refsect2" lang="en">
231
 
<a name="id2644310"></a><h3>
232
 
<a name="raptor-sequence-push"></a>raptor_sequence_push ()</h3>
233
 
<a class="indexterm" name="id2644321"></a><pre class="programlisting">int                 raptor_sequence_push                (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq,
 
221
<a name="raptor-sequence-push"></a><h3>raptor_sequence_push ()</h3>
 
222
<pre class="programlisting">int                 raptor_sequence_push                (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq,
234
223
                                                         void *data);</pre>
235
224
<p>
236
225
Add an item to the end of the sequence.
237
226
</p>
238
227
<p>
239
 
This is efficient to perform. <a class="link" href="raptor-section-sequence.html#raptor-sequence"><span class="type">raptor_sequence</span></a> is optimised
240
 
to append/remove from the end of the sequence.
241
 
</p>
242
 
<p>
243
228
The sequence takes ownership of the pushed item and frees it with the
244
229
free_handler. On failure, the item is freed immediately.</p>
245
230
<p>
249
234
<col align="left" valign="top">
250
235
<tbody>
251
236
<tr>
252
 
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
 
237
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
253
238
<td> sequence to add to
254
239
</td>
255
240
</tr>
256
241
<tr>
257
 
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
 
242
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
258
243
<td> item to add
259
244
</td>
260
245
</tr>
261
246
<tr>
262
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 
247
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
263
248
<td> non-0 on failure
264
249
</td>
265
250
</tr>
268
253
</div>
269
254
<hr>
270
255
<div class="refsect2" lang="en">
271
 
<a name="id2644420"></a><h3>
272
 
<a name="raptor-sequence-shift"></a>raptor_sequence_shift ()</h3>
273
 
<a class="indexterm" name="id2644431"></a><pre class="programlisting">int                 raptor_sequence_shift               (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq,
 
256
<a name="raptor-sequence-shift"></a><h3>raptor_sequence_shift ()</h3>
 
257
<pre class="programlisting">int                 raptor_sequence_shift               (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq,
274
258
                                                         void *data);</pre>
275
259
<p>
276
260
Add an item to the start of the sequence.
277
261
</p>
278
262
<p>
279
 
This is in-efficient to perform.  <a class="link" href="raptor-section-sequence.html#raptor-sequence"><span class="type">raptor_sequence</span></a> is optimised
280
 
to append to the end of the sequence.
281
 
</p>
282
 
<p>
283
263
The sequence takes ownership of the shifted item and frees it with the
284
264
free_handler. On failure, the item is freed immediately.</p>
285
265
<p>
289
269
<col align="left" valign="top">
290
270
<tbody>
291
271
<tr>
292
 
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
 
272
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
293
273
<td> sequence to add to
294
274
</td>
295
275
</tr>
296
276
<tr>
297
 
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
 
277
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
298
278
<td> item to add
299
279
</td>
300
280
</tr>
301
281
<tr>
302
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 
282
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
303
283
<td> non-0 on failure
304
284
</td>
305
285
</tr>
308
288
</div>
309
289
<hr>
310
290
<div class="refsect2" lang="en">
311
 
<a name="id2644530"></a><h3>
312
 
<a name="raptor-sequence-get-at"></a>raptor_sequence_get_at ()</h3>
313
 
<a class="indexterm" name="id2644541"></a><pre class="programlisting">void*               raptor_sequence_get_at              (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq,
 
291
<a name="raptor-sequence-get-at"></a><h3>raptor_sequence_get_at ()</h3>
 
292
<pre class="programlisting">void*               raptor_sequence_get_at              (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq,
314
293
                                                         int idx);</pre>
315
294
<p>
316
295
Retrieve an item at offset <em class="parameter"><code>index</code></em> in the sequence.
317
296
</p>
318
297
<p>
319
 
This is efficient to perform. <a class="link" href="raptor-section-sequence.html#raptor-sequence"><span class="type">raptor_sequence</span></a> is optimised
 
298
This is efficient to perform. <a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence"><span class="type">raptor_sequence</span></a> is optimised
320
299
to append/remove from the end of the sequence.
321
300
</p>
322
301
<p>
328
307
<col align="left" valign="top">
329
308
<tbody>
330
309
<tr>
331
 
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
 
310
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
332
311
<td> sequence to use
333
312
</td>
334
313
</tr>
335
314
<tr>
336
 
<td><p><span class="term"><em class="parameter"><code>idx</code></em>&#160;:</span></p></td>
 
315
<td><p><span class="term"><em class="parameter"><code>idx</code></em> :</span></p></td>
337
316
<td> index of item to get
338
317
</td>
339
318
</tr>
340
319
<tr>
341
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 
320
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
342
321
<td> the object or NULL if <em class="parameter"><code>index</code></em> is out of range (0... sequence size-1)
343
322
</td>
344
323
</tr>
347
326
</div>
348
327
<hr>
349
328
<div class="refsect2" lang="en">
350
 
<a name="id2644650"></a><h3>
351
 
<a name="raptor-sequence-pop"></a>raptor_sequence_pop ()</h3>
352
 
<a class="indexterm" name="id2644662"></a><pre class="programlisting">void*               raptor_sequence_pop                 (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq);</pre>
 
329
<a name="raptor-sequence-pop"></a><h3>raptor_sequence_pop ()</h3>
 
330
<pre class="programlisting">void*               raptor_sequence_pop                 (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq);</pre>
353
331
<p>
354
332
Retrieve the item at the end of the sequence.
355
333
</p>
356
334
<p>
357
 
This is efficient to perform.
358
 
</p>
359
 
<p>
360
335
Ownership of the item is transferred to the caller,
361
336
i.e. caller is responsible of freeing the item.</p>
362
337
<p>
366
341
<col align="left" valign="top">
367
342
<tbody>
368
343
<tr>
369
 
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
 
344
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
370
345
<td> sequence to use
371
346
</td>
372
347
</tr>
373
348
<tr>
374
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 
349
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
375
350
<td> the object or NULL if the sequence is empty
376
351
</td>
377
352
</tr>
380
355
</div>
381
356
<hr>
382
357
<div class="refsect2" lang="en">
383
 
<a name="id2645875"></a><h3>
384
 
<a name="raptor-sequence-unshift"></a>raptor_sequence_unshift ()</h3>
385
 
<a class="indexterm" name="id2645886"></a><pre class="programlisting">void*               raptor_sequence_unshift             (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq);</pre>
 
358
<a name="raptor-sequence-unshift"></a><h3>raptor_sequence_unshift ()</h3>
 
359
<pre class="programlisting">void*               raptor_sequence_unshift             (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq);</pre>
386
360
<p>
387
361
Retrieve the item at the start of the sequence.
388
362
</p>
389
363
<p>
390
 
This is in-efficient to perform. <a class="link" href="raptor-section-sequence.html#raptor-sequence"><span class="type">raptor_sequence</span></a> is optimised
391
 
to append/remove from the end of the sequence.
392
 
</p>
393
 
<p>
394
364
Ownership of the item is transferred to the caller,
395
365
i.e. caller is responsible of freeing the item.</p>
396
366
<p>
400
370
<col align="left" valign="top">
401
371
<tbody>
402
372
<tr>
403
 
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
 
373
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
404
374
<td> sequence to use
405
375
</td>
406
376
</tr>
407
377
<tr>
408
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 
378
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
409
379
<td> the object or NULL if the sequence is empty
410
380
</td>
411
381
</tr>
414
384
</div>
415
385
<hr>
416
386
<div class="refsect2" lang="en">
417
 
<a name="id2645966"></a><h3>
418
 
<a name="raptor-compare-strings"></a>raptor_compare_strings ()</h3>
419
 
<a class="indexterm" name="id2645977"></a><pre class="programlisting">int                 raptor_compare_strings              (const void *a,
 
387
<a name="raptor-compare-strings"></a><h3>raptor_compare_strings ()</h3>
 
388
<pre class="programlisting">int                 raptor_compare_strings              (const void *a,
420
389
                                                         const void *b);</pre>
421
390
<p>
422
 
Utility function for <a class="link" href="raptor-section-sequence.html#raptor-sequence-sort"><code class="function">raptor_sequence_sort()</code></a> to compare a sequence of strings.</p>
 
391
Utility function for <a class="link" href="raptor-section-sequence.html#raptor-sequence-sort" title="raptor_sequence_sort ()"><code class="function">raptor_sequence_sort()</code></a> to compare a sequence of strings.</p>
423
392
<p>
424
393
 
425
394
</p>
427
396
<col align="left" valign="top">
428
397
<tbody>
429
398
<tr>
430
 
<td><p><span class="term"><em class="parameter"><code>a</code></em>&#160;:</span></p></td>
 
399
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
431
400
<td> pointer first string
432
401
</td>
433
402
</tr>
434
403
<tr>
435
 
<td><p><span class="term"><em class="parameter"><code>b</code></em>&#160;:</span></p></td>
 
404
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
436
405
<td> pointer to second string
437
406
</td>
438
407
</tr>
439
408
<tr>
440
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 
409
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
441
410
<td> comparison of <em class="parameter"><code>a</code></em> to <em class="parameter"><code>b</code></em> as strings
442
411
</td>
443
412
</tr>
446
415
</div>
447
416
<hr>
448
417
<div class="refsect2" lang="en">
449
 
<a name="id2646079"></a><h3>
450
 
<a name="raptor-sequence-sort"></a>raptor_sequence_sort ()</h3>
451
 
<a class="indexterm" name="id2646090"></a><pre class="programlisting">void                raptor_sequence_sort                (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq,
452
 
                                                         int (*compare) (const void *, const void *));</pre>
 
418
<a name="raptor-sequence-sort"></a><h3>raptor_sequence_sort ()</h3>
 
419
<pre class="programlisting">void                raptor_sequence_sort                (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq,
 
420
                                                         int (compareconst void *, const void *) ());</pre>
453
421
<p>
454
422
The comparison function is compatible with that used for <code class="function">qsort()</code>
455
423
and provides the addresses of pointers to the data that
461
429
<col align="left" valign="top">
462
430
<tbody>
463
431
<tr>
464
 
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
 
432
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
465
433
<td> sequence to sort
466
434
</td>
467
435
</tr>
468
436
<tr>
469
 
<td><p><span class="term"><em class="parameter"><code>compare</code></em>&#160;:</span></p></td>
 
437
<td><p><span class="term"><em class="parameter"><code>compare</code></em> :</span></p></td>
470
438
<td> comparison function
471
439
</td>
472
440
</tr>
475
443
</div>
476
444
<hr>
477
445
<div class="refsect2" lang="en">
478
 
<a name="id2646173"></a><h3>
479
 
<a name="raptor-sequence-print-string"></a>raptor_sequence_print_string ()</h3>
480
 
<a class="indexterm" name="id2646186"></a><pre class="programlisting">void                raptor_sequence_print_string        (char *data,
 
446
<a name="raptor-sequence-print-string"></a><h3>raptor_sequence_print_string ()</h3>
 
447
<pre class="programlisting">void                raptor_sequence_print_string        (char *data,
481
448
                                                         FILE *fh);</pre>
482
449
<p>
483
450
Helper function for printing a sequence of strings.
484
451
</p>
485
452
<p>
486
453
Intended for use as a <span class="type">raptor_sequence_print_handler</span> passed into
487
 
<a class="link" href="raptor-section-sequence.html#raptor-new-sequence"><code class="function">raptor_new_sequence()</code></a>.</p>
 
454
<a class="link" href="raptor-section-sequence.html#raptor-new-sequence" title="raptor_new_sequence ()"><code class="function">raptor_new_sequence()</code></a>.</p>
488
455
<p>
489
456
 
490
457
</p>
492
459
<col align="left" valign="top">
493
460
<tbody>
494
461
<tr>
495
 
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
 
462
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
496
463
<td> data item (a char*)
497
464
</td>
498
465
</tr>
499
466
<tr>
500
 
<td><p><span class="term"><em class="parameter"><code>fh</code></em>&#160;:</span></p></td>
 
467
<td><p><span class="term"><em class="parameter"><code>fh</code></em> :</span></p></td>
501
468
<td> file handle to print to
502
469
</td>
503
470
</tr>
506
473
</div>
507
474
<hr>
508
475
<div class="refsect2" lang="en">
509
 
<a name="id2646278"></a><h3>
510
 
<a name="raptor-sequence-print-uri"></a>raptor_sequence_print_uri ()</h3>
511
 
<a class="indexterm" name="id2646290"></a><pre class="programlisting">void                raptor_sequence_print_uri           (char *data,
 
476
<a name="raptor-sequence-print-uri"></a><h3>raptor_sequence_print_uri ()</h3>
 
477
<pre class="programlisting">void                raptor_sequence_print_uri           (char *data,
512
478
                                                         FILE *fh);</pre>
513
479
<p>
514
480
Helper function for printing a sequence of URIs.
515
481
</p>
516
482
<p>
517
483
Intended for use as a <span class="type">raptor_sequence_print_handler</span> passed into
518
 
<a class="link" href="raptor-section-sequence.html#raptor-new-sequence"><code class="function">raptor_new_sequence()</code></a>.</p>
 
484
<a class="link" href="raptor-section-sequence.html#raptor-new-sequence" title="raptor_new_sequence ()"><code class="function">raptor_new_sequence()</code></a>.</p>
519
485
<p>
520
486
 
521
487
</p>
523
489
<col align="left" valign="top">
524
490
<tbody>
525
491
<tr>
526
 
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
527
 
<td> data item (a <a class="link" href="raptor-section-uri.html#raptor-uri"><span class="type">raptor_uri</span></a>)
 
492
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
 
493
<td> data item (a <a class="link" href="raptor-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a>)
528
494
</td>
529
495
</tr>
530
496
<tr>
531
 
<td><p><span class="term"><em class="parameter"><code>fh</code></em>&#160;:</span></p></td>
 
497
<td><p><span class="term"><em class="parameter"><code>fh</code></em> :</span></p></td>
532
498
<td> file handle to print to
533
499
</td>
534
500
</tr>
537
503
</div>
538
504
<hr>
539
505
<div class="refsect2" lang="en">
540
 
<a name="id2646389"></a><h3>
541
 
<a name="raptor-sequence-set-print-handler"></a>raptor_sequence_set_print_handler ()</h3>
542
 
<a class="indexterm" name="id2646403"></a><pre class="programlisting">void                raptor_sequence_set_print_handler   (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq,
 
506
<a name="raptor-sequence-set-print-handler"></a><h3>raptor_sequence_set_print_handler ()</h3>
 
507
<pre class="programlisting">void                raptor_sequence_set_print_handler   (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq,
543
508
                                                         raptor_sequence_print_handler *print_handler);</pre>
544
509
<p>
545
510
Set the print handler for the sequence.
546
511
</p>
547
512
<p>
548
 
This is set in the <a class="link" href="raptor-section-sequence.html#raptor-new-sequence"><code class="function">raptor_new_sequence()</code></a> constructor and can be
 
513
This is set in the <a class="link" href="raptor-section-sequence.html#raptor-new-sequence" title="raptor_new_sequence ()"><code class="function">raptor_new_sequence()</code></a> constructor and can be
549
514
overridden here.</p>
550
515
<p>
551
516
 
554
519
<col align="left" valign="top">
555
520
<tbody>
556
521
<tr>
557
 
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
 
522
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
558
523
<td> sequence
559
524
</td>
560
525
</tr>
561
526
<tr>
562
 
<td><p><span class="term"><em class="parameter"><code>print_handler</code></em>&#160;:</span></p></td>
 
527
<td><p><span class="term"><em class="parameter"><code>print_handler</code></em> :</span></p></td>
563
528
<td> print handler
564
529
</td>
565
530
</tr>
568
533
</div>
569
534
<hr>
570
535
<div class="refsect2" lang="en">
571
 
<a name="id2646489"></a><h3>
572
 
<a name="raptor-sequence-print"></a>raptor_sequence_print ()</h3>
573
 
<a class="indexterm" name="id2646500"></a><pre class="programlisting">void                raptor_sequence_print               (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *seq,
 
536
<a name="raptor-sequence-print"></a><h3>raptor_sequence_print ()</h3>
 
537
<pre class="programlisting">void                raptor_sequence_print               (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *seq,
574
538
                                                         FILE *fh);</pre>
575
539
<p>
576
540
Print the sequence contents using the print_handler to print the data items.</p>
581
545
<col align="left" valign="top">
582
546
<tbody>
583
547
<tr>
584
 
<td><p><span class="term"><em class="parameter"><code>seq</code></em>&#160;:</span></p></td>
 
548
<td><p><span class="term"><em class="parameter"><code>seq</code></em> :</span></p></td>
585
549
<td> sequence to sort
586
550
</td>
587
551
</tr>
588
552
<tr>
589
 
<td><p><span class="term"><em class="parameter"><code>fh</code></em>&#160;:</span></p></td>
 
553
<td><p><span class="term"><em class="parameter"><code>fh</code></em> :</span></p></td>
590
554
<td> file handle
591
555
</td>
592
556
</tr>
595
559
</div>
596
560
<hr>
597
561
<div class="refsect2" lang="en">
598
 
<a name="id2646572"></a><h3>
599
 
<a name="raptor-sequence-join"></a>raptor_sequence_join ()</h3>
600
 
<a class="indexterm" name="id2646584"></a><pre class="programlisting">int                 raptor_sequence_join                (<a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *dest,
601
 
                                                         <a class="link" href="raptor-section-sequence.html#raptor-sequence">raptor_sequence</a> *src);</pre>
 
562
<a name="raptor-sequence-join"></a><h3>raptor_sequence_join ()</h3>
 
563
<pre class="programlisting">int                 raptor_sequence_join                (<a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *dest,
 
564
                                                         <a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence">raptor_sequence</a> *src);</pre>
602
565
<p>
603
566
Join two sequences moving all items from one sequence to the end of another.
604
567
</p>
612
575
<col align="left" valign="top">
613
576
<tbody>
614
577
<tr>
615
 
<td><p><span class="term"><em class="parameter"><code>dest</code></em>&#160;:</span></p></td>
616
 
<td> <a class="link" href="raptor-section-sequence.html#raptor-sequence"><span class="type">raptor_sequence</span></a> destination sequence
617
 
</td>
618
 
</tr>
619
 
<tr>
620
 
<td><p><span class="term"><em class="parameter"><code>src</code></em>&#160;:</span></p></td>
621
 
<td> <a class="link" href="raptor-section-sequence.html#raptor-sequence"><span class="type">raptor_sequence</span></a> source sequence
622
 
</td>
623
 
</tr>
624
 
<tr>
625
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
 
578
<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
 
579
<td> <a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence"><span class="type">raptor_sequence</span></a> destination sequence
 
580
</td>
 
581
</tr>
 
582
<tr>
 
583
<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
 
584
<td> <a class="link" href="raptor-section-sequence.html#raptor-sequence" title="raptor_sequence"><span class="type">raptor_sequence</span></a> source sequence
 
585
</td>
 
586
</tr>
 
587
<tr>
 
588
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
626
589
<td> non-0 on failure
627
590
</td>
628
591
</tr>
631
594
</div>
632
595
</div>
633
596
</div>
 
597
<div class="footer">
 
598
<hr>
 
599
          Generated by GTK-Doc V1.10</div>
634
600
</body>
635
601
</html>