Sophie

Sophie

distrib > Mandriva > 2010.0 > x86_64 > by-pkgid > 7f3e5f74d754b480ec33648905c4afae > files > 106

glibmm2.4-doc-2.22.1-1mdv2010.0.x86_64.rpm

<!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"/>
<title>glibmm: Gio::MemoryOutputStream Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <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 class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceGio.html">Gio</a>::<a class="el" href="classGio_1_1MemoryOutputStream.html">MemoryOutputStream</a>
  </div>
</div>
<div class="contents">
<h1>Gio::MemoryOutputStream Class Reference<br/>
<small>
[<a class="el" href="group__Streams.html">Stream Classes</a>]</small>
</h1><!-- doxytag: class="Gio::MemoryOutputStream" --><!-- doxytag: inherits="Gio::OutputStream,Gio::Seekable" -->
<p>Streaming output operations on memory chunks. <a href="#_details">More...</a></p>

<p>Inherits <a class="el" href="classGio_1_1OutputStream.html">Gio::OutputStream</a>, and <a class="el" href="classGio_1_1Seekable.html">Gio::Seekable</a>.</p>
<div class="dynheader">
Collaboration diagram for Gio::MemoryOutputStream:</div>
<div class="dynsection">
<div class="center"><img src="classGio_1_1MemoryOutputStream__coll__graph.png" border="0" usemap="#Gio_1_1MemoryOutputStream_coll__map" alt="Collaboration graph"/></div>
<map name="Gio_1_1MemoryOutputStream_coll__map" id="Gio_1_1MemoryOutputStream_coll__map">
<area shape="rect" href="classGio_1_1OutputStream.html" title="Base class for implementing streaming output." alt="" coords="5,237,136,267"/><area shape="rect" href="classGlib_1_1Object.html" title="Glib::Object" alt="" coords="31,160,121,189"/><area shape="rect" href="classGlib_1_1ObjectBase.html" title="Glib::ObjectBase is a common base class for Objects and Interfaces." alt="" coords="76,83,196,112"/><area shape="rect" href="classGlib_1_1Interface.html" title="Glib::Interface" alt="" coords="155,160,259,189"/><area shape="rect" href="../../../libsigc++-2.0/reference/html/structsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="83,5,189,35"/><area shape="rect" href="classGio_1_1Seekable.html" title="Stream seeking interface." alt="" coords="160,237,264,267"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classGio_1_1MemoryOutputStream-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1MemoryOutputStream.html#ad46729116d268fe1f8f540c692a43bf4">~MemoryOutputStream</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">GMemoryOutputStream*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1MemoryOutputStream.html#a3a52447ebfbc60722ced10d8aa625825">gobj</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a3a52447ebfbc60722ced10d8aa625825"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const GMemoryOutputStream*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1MemoryOutputStream.html#a026181901b030a2f1f6e3b66026de5d3">gobj</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a026181901b030a2f1f6e3b66026de5d3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">GMemoryOutputStream*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1MemoryOutputStream.html#aa6b728d48c0817347df70d41bd57708f">gobj_copy</a> ()</td></tr>
<tr><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="#aa6b728d48c0817347df70d41bd57708f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">gpointer&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1MemoryOutputStream.html#a3b85fad262d105f85bff12b5a666ddfd">get_data</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets any loaded data from the <em>ostream</em>. <a href="#a3b85fad262d105f85bff12b5a666ddfd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">gsize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1MemoryOutputStream.html#ae8e5b9a0551bba70974c99cbb24a91e3">get_size</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the size of the currently allocated data area (availible from g_memory_output_stream_get_data()). <a href="#ae8e5b9a0551bba70974c99cbb24a91e3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">gsize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1MemoryOutputStream.html#a7325ac59862190abfbbd8402ca7e7fe5">get_data_size</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns: the number of bytes written to the stream. <a href="#a7325ac59862190abfbbd8402ca7e7fe5"></a><br/></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><br class="typebreak"/>
&lt; <a class="el" href="classGio_1_1MemoryOutputStream.html">MemoryOutputStream</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1MemoryOutputStream.html#af906acc5229896d07482f73297a1ee6d">create</a> (gpointer data, gsize len, GReallocFunc realloc_fn, GDestroyNotify destroy)</td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1MemoryOutputStream.html#a813d6f10b2ef74d5b604834ff5d11e58">MemoryOutputStream</a> (gpointer data, gsize len, GReallocFunc realloc_fn, GDestroyNotify destroy)</td></tr>
<tr><td colspan="2"><h2>Related Functions</h2></td></tr>
<tr><td colspan="2"><p>(Note that these are not member functions.) </p>
<br/><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><br class="typebreak"/>
&lt; <a class="el" href="classGio_1_1MemoryOutputStream.html">Gio::MemoryOutputStream</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1MemoryOutputStream.html#a294410b0d5c9b2d1a08dc9375338f187">wrap</a> (GMemoryOutputStream* object, bool take_copy=false)</td></tr>
<tr><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="#a294410b0d5c9b2d1a08dc9375338f187"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Streaming output operations on memory chunks. </p>
<dl class="since_2_20"><dt><b><a class="el" href="since_2_20.html#_since_2_20000011">Since glibmm 2.20:</a></b></dt><dd></dd></dl>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ad46729116d268fe1f8f540c692a43bf4"></a><!-- doxytag: member="Gio::MemoryOutputStream::~MemoryOutputStream" ref="ad46729116d268fe1f8f540c692a43bf4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual Gio::MemoryOutputStream::~MemoryOutputStream </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a813d6f10b2ef74d5b604834ff5d11e58"></a><!-- doxytag: member="Gio::MemoryOutputStream::MemoryOutputStream" ref="a813d6f10b2ef74d5b604834ff5d11e58" args="(gpointer data, gsize len, GReallocFunc realloc_fn, GDestroyNotify destroy)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Gio::MemoryOutputStream::MemoryOutputStream </td>
          <td>(</td>
          <td class="paramtype">gpointer&#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>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">GReallocFunc&#160;</td>
          <td class="paramname"> <em>realloc_fn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">GDestroyNotify&#160;</td>
          <td class="paramname"> <em>destroy</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [explicit, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="af906acc5229896d07482f73297a1ee6d"></a><!-- doxytag: member="Gio::MemoryOutputStream::create" ref="af906acc5229896d07482f73297a1ee6d" args="(gpointer data, gsize len, GReallocFunc realloc_fn, GDestroyNotify destroy)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>&lt;<a class="el" href="classGio_1_1MemoryOutputStream.html">MemoryOutputStream</a>&gt; Gio::MemoryOutputStream::create </td>
          <td>(</td>
          <td class="paramtype">gpointer&#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>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">GReallocFunc&#160;</td>
          <td class="paramname"> <em>realloc_fn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">GDestroyNotify&#160;</td>
          <td class="paramname"> <em>destroy</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a3b85fad262d105f85bff12b5a666ddfd"></a><!-- doxytag: member="Gio::MemoryOutputStream::get_data" ref="a3b85fad262d105f85bff12b5a666ddfd" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gpointer Gio::MemoryOutputStream::get_data </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets any loaded data from the <em>ostream</em>. </p>
<p>Note that the returned pointer may become invalid on the next write or truncate operation on the stream. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Pointer to the stream's data. </dd></dl>

</div>
</div>
<a class="anchor" id="a7325ac59862190abfbbd8402ca7e7fe5"></a><!-- doxytag: member="Gio::MemoryOutputStream::get_data_size" ref="a7325ac59862190abfbbd8402ca7e7fe5" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gsize Gio::MemoryOutputStream::get_data_size </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns: the number of bytes written to the stream. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of bytes written to the stream</dd></dl>
<dl class="since_2_18"><dt><b><a class="el" href="since_2_18.html#_since_2_18000021">Since glibmm 2.18:</a></b></dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="ae8e5b9a0551bba70974c99cbb24a91e3"></a><!-- doxytag: member="Gio::MemoryOutputStream::get_size" ref="ae8e5b9a0551bba70974c99cbb24a91e3" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gsize Gio::MemoryOutputStream::get_size </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the size of the currently allocated data area (availible from g_memory_output_stream_get_data()). </p>
<p>If the stream isn't growable (no realloc was passed to g_memory_output_stream_new()) then this is the maximum size of the stream and further writes will return IO_ERROR_NO_SPACE.</p>
<p>Note that for growable streams the returned size may become invalid on the next write or truncate operation on the stream.</p>
<p>If you want the number of bytes currently written to the stream, use g_memory_output_stream_get_data_size(). </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of bytes allocated for the data buffer. </dd></dl>

</div>
</div>
<a class="anchor" id="a026181901b030a2f1f6e3b66026de5d3"></a><!-- doxytag: member="Gio::MemoryOutputStream::gobj" ref="a026181901b030a2f1f6e3b66026de5d3" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const GMemoryOutputStream* Gio::MemoryOutputStream::gobj </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

<p>Reimplemented from <a class="el" href="classGio_1_1OutputStream.html#ac29e6ad7ccffde24201a1da608f25ac9">Gio::OutputStream</a>.</p>

</div>
</div>
<a class="anchor" id="a3a52447ebfbc60722ced10d8aa625825"></a><!-- doxytag: member="Gio::MemoryOutputStream::gobj" ref="a3a52447ebfbc60722ced10d8aa625825" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GMemoryOutputStream* Gio::MemoryOutputStream::gobj </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

<p>Reimplemented from <a class="el" href="classGio_1_1OutputStream.html#ac5a71a1f432f8ac2a53de2c66eb81d9d">Gio::OutputStream</a>.</p>

</div>
</div>
<a class="anchor" id="aa6b728d48c0817347df70d41bd57708f"></a><!-- doxytag: member="Gio::MemoryOutputStream::gobj_copy" ref="aa6b728d48c0817347df70d41bd57708f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GMemoryOutputStream* Gio::MemoryOutputStream::gobj_copy </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td></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>

<p>Reimplemented from <a class="el" href="classGio_1_1OutputStream.html#ad9128985ea683716db40d7831cb7075c">Gio::OutputStream</a>.</p>

</div>
</div>
<hr/><h2>Friends And Related Function Documentation</h2>
<a class="anchor" id="a294410b0d5c9b2d1a08dc9375338f187"></a><!-- doxytag: member="Gio::MemoryOutputStream::wrap" ref="a294410b0d5c9b2d1a08dc9375338f187" args="(GMemoryOutputStream *object, bool take_copy=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>&lt; <a class="el" href="classGio_1_1MemoryOutputStream.html">Gio::MemoryOutputStream</a> &gt; wrap </td>
          <td>(</td>
          <td class="paramtype">GMemoryOutputStream *&#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></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [related]</code></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><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>object</em>&#160;</td><td>The C instance. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>take_copy</em>&#160;</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="return"><dt><b>Returns:</b></dt><dd>A C++ instance that wraps this C instance. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>giomm/memoryoutputstream.h</li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Mon Sep 21 11:07:24 2009 for glibmm by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>