~ubuntu-branches/debian/jessie/glib2.0/jessie

« back to all changes in this revision

Viewing changes to docs/reference/glib/html/glib-Quarks.html

Tags: upstream-2.16.1
Import upstream version 2.16.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
<th width="100%" align="center">GLib Reference Manual</th>
37
37
<td><a accesskey="n" href="glib-Keyed-Data-Lists.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
38
38
</tr>
39
 
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3227679" class="shortcut">Top</a>
 
39
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3350788" class="shortcut">Top</a>
40
40
                  &#160;|&#160;
41
 
                  <a href="#id3227835" class="shortcut">Description</a></nobr></td></tr>
 
41
                  <a href="#id3350944" class="shortcut">Description</a></nobr></td></tr>
42
42
</table>
43
43
<div class="refentry" lang="en">
44
44
<a name="glib-Quarks"></a><div class="titlepage"></div>
45
45
<div class="refnamediv"><table width="100%"><tr>
46
46
<td valign="top">
47
47
<h2>
48
 
<a name="id3227679"></a><span class="refentrytitle">Quarks</span>
 
48
<a name="id3350788"></a><span class="refentrytitle">Quarks</span>
49
49
</h2>
50
50
<p>Quarks &#8212; a 2-way association between a string and a unique integer identifier</p>
51
51
</td>
68
68
</pre>
69
69
</div>
70
70
<div class="refsect1" lang="en">
71
 
<a name="id3227835"></a><h2>Description</h2>
 
71
<a name="id3350944"></a><h2>Description</h2>
72
72
<p>
73
73
Quarks are associations between strings and integer identifiers.
74
74
Given either the string or the <a class="link" href="glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> identifier it is possible to
98
98
</p>
99
99
</div>
100
100
<div class="refsect1" lang="en">
101
 
<a name="id3227992"></a><h2>Details</h2>
 
101
<a name="id3351101"></a><h2>Details</h2>
102
102
<div class="refsect2" lang="en">
103
 
<a name="id3228002"></a><h3>
 
103
<a name="id3351111"></a><h3>
104
104
<a name="GQuark"></a>GQuark</h3>
105
 
<a class="indexterm" name="id3228014"></a><pre class="programlisting">typedef guint32 GQuark;
 
105
<a class="indexterm" name="id3351123"></a><pre class="programlisting">typedef guint32 GQuark;
106
106
</pre>
107
107
<p>
108
108
A GQuark is a non-zero integer which uniquely identifies a particular string.
111
111
</div>
112
112
<hr>
113
113
<div class="refsect2" lang="en">
114
 
<a name="id3228041"></a><h3>
 
114
<a name="id3351150"></a><h3>
115
115
<a name="g-quark-from-string"></a>g_quark_from_string ()</h3>
116
 
<a class="indexterm" name="id3228054"></a><pre class="programlisting"><a class="link" href="glib-Quarks.html#GQuark">GQuark</a>              g_quark_from_string                 (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);</pre>
 
116
<a class="indexterm" name="id3351163"></a><pre class="programlisting"><a class="link" href="glib-Quarks.html#GQuark">GQuark</a>              g_quark_from_string                 (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);</pre>
117
117
<p>
118
118
Gets the <a class="link" href="glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> identifying the given string.
119
119
If the string does not currently have an associated <a class="link" href="glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>, a new
139
139
</div>
140
140
<hr>
141
141
<div class="refsect2" lang="en">
142
 
<a name="id3228161"></a><h3>
 
142
<a name="id3351270"></a><h3>
143
143
<a name="g-quark-from-static-string"></a>g_quark_from_static_string ()</h3>
144
 
<a class="indexterm" name="id3228175"></a><pre class="programlisting"><a class="link" href="glib-Quarks.html#GQuark">GQuark</a>              g_quark_from_static_string          (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);</pre>
 
144
<a class="indexterm" name="id3351284"></a><pre class="programlisting"><a class="link" href="glib-Quarks.html#GQuark">GQuark</a>              g_quark_from_static_string          (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);</pre>
145
145
<p>
146
146
Gets the <a class="link" href="glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> identifying the given (static) string.
147
147
If the string does not currently have an associated <a class="link" href="glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>, a new
177
177
</div>
178
178
<hr>
179
179
<div class="refsect2" lang="en">
180
 
<a name="id3228315"></a><h3>
 
180
<a name="id3351424"></a><h3>
181
181
<a name="g-quark-to-string"></a>g_quark_to_string ()</h3>
182
 
<a class="indexterm" name="id3228328"></a><pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*        g_quark_to_string                   (<a class="link" href="glib-Quarks.html#GQuark">GQuark</a> quark);</pre>
 
182
<a class="indexterm" name="id3351437"></a><pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*        g_quark_to_string                   (<a class="link" href="glib-Quarks.html#GQuark">GQuark</a> quark);</pre>
183
183
<p>
184
184
Gets the string associated with the given <a class="link" href="glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>.
185
185
</p>
203
203
</div>
204
204
<hr>
205
205
<div class="refsect2" lang="en">
206
 
<a name="id3228410"></a><h3>
 
206
<a name="id3351519"></a><h3>
207
207
<a name="g-quark-try-string"></a>g_quark_try_string ()</h3>
208
 
<a class="indexterm" name="id3228423"></a><pre class="programlisting"><a class="link" href="glib-Quarks.html#GQuark">GQuark</a>              g_quark_try_string                  (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);</pre>
 
208
<a class="indexterm" name="id3351532"></a><pre class="programlisting"><a class="link" href="glib-Quarks.html#GQuark">GQuark</a>              g_quark_try_string                  (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);</pre>
209
209
<p>
210
210
Gets the <a class="link" href="glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> associated with the given string, or 0 if string is
211
211
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> or it has no associated <a class="link" href="glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>.
235
235
</div>
236
236
<hr>
237
237
<div class="refsect2" lang="en">
238
 
<a name="id3228566"></a><h3>
 
238
<a name="id3351675"></a><h3>
239
239
<a name="g-intern-string"></a>g_intern_string ()</h3>
240
 
<a class="indexterm" name="id3228582"></a><pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*        g_intern_string                     (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);</pre>
 
240
<a class="indexterm" name="id3351690"></a><pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*        g_intern_string                     (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);</pre>
241
241
<p>
242
242
Returns a canonical representation for <em class="parameter"><code>string</code></em>. Interned strings can
243
243
be compared for equality by comparing the pointers, instead of using <code class="function">strcmp()</code>.</p>
265
265
</div>
266
266
<hr>
267
267
<div class="refsect2" lang="en">
268
 
<a name="id3228669"></a><h3>
 
268
<a name="id3351778"></a><h3>
269
269
<a name="g-intern-static-string"></a>g_intern_static_string ()</h3>
270
 
<a class="indexterm" name="id3228684"></a><pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*        g_intern_static_string              (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);</pre>
 
270
<a class="indexterm" name="id3351793"></a><pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*        g_intern_static_string              (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);</pre>
271
271
<p>
272
272
Returns a canonical representation for <em class="parameter"><code>string</code></em>. Interned strings can
273
273
be compared for equality by comparing the pointers, instead of using <code class="function">strcmp()</code>.
297
297
</div>
298
298
</div>
299
299
<div class="refsect1" lang="en">
300
 
<a name="id3228791"></a><div class="refsect2" lang="en"><a name="id3228792"></a></div>
 
300
<a name="id3351900"></a><div class="refsect2" lang="en"><a name="id3351901"></a></div>
301
301
<hr>
302
 
<div class="refsect2" lang="en"><a name="id3228793"></a></div>
 
302
<div class="refsect2" lang="en"><a name="id3351902"></a></div>
303
303
</div>
304
304
</div>
305
305
</body>