File: classGlib_1_1Bytes.html

package info (click to toggle)
glibmm2.4 2.42.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 53,308 kB
  • ctags: 14,868
  • sloc: xml: 108,462; cpp: 15,282; sh: 11,421; perl: 5,139; python: 1,626; makefile: 304
file content (537 lines) | stat: -rw-r--r-- 30,973 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>glibmm: Glib::Bytes Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">glibmm
   &#160;<span id="projectnumber">2.42.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.7 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceGlib.html">Glib</a></li><li class="navelem"><a class="el" href="classGlib_1_1Bytes.html">Bytes</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#related">Related Functions</a> &#124;
<a href="classGlib_1_1Bytes-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Glib::Bytes Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A simple refcounted data type representing an immutable byte sequence from an unspecified origin.  
 <a href="classGlib_1_1Bytes.html#details">More...</a></p>

<p><code>#include &lt;glibmm/bytes.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a3ebab3535510aec1ac5a230a54f490df"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#a3ebab3535510aec1ac5a230a54f490df">reference</a> () const </td></tr>
<tr class="memdesc:a3ebab3535510aec1ac5a230a54f490df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Increment the reference count for this object.  <a href="#a3ebab3535510aec1ac5a230a54f490df">More...</a><br /></td></tr>
<tr class="separator:a3ebab3535510aec1ac5a230a54f490df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26320cfa1354e83af8186fd62974a180"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#a26320cfa1354e83af8186fd62974a180">unreference</a> () const </td></tr>
<tr class="memdesc:a26320cfa1354e83af8186fd62974a180"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decrement the reference count for this object.  <a href="#a26320cfa1354e83af8186fd62974a180">More...</a><br /></td></tr>
<tr class="separator:a26320cfa1354e83af8186fd62974a180"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab7dbd47921abcdd9f9f1a336399842c"><td class="memItemLeft" align="right" valign="top">GBytes*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#aab7dbd47921abcdd9f9f1a336399842c">gobj</a> ()</td></tr>
<tr class="memdesc:aab7dbd47921abcdd9f9f1a336399842c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides access to the underlying C instance.  <a href="#aab7dbd47921abcdd9f9f1a336399842c">More...</a><br /></td></tr>
<tr class="separator:aab7dbd47921abcdd9f9f1a336399842c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9e557b5ef18ad79a0acf07962f0288a"><td class="memItemLeft" align="right" valign="top">const GBytes*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#aa9e557b5ef18ad79a0acf07962f0288a">gobj</a> () const </td></tr>
<tr class="memdesc:aa9e557b5ef18ad79a0acf07962f0288a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides access to the underlying C instance.  <a href="#aa9e557b5ef18ad79a0acf07962f0288a">More...</a><br /></td></tr>
<tr class="separator:aa9e557b5ef18ad79a0acf07962f0288a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad482796c48f6f8d35ae6a1aa52ec599e"><td class="memItemLeft" align="right" valign="top">GBytes*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#ad482796c48f6f8d35ae6a1aa52ec599e">gobj_copy</a> () const </td></tr>
<tr class="memdesc:ad482796c48f6f8d35ae6a1aa52ec599e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.  <a href="#ad482796c48f6f8d35ae6a1aa52ec599e">More...</a><br /></td></tr>
<tr class="separator:ad482796c48f6f8d35ae6a1aa52ec599e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9c2f945fbafbb8567ced7b294025619"><td class="memItemLeft" align="right" valign="top">gconstpointer&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#ad9c2f945fbafbb8567ced7b294025619">get_data</a> (gsize&amp;<a class="elRef" doxygen="/opt/gnome/share/mm-common/doctags/libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01656.html#ga445a43f417432dd1b9aed90ef239c700">size</a>) const </td></tr>
<tr class="memdesc:ad9c2f945fbafbb8567ced7b294025619"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the byte data in the <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a>.  <a href="#ad9c2f945fbafbb8567ced7b294025619">More...</a><br /></td></tr>
<tr class="separator:ad9c2f945fbafbb8567ced7b294025619"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97304d598018da3ed8c5c90411fe9ba0"><td class="memItemLeft" align="right" valign="top">gsize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#a97304d598018da3ed8c5c90411fe9ba0">get_size</a> () const </td></tr>
<tr class="memdesc:a97304d598018da3ed8c5c90411fe9ba0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the size of the byte data in the <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a>.  <a href="#a97304d598018da3ed8c5c90411fe9ba0">More...</a><br /></td></tr>
<tr class="separator:a97304d598018da3ed8c5c90411fe9ba0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a8c8f1062871f4ff87a9514ef74308f07"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>&lt; <a class="el" href="classGlib_1_1Bytes.html">Glib::Bytes</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#a8c8f1062871f4ff87a9514ef74308f07">create</a> (gconstpointer data, gsize <a class="elRef" doxygen="/opt/gnome/share/mm-common/doctags/libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01656.html#ga445a43f417432dd1b9aed90ef239c700">size</a>)</td></tr>
<tr class="separator:a8c8f1062871f4ff87a9514ef74308f07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06410137748117467146b3c4d4d77c7c"><td class="memItemLeft" align="right" valign="top">static guint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#a06410137748117467146b3c4d4d77c7c">hash</a> (gconstpointer bytes)</td></tr>
<tr class="memdesc:a06410137748117467146b3c4d4d77c7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an integer hash code for the byte data in the <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a>.  <a href="#a06410137748117467146b3c4d4d77c7c">More...</a><br /></td></tr>
<tr class="separator:a06410137748117467146b3c4d4d77c7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6296b93981e010525d71c8b3f126ce65"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#a6296b93981e010525d71c8b3f126ce65">equal</a> (gconstpointer bytes1, gconstpointer bytes2)</td></tr>
<tr class="memdesc:a6296b93981e010525d71c8b3f126ce65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares the two <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a> values being pointed to and returns <code>true</code> if they are equal.  <a href="#a6296b93981e010525d71c8b3f126ce65">More...</a><br /></td></tr>
<tr class="separator:a6296b93981e010525d71c8b3f126ce65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ea3d054c219ccde859316204b19426b"><td class="memItemLeft" align="right" valign="top">static gint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#a2ea3d054c219ccde859316204b19426b">compare</a> (gconstpointer bytes1, gconstpointer bytes2)</td></tr>
<tr class="memdesc:a2ea3d054c219ccde859316204b19426b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares the two <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a> values.  <a href="#a2ea3d054c219ccde859316204b19426b">More...</a><br /></td></tr>
<tr class="separator:a2ea3d054c219ccde859316204b19426b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a19d12080f9b42a4d89d253680c5a0fcd"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#a19d12080f9b42a4d89d253680c5a0fcd">Bytes</a> ()</td></tr>
<tr class="separator:a19d12080f9b42a4d89d253680c5a0fcd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bce73ee3c5a2a9551587a8cf49d2c05"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#a4bce73ee3c5a2a9551587a8cf49d2c05">operator delete</a> (void*, std::size_t)</td></tr>
<tr class="separator:a4bce73ee3c5a2a9551587a8cf49d2c05"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="related"></a>
Related Functions</h2></td></tr>
<tr><td class="ititle" colspan="2"><p>(Note that these are not member functions.) </p>
</td></tr>
<tr class="memitem:a0de22eb5d159db98e1d035bc58a14cd9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>&lt; <a class="el" href="classGlib_1_1Bytes.html">Glib::Bytes</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#a0de22eb5d159db98e1d035bc58a14cd9">wrap</a> (GBytes* object, bool take_copy=false)</td></tr>
<tr class="memdesc:a0de22eb5d159db98e1d035bc58a14cd9"><td class="mdescLeft">&#160;</td><td class="mdescRight">A <a class="el" href="namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object.  <a href="#a0de22eb5d159db98e1d035bc58a14cd9">More...</a><br /></td></tr>
<tr class="separator:a0de22eb5d159db98e1d035bc58a14cd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A simple refcounted data type representing an immutable byte sequence from an unspecified origin. </p>
<p>The purpose of the <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a> class is to keep the memory region that it holds alive for as long as anyone holds a reference to the bytes. When the last reference count is dropped, the memory is released. Multiple unrelated callers can use byte data in the <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a> object without coordinating their activities, resting assured that the byte data will not change or move while they hold a reference.</p>
<p>A <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a> object can come from many different origins that may have different procedures for freeing the memory region. Examples are memory from g_malloc(), from memory slices, from a GMappedFile or memory from other allocators.</p>
<dl class="since_2_34"><dt><b><a class="el" href="since_2_34.html#_since_2_34000001">Since glibmm 2.34:</a></b></dt><dd></dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a19d12080f9b42a4d89d253680c5a0fcd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Glib::Bytes::Bytes </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a2ea3d054c219ccde859316204b19426b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static gint Glib::Bytes::compare </td>
          <td>(</td>
          <td class="paramtype">gconstpointer&#160;</td>
          <td class="paramname"><em>bytes1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gconstpointer&#160;</td>
          <td class="paramname"><em>bytes2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compares the two <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a> values. </p>
<p>This function can be used to sort GBytes instances in lexographical order.</p>
<dl class="since_2_32"><dt><b><a class="el" href="since_2_32.html#_since_2_32000005">Since glibmm 2.32:</a></b></dt><dd></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bytes1</td><td>A pointer to a <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a>. </td></tr>
    <tr><td class="paramname">bytes2</td><td>A pointer to a <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a> to compare with <em>bytes1</em>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A negative value if bytes2 is lesser, a positive value if bytes2 is greater, and zero if bytes2 is equal to bytes1. </dd></dl>

</div>
</div>
<a class="anchor" id="a8c8f1062871f4ff87a9514ef74308f07"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>&lt;<a class="el" href="classGlib_1_1Bytes.html">Glib::Bytes</a>&gt; Glib::Bytes::create </td>
          <td>(</td>
          <td class="paramtype">gconstpointer&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gsize&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a6296b93981e010525d71c8b3f126ce65"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool Glib::Bytes::equal </td>
          <td>(</td>
          <td class="paramtype">gconstpointer&#160;</td>
          <td class="paramname"><em>bytes1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gconstpointer&#160;</td>
          <td class="paramname"><em>bytes2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compares the two <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a> values being pointed to and returns <code>true</code> if they are equal. </p>
<p>This function can be passed to g_hash_table_new() as the <em>key_equal_func</em> parameter, when using non-<code>0</code> <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a> pointers as keys in a HashTable.</p>
<dl class="since_2_32"><dt><b><a class="el" href="since_2_32.html#_since_2_32000004">Since glibmm 2.32:</a></b></dt><dd></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bytes1</td><td>A pointer to a <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a>. </td></tr>
    <tr><td class="paramname">bytes2</td><td>A pointer to a <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a> to compare with <em>bytes1</em>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the two keys match. </dd></dl>

</div>
</div>
<a class="anchor" id="ad9c2f945fbafbb8567ced7b294025619"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gconstpointer Glib::Bytes::get_data </td>
          <td>(</td>
          <td class="paramtype">gsize &amp;&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the byte data in the <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a>. </p>
<p>This data should not be modified.</p>
<p>This function will always return the same pointer for a given <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a>.</p>
<p><code>0</code> may be returned if <em>size</em> is 0. This is not guaranteed, as the <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a> may represent an empty string with <em>data</em> non-<code>0</code> and <em>size</em> as 0. <code>0</code> will not be returned if <em>size</em> is non-zero.</p>
<dl class="since_2_32"><dt><b><a class="el" href="since_2_32.html#_since_2_32000001">Since glibmm 2.32:</a></b></dt><dd></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">size</td><td>Location to return size of byte data. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the byte data, or <code>0</code>. </dd></dl>

</div>
</div>
<a class="anchor" id="a97304d598018da3ed8c5c90411fe9ba0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gsize Glib::Bytes::get_size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the size of the byte data in the <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a>. </p>
<p>This function will always return the same value for a given <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a>.</p>
<dl class="since_2_32"><dt><b><a class="el" href="since_2_32.html#_since_2_32000002">Since glibmm 2.32:</a></b></dt><dd></dd></dl>
<dl class="section return"><dt>Returns</dt><dd>The size. </dd></dl>

</div>
</div>
<a class="anchor" id="aab7dbd47921abcdd9f9f1a336399842c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GBytes* Glib::Bytes::gobj </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Provides access to the underlying C instance. </p>

</div>
</div>
<a class="anchor" id="aa9e557b5ef18ad79a0acf07962f0288a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const GBytes* Glib::Bytes::gobj </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Provides access to the underlying C instance. </p>

</div>
</div>
<a class="anchor" id="ad482796c48f6f8d35ae6a1aa52ec599e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GBytes* Glib::Bytes::gobj_copy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. </p>

</div>
</div>
<a class="anchor" id="a06410137748117467146b3c4d4d77c7c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static guint Glib::Bytes::hash </td>
          <td>(</td>
          <td class="paramtype">gconstpointer&#160;</td>
          <td class="paramname"><em>bytes</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates an integer hash code for the byte data in the <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a>. </p>
<p>This function can be passed to g_hash_table_new() as the <em>key_hash_func</em> parameter, when using non-<code>0</code> <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a> pointers as keys in a HashTable.</p>
<dl class="since_2_32"><dt><b><a class="el" href="since_2_32.html#_since_2_32000003">Since glibmm 2.32:</a></b></dt><dd></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bytes</td><td>A pointer to a <a class="el" href="classGlib_1_1Bytes.html" title="A simple refcounted data type representing an immutable byte sequence from an unspecified origin...">Bytes</a> key. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A hash value corresponding to the key. </dd></dl>

</div>
</div>
<a class="anchor" id="a4bce73ee3c5a2a9551587a8cf49d2c05"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Glib::Bytes::operator delete </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a3ebab3535510aec1ac5a230a54f490df"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Glib::Bytes::reference </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Increment the reference count for this object. </p>
<p>You should never need to do this manually - use the object via a <a class="el" href="classGlib_1_1RefPtr.html" title="RefPtr<> is a reference-counting shared smartpointer. ">RefPtr</a> instead. </p>

</div>
</div>
<a class="anchor" id="a26320cfa1354e83af8186fd62974a180"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Glib::Bytes::unreference </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Decrement the reference count for this object. </p>
<p>You should never need to do this manually - use the object via a <a class="el" href="classGlib_1_1RefPtr.html" title="RefPtr<> is a reference-counting shared smartpointer. ">RefPtr</a> instead. </p>

</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a class="anchor" id="a0de22eb5d159db98e1d035bc58a14cd9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>&lt; <a class="el" href="classGlib_1_1Bytes.html">Glib::Bytes</a> &gt; wrap </td>
          <td>(</td>
          <td class="paramtype">GBytes *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>take_copy</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>A <a class="el" href="namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">object</td><td>The C instance. </td></tr>
    <tr><td class="paramname">take_copy</td><td>False if the result should take ownership of the C instance. True if it should take a new copy or ref. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A C++ instance that wraps this C instance. </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Sep 22 2014 21:38:33 for glibmm by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.7
</small></address>
</body>
</html>