<!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.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<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" />
<link href="doxygen-extra.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 id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">glibmm
 <span id="projectnumber">2.56.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></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> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="#pro-methods">Protected Member Functions</a> |
<a href="#related">Related Functions</a> |
<a href="classGlib_1_1Bytes-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Glib::Bytes Class Reference<span class="mlabels"><span class="mlabel">final</span></span></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 <glibmm/bytes.h></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:ae8658a8c6fdfef04a65f5596a7081fc3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#ae8658a8c6fdfef04a65f5596a7081fc3">reference</a> () const</td></tr>
<tr class="memdesc:ae8658a8c6fdfef04a65f5596a7081fc3"><td class="mdescLeft"> </td><td class="mdescRight">Increment the reference count for this object. <a href="#ae8658a8c6fdfef04a65f5596a7081fc3">More...</a><br /></td></tr>
<tr class="separator:ae8658a8c6fdfef04a65f5596a7081fc3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a03a0ff151d53dab28d041459b545c69e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#a03a0ff151d53dab28d041459b545c69e">unreference</a> () const</td></tr>
<tr class="memdesc:a03a0ff151d53dab28d041459b545c69e"><td class="mdescLeft"> </td><td class="mdescRight">Decrement the reference count for this object. <a href="#a03a0ff151d53dab28d041459b545c69e">More...</a><br /></td></tr>
<tr class="separator:a03a0ff151d53dab28d041459b545c69e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aab7dbd47921abcdd9f9f1a336399842c"><td class="memItemLeft" align="right" valign="top">GBytes* </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"> </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"> </td></tr>
<tr class="memitem:a09a78c95b6a36686612aef51abfc6fc1"><td class="memItemLeft" align="right" valign="top">const GBytes* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#a09a78c95b6a36686612aef51abfc6fc1">gobj</a> () const</td></tr>
<tr class="memdesc:a09a78c95b6a36686612aef51abfc6fc1"><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C instance. <a href="#a09a78c95b6a36686612aef51abfc6fc1">More...</a><br /></td></tr>
<tr class="separator:a09a78c95b6a36686612aef51abfc6fc1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3e9a0ed3abb425587132bdb1c8157b1d"><td class="memItemLeft" align="right" valign="top">GBytes* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#a3e9a0ed3abb425587132bdb1c8157b1d">gobj_copy</a> () const</td></tr>
<tr class="memdesc:a3e9a0ed3abb425587132bdb1c8157b1d"><td class="mdescLeft"> </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="#a3e9a0ed3abb425587132bdb1c8157b1d">More...</a><br /></td></tr>
<tr class="separator:a3e9a0ed3abb425587132bdb1c8157b1d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3bd0089700df92f23b1c4bc91ace8bcf"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#a3bd0089700df92f23b1c4bc91ace8bcf">Bytes</a> ()=delete</td></tr>
<tr class="separator:a3bd0089700df92f23b1c4bc91ace8bcf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adc8fc824354b3b0e7199acd953f23abe"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#adc8fc824354b3b0e7199acd953f23abe">Bytes</a> (const <a class="el" href="classGlib_1_1Bytes.html">Bytes</a>&)=delete</td></tr>
<tr class="separator:adc8fc824354b3b0e7199acd953f23abe"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adef04ea17dded7a2f3cb808e7608e055"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1Bytes.html">Bytes</a>& </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#adef04ea17dded7a2f3cb808e7608e055">operator=</a> (const <a class="el" href="classGlib_1_1Bytes.html">Bytes</a>&)=delete</td></tr>
<tr class="separator:adef04ea17dded7a2f3cb808e7608e055"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a06108e8419f87c8413f052f0f5fd9754"><td class="memItemLeft" align="right" valign="top">gconstpointer </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#a06108e8419f87c8413f052f0f5fd9754">get_data</a> (gsize&<a class="elRef" doxygen="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:a06108e8419f87c8413f052f0f5fd9754"><td class="mdescLeft"> </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="#a06108e8419f87c8413f052f0f5fd9754">More...</a><br /></td></tr>
<tr class="separator:a06108e8419f87c8413f052f0f5fd9754"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad3ca4929eb6fe7c13b8b676c77a82223"><td class="memItemLeft" align="right" valign="top">gsize </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#ad3ca4929eb6fe7c13b8b676c77a82223">get_size</a> () const</td></tr>
<tr class="memdesc:ad3ca4929eb6fe7c13b8b676c77a82223"><td class="mdescLeft"> </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="#ad3ca4929eb6fe7c13b8b676c77a82223">More...</a><br /></td></tr>
<tr class="separator:ad3ca4929eb6fe7c13b8b676c77a82223"><td class="memSeparator" colspan="2"> </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>< <a class="el" href="classGlib_1_1Bytes.html">Glib::Bytes</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Bytes.html#a8c8f1062871f4ff87a9514ef74308f07">create</a> (gconstpointer data, gsize <a class="elRef" doxygen="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"> </td></tr>
<tr class="memitem:a06410137748117467146b3c4d4d77c7c"><td class="memItemLeft" align="right" valign="top">static guint </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"> </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"> </td></tr>
<tr class="memitem:a6296b93981e010525d71c8b3f126ce65"><td class="memItemLeft" align="right" valign="top">static bool </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"> </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"> </td></tr>
<tr class="memitem:a2ea3d054c219ccde859316204b19426b"><td class="memItemLeft" align="right" valign="top">static gint </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"> </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"> </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:a4bce73ee3c5a2a9551587a8cf49d2c05"><td class="memItemLeft" align="right" valign="top">void </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"> </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>< <a class="el" href="classGlib_1_1Bytes.html">Glib::Bytes</a> > </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"> </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"> </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 & Destructor Documentation</h2>
<a id="a3bd0089700df92f23b1c4bc91ace8bcf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3bd0089700df92f23b1c4bc91ace8bcf">◆ </a></span>Bytes() <span class="overload">[1/2]</span></h2>
<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">delete</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="adc8fc824354b3b0e7199acd953f23abe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc8fc824354b3b0e7199acd953f23abe">◆ </a></span>Bytes() <span class="overload">[2/2]</span></h2>
<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="paramtype">const <a class="el" href="classGlib_1_1Bytes.html">Bytes</a>& </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">delete</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a2ea3d054c219ccde859316204b19426b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ea3d054c219ccde859316204b19426b">◆ </a></span>compare()</h2>
<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 </td>
<td class="paramname"><em>bytes1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">gconstpointer </td>
<td class="paramname"><em>bytes2</em> </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 id="a8c8f1062871f4ff87a9514ef74308f07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c8f1062871f4ff87a9514ef74308f07">◆ </a></span>create()</h2>
<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><<a class="el" href="classGlib_1_1Bytes.html">Glib::Bytes</a>> Glib::Bytes::create </td>
<td>(</td>
<td class="paramtype">gconstpointer </td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">gsize </td>
<td class="paramname"><em>size</em> </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 id="a6296b93981e010525d71c8b3f126ce65"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6296b93981e010525d71c8b3f126ce65">◆ </a></span>equal()</h2>
<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 </td>
<td class="paramname"><em>bytes1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">gconstpointer </td>
<td class="paramname"><em>bytes2</em> </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>nullptr</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 id="a06108e8419f87c8413f052f0f5fd9754"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a06108e8419f87c8413f052f0f5fd9754">◆ </a></span>get_data()</h2>
<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 & </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>nullptr</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>nullptr</code> and <em>size</em> as 0. <code>nullptr</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>nullptr</code>. </dd></dl>
</div>
</div>
<a id="ad3ca4929eb6fe7c13b8b676c77a82223"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3ca4929eb6fe7c13b8b676c77a82223">◆ </a></span>get_size()</h2>
<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 id="aab7dbd47921abcdd9f9f1a336399842c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aab7dbd47921abcdd9f9f1a336399842c">◆ </a></span>gobj() <span class="overload">[1/2]</span></h2>
<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 id="a09a78c95b6a36686612aef51abfc6fc1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a09a78c95b6a36686612aef51abfc6fc1">◆ </a></span>gobj() <span class="overload">[2/2]</span></h2>
<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 id="a3e9a0ed3abb425587132bdb1c8157b1d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e9a0ed3abb425587132bdb1c8157b1d">◆ </a></span>gobj_copy()</h2>
<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 id="a06410137748117467146b3c4d4d77c7c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a06410137748117467146b3c4d4d77c7c">◆ </a></span>hash()</h2>
<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 </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>nullptr</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 id="a4bce73ee3c5a2a9551587a8cf49d2c05"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4bce73ee3c5a2a9551587a8cf49d2c05">◆ </a></span>operator delete()</h2>
<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 * </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::size_t </td>
<td class="paramname"> </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 id="adef04ea17dded7a2f3cb808e7608e055"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adef04ea17dded7a2f3cb808e7608e055">◆ </a></span>operator=()</h2>
<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_1Bytes.html">Bytes</a>& Glib::Bytes::operator= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classGlib_1_1Bytes.html">Bytes</a>& </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">delete</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ae8658a8c6fdfef04a65f5596a7081fc3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae8658a8c6fdfef04a65f5596a7081fc3">◆ </a></span>reference()</h2>
<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 id="a03a0ff151d53dab28d041459b545c69e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a03a0ff151d53dab28d041459b545c69e">◆ </a></span>unreference()</h2>
<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 id="a0de22eb5d159db98e1d035bc58a14cd9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0de22eb5d159db98e1d035bc58a14cd9">◆ </a></span>wrap()</h2>
<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>< <a class="el" href="classGlib_1_1Bytes.html">Glib::Bytes</a> > wrap </td>
<td>(</td>
<td class="paramtype">GBytes * </td>
<td class="paramname"><em>object</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>take_copy</em> = <code>false</code> </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 Sat Mar 31 2018 09:12:10 for glibmm by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>