Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > ba6e5e1a033bd8535c43a771ce407926 > files > 293

lib64cxx-gtk-utils2.2-devel-2.2.3-2.mga4.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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>c++-gtk-utils: Cgu::basic_gostream&lt; charT, Traits &gt; Class Template 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">c++-gtk-utils
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
  <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="files.html"><span>Files</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="hierarchy.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="namespaceCgu.html">Cgu</a></li><li class="navelem"><a class="el" href="classCgu_1_1basic__gostream.html">basic_gostream</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classCgu_1_1basic__gostream-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Cgu::basic_gostream&lt; charT, Traits &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__gstreams.html">gstreams</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>C++ output stream for GIO streams.  
 <a href="classCgu_1_1basic__gostream.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="gstream_8h_source.html">c++-gtk-utils/gstream.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Cgu::basic_gostream&lt; charT, Traits &gt;:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classCgu_1_1basic__gostream.png" usemap="#Cgu::basic_gostream&lt; charT, Traits &gt;_map" alt=""/>
  <map id="Cgu::basic_gostream&lt; charT, Traits &gt;_map" name="Cgu::basic_gostream&lt; charT, Traits &gt;_map">
</map>
 </div></div>
<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:a62f8c5323c7444a6c0f0fc4c0dbc3940"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1basic__gostream.html#a62f8c5323c7444a6c0f0fc4c0dbc3940">basic_gostream</a> (const <a class="el" href="classCgu_1_1basic__gostream.html">basic_gostream</a> &amp;)=delete</td></tr>
<tr class="separator:a62f8c5323c7444a6c0f0fc4c0dbc3940"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a688997290f4881402110b236e92d43dc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCgu_1_1basic__gostream.html">basic_gostream</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1basic__gostream.html#a688997290f4881402110b236e92d43dc">operator=</a> (const <a class="el" href="classCgu_1_1basic__gostream.html">basic_gostream</a> &amp;)=delete</td></tr>
<tr class="separator:a688997290f4881402110b236e92d43dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1103b02d048f85234646d3943577346"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1basic__gostream.html#ac1103b02d048f85234646d3943577346">basic_gostream</a> (const <a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&lt; GOutputStream &gt; &amp;stream, bool manage, const <a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&lt; GConverter &gt; &amp;converter=<a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&lt; GConverter &gt;())</td></tr>
<tr class="separator:ac1103b02d048f85234646d3943577346"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46a09cec55fe8aed182044525298b86c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1basic__gostream.html#a46a09cec55fe8aed182044525298b86c">basic_gostream</a> ()</td></tr>
<tr class="separator:a46a09cec55fe8aed182044525298b86c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06374d8e33481f7b4526024e7a8d3a7a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1basic__gostream.html#a06374d8e33481f7b4526024e7a8d3a7a">attach</a> (const <a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&lt; GOutputStream &gt; &amp;stream, bool manage, const <a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&lt; GConverter &gt; &amp;converter=<a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&lt; GConverter &gt;())</td></tr>
<tr class="separator:a06374d8e33481f7b4526024e7a8d3a7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0751dd2ccec41b4d62eb2a63497a8b6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1basic__gostream.html#ab0751dd2ccec41b4d62eb2a63497a8b6">close</a> ()</td></tr>
<tr class="separator:ab0751dd2ccec41b4d62eb2a63497a8b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad94c21d1c0d33f69f76e106b4da95f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&lt; GOutputStream &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1basic__gostream.html#aad94c21d1c0d33f69f76e106b4da95f4">get_gio_stream</a> () const </td></tr>
<tr class="separator:aad94c21d1c0d33f69f76e106b4da95f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c5cd30c1b82f8d944bb6fd43b98c4cb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1basic__gostream.html#a2c5cd30c1b82f8d944bb6fd43b98c4cb">set_buffered</a> (bool buffered)</td></tr>
<tr class="separator:a2c5cd30c1b82f8d944bb6fd43b98c4cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab248e0990494a230a85d6271f0c82e3d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1basic__gostream.html#ab248e0990494a230a85d6271f0c82e3d">can_seek</a> () const </td></tr>
<tr class="separator:ab248e0990494a230a85d6271f0c82e3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbef3fde2370fa28c8dc1096b05f54a9"><td class="memItemLeft" align="right" valign="top">GError *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCgu_1_1basic__gostream.html#acbef3fde2370fa28c8dc1096b05f54a9">is_error</a> ()</td></tr>
<tr class="separator:acbef3fde2370fa28c8dc1096b05f54a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;class charT, class Traits = std::char_traits&lt;charT&gt;&gt;<br/>
class Cgu::basic_gostream&lt; charT, Traits &gt;</h3>

<p>C++ output stream for GIO streams. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__gstreams.html">gstreams</a></dd></dl>
<p>This class provides standard ostream services for GIO output streams. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a62f8c5323c7444a6c0f0fc4c0dbc3940"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class charT , class Traits  = std::char_traits&lt;charT&gt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCgu_1_1basic__gostream.html">Cgu::basic_gostream</a>&lt; charT, Traits &gt;::<a class="el" href="classCgu_1_1basic__gostream.html">basic_gostream</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classCgu_1_1basic__gostream.html">basic_gostream</a>&lt; charT, Traits &gt; &amp;&#160;</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">
<p>This class cannot be copied. The copy constructor is deleted. </p>

</div>
</div>
<a class="anchor" id="ac1103b02d048f85234646d3943577346"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class charT , class Traits  = std::char_traits&lt;charT&gt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCgu_1_1basic__gostream.html">Cgu::basic_gostream</a>&lt; charT, Traits &gt;::<a class="el" href="classCgu_1_1basic__gostream.html">basic_gostream</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&lt; GOutputStream &gt; &amp;&#160;</td>
          <td class="paramname"><em>stream</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>manage</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&lt; GConverter &gt; &amp;&#160;</td>
          <td class="paramname"><em>converter</em> = <code><a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&lt;GConverter&gt;()</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">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The constructor taking a GIO output stream. This class does not offer concurrent access from multiple threads to the same stream object, and if that is required users should provide their own synchronisation.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stream</td><td>A GIO output stream to be attached. If the caller wants the output stream to survive this class's destruction or a call to <a class="el" href="classCgu_1_1basic__gostream.html#ab0751dd2ccec41b4d62eb2a63497a8b6">close()</a> or <a class="el" href="classCgu_1_1basic__gostream.html#a06374d8e33481f7b4526024e7a8d3a7a">attach()</a>, the caller should keep a separate <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a> object which references the stream (obtained by, say, calling <a class="el" href="classCgu_1_1basic__gostream.html#aad94c21d1c0d33f69f76e106b4da95f4">get_gio_stream()</a>) and pass 'manage' as false. If this is a GFilterOutputStream object (that is, a GBufferedOutputStream, GConverterOutputStream or GDataOutputStream stream), only the underlying base output stream will be attached and the other higher level streams will be closed (buffering and converting are controlled solely by the <a class="el" href="classCgu_1_1basic__gostream.html#a2c5cd30c1b82f8d944bb6fd43b98c4cb">set_buffered()</a> method and 'converter' argument).</td></tr>
    <tr><td class="paramname">manage</td><td>Whether the underlying streambuffer should call g_output_stream_close() on the GIO stream in the streambuffer's destructor or when another stream is attached. Passing 'true' is usually what is wanted, and is particularly relevant on output streams because unless g_output_stream_close() is called, GIO may not commit to disk - 'false' only makes sense if the caller keeps a separate <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a> object which references the stream to keep it alive (obtained by, say, calling <a class="el" href="classCgu_1_1basic__gostream.html#aad94c21d1c0d33f69f76e106b4da95f4">get_gio_stream()</a>). Unlike its fdstreams equivalent, this parameter does not have a default value of 'true': this is partly to make it less likely that a converter is passed to this argument by mistake (that would not normally cause a compiler warning because <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a> has a type conversion operator providing the underlying C object by pointer, so GobjHandles are type convertible to pointers, and such a pointer will in turn provide a type match with a bool argument); and partly because, given a GOutputStream* p, the construction "<a class="el" href="group__gstreams.html#gaf601782cc7c521ad0aec6ddff2ed3139" title="C++ output stream for GIO streams for char type. ">Cgu::gostream</a> str(<a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">Cgu::GobjHandle</a>&lt;GOutputStream&gt;(p));" without an additional argument or additional parentheses (or the use of uniform initializer syntax using braces) would cause a compiler error as it would be interpreted as a function declaration.</td></tr>
    <tr><td class="paramname">converter</td><td>A converter (if any) to be attached to the GIO output stream. The default value of an empty GobjHandle&lt;GConverter&gt; object indicates no converter.</td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::bad_alloc</td><td>This constructor will throw std::bad_alloc if memory is exhausted and the system throws on such exhaustion (unless the library has been installed using the --with-glib-memory-slices-compat or --with-glib-memory-slices-no-compat configuration option, in which case glib will terminate the program if it is unable to obtain memory from the operating system). No other exception will be thrown unless the constructor of std::basic_streambuf or std::basic_ostream throws.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>If a converter is provided, the stream will no longer be seekable even if it otherwise would be, so tellp() and seekp() will no longer work (they will return pos_type(off_type(-1)). </dd></dl>

</div>
</div>
<a class="anchor" id="a46a09cec55fe8aed182044525298b86c"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class charT , class Traits  = std::char_traits&lt;charT&gt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCgu_1_1basic__gostream.html">Cgu::basic_gostream</a>&lt; charT, Traits &gt;::<a class="el" href="classCgu_1_1basic__gostream.html">basic_gostream</a> </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>With this constructor, the GIO output stream must be attached later with the <a class="el" href="classCgu_1_1basic__gostream.html#a06374d8e33481f7b4526024e7a8d3a7a">attach()</a> method. It will not throw unless the default constructor of std::basic_streambuf or std::basic_ostream throws. This class does not offer concurrent access from multiple threads to the same stream object, and if that is required users should provide their own synchronisation. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a06374d8e33481f7b4526024e7a8d3a7a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class charT , class Traits  = std::char_traits&lt;charT&gt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classCgu_1_1basic__gostream.html">Cgu::basic_gostream</a>&lt; charT, Traits &gt;::attach </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&lt; GOutputStream &gt; &amp;&#160;</td>
          <td class="paramname"><em>stream</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>manage</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&lt; GConverter &gt; &amp;&#160;</td>
          <td class="paramname"><em>converter</em> = <code><a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&lt;GConverter&gt;()</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">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Attach a new GIO output stream to this object (and close any GIO stream at present managed by it). If output buffering was previously switched off, it is switched back on again. If any stream state flags were set (eofbit, failbit or badbit), they will be cleared by a call to clear(). If this method closes a stream at present managed by it and the close fails, failbit is not set and no exception will be thrown. Accordingly, if the user needs to know whether there was an error in this method closing any managed stream, she should call <a class="el" href="classCgu_1_1basic__gostream.html#ab0751dd2ccec41b4d62eb2a63497a8b6">close()</a> explicitly before calling this method. This class does not offer concurrent access from multiple threads to the same stream object, and if that is required users should provide their own synchronisation.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stream</td><td>A GIO output stream to be attached. If the caller wants the GIO output stream to survive a subsequent call to <a class="el" href="classCgu_1_1basic__gostream.html#ab0751dd2ccec41b4d62eb2a63497a8b6">close()</a> or <a class="el" href="classCgu_1_1basic__gostream.html#a06374d8e33481f7b4526024e7a8d3a7a">attach()</a> or this class's destruction, the caller should keep a separate <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a> object which references the stream (obtained by, say, calling <a class="el" href="classCgu_1_1basic__gostream.html#aad94c21d1c0d33f69f76e106b4da95f4">get_gio_stream()</a>) and pass 'manage' as false. If this is a GFilterOutputStream object (that is, a GBufferedOutputStream, GConverterOutputStream or GDataOutputStream stream), only the underlying base output stream will be attached and the other higher level streams will be closed (buffering and converting are controlled solely by the <a class="el" href="classCgu_1_1basic__gostream.html#a2c5cd30c1b82f8d944bb6fd43b98c4cb">set_buffered()</a> method and 'converter' argument).</td></tr>
    <tr><td class="paramname">manage</td><td>Whether the underlying streambuffer should call g_output_stream_close() on the GIO stream in the streambuffer's destructor or when another stream is attached. Passing 'true' is usually what is wanted, and is particularly relevant on output streams because unless g_output_stream_close() is called, GIO may not commit to disk - 'false' only makes sense if the caller keeps a separate <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a> object which references the stream to keep it alive (obtained by, say, calling <a class="el" href="classCgu_1_1basic__gostream.html#aad94c21d1c0d33f69f76e106b4da95f4">get_gio_stream()</a>). Unlike its fdstreams equivalent, this parameter does not have a default value of 'true': this is partly to make it less likely that a converter is passed to this argument by mistake (that would not normally cause a compiler warning because <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a> has a type conversion operator providing the underlying C object by pointer, so GobjHandles are type convertible to pointers, and such a pointer will in turn provide a type match with a bool argument); and partly to maintain compatibility with the constructor's interface, which has separate syntactic constraints.</td></tr>
    <tr><td class="paramname">converter</td><td>A converter (if any) to be attached to the GIO output stream. The default value of an empty GobjHandle&lt;GConverter&gt; object indicates no converter.</td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::bad_alloc</td><td>This method will throw std::bad_alloc if memory is exhausted and the system throws on such exhaustion (unless the library has been installed using the --with-glib-memory-slices-compat or --with-glib-memory-slices-no-compat configuration option, in which case glib will terminate the program if it is unable to obtain memory from the operating system).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>If a converter is provided, the stream will no longer be seekable even if it otherwise would be, so tellp() and seekp() will no longer work (they will return pos_type(off_type(-1)). </dd></dl>

</div>
</div>
<a class="anchor" id="ab248e0990494a230a85d6271f0c82e3d"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class charT , class Traits  = std::char_traits&lt;charT&gt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classCgu_1_1basic__gostream.html">Cgu::basic_gostream</a>&lt; charT, Traits &gt;::can_seek </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This method indicates whether the attached GIO output stream implements GSeekable, so that a call to tellp() or seekp() can succeed. Note that in the seekp(off_type off, ios_base::seekdir dir) variant, on wide character streams the 'off' argument is dimensioned as the number of wchar_t/char32_t/char16_t units not the number of bytes (that is, it is bytes/sizeof(char_type)). This method does not throw. This class does not offer concurrent access from multiple threads to the same stream object, and if that is required users should provide their own synchronisation.</p>
<dl class="section return"><dt>Returns</dt><dd>true if the attached GIO stream implements GSeekable, otherwise false. The result is only meaningful if a GIO stream has been attached to this C++ stream object. </dd></dl>

</div>
</div>
<a class="anchor" id="ab0751dd2ccec41b4d62eb2a63497a8b6"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class charT , class Traits  = std::char_traits&lt;charT&gt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classCgu_1_1basic__gostream.html">Cgu::basic_gostream</a>&lt; charT, Traits &gt;::close </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Call g_output_stream_close() on the GIO stream at present attached (if any), and release the underlying C++ streambuffer's reference to that stream. If the caller wants the GIO stream to survive the call to this method (albeit in a closed state), the caller should, before the call is made, keep a separate <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a> object which references the stream. If the close fails, the failbit will be set with setstate(std::ios_base::failbit). This class does not offer concurrent access from multiple threads to the same stream object, and if that is required users should provide their own synchronisation.</p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::ios_base::failure</td><td>This exception will be thrown if an error arises on closing the stream and such an exception has been required by a call to the exceptions() method of this class (inherited from std::basic_ios&lt;&gt;). No exception will be thrown if exceptions() has not been called. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aad94c21d1c0d33f69f76e106b4da95f4"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class charT , class Traits  = std::char_traits&lt;charT&gt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCgu_1_1GobjHandle.html">GobjHandle</a>&lt;GOutputStream&gt; <a class="el" href="classCgu_1_1basic__gostream.html">Cgu::basic_gostream</a>&lt; charT, Traits &gt;::get_gio_stream </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get the GIO output stream at present attached (if any), by <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a>. If no stream has been attached, this method will return an empty <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a> object. Retaining the return value will cause the GIO output stream to survive the destruction of this object. The return value may be a different stream from the one originally passed to this object's constructor or to <a class="el" href="classCgu_1_1basic__gostream.html#a06374d8e33481f7b4526024e7a8d3a7a">attach()</a>. It will be different if a converter has been attached to it. This method does not throw. This class does not offer concurrent access from multiple threads to the same stream object, and if that is required users should provide their own synchronisation.</p>
<dl class="section return"><dt>Returns</dt><dd>The GIO output stream at present attached, or an empty <a class="el" href="classCgu_1_1GobjHandle.html" title="This is a handle for managing the reference count of GObjects. ">GobjHandle</a> object if none has been attached </dd></dl>

</div>
</div>
<a class="anchor" id="acbef3fde2370fa28c8dc1096b05f54a9"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class charT , class Traits  = std::char_traits&lt;charT&gt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">GError* <a class="el" href="classCgu_1_1basic__gostream.html">Cgu::basic_gostream</a>&lt; charT, Traits &gt;::is_error </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This method reports the error status of any attached GIO output stream, and is intended to be called where failbit or badbit has been set. It can be useful for interpreting conversion errors on converting streams where one of those bits is set. This class does not offer concurrent access from multiple threads to the same stream object, and if that is required users should provide their own synchronisation.</p>
<dl class="section return"><dt>Returns</dt><dd>NULL if no output stream is attached, or it is not in an error state. If an attached output stream is in an error state, say because it is a converting output stream which has encountered a conversion error, the most recent GError object emitted by a write operation on it is returned. Ownership of the return value is retained, so if it is intended to be used after the next write operation, it should be copied using g_error_copy().</dd></dl>
<p>Since 2.0.5 </p>

</div>
</div>
<a class="anchor" id="a688997290f4881402110b236e92d43dc"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class charT , class Traits  = std::char_traits&lt;charT&gt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCgu_1_1basic__gostream.html">basic_gostream</a>&amp; <a class="el" href="classCgu_1_1basic__gostream.html">Cgu::basic_gostream</a>&lt; charT, Traits &gt;::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classCgu_1_1basic__gostream.html">basic_gostream</a>&lt; charT, Traits &gt; &amp;&#160;</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">
<p>This class cannot be copied. The copy assignment operator is deleted. </p>

</div>
</div>
<a class="anchor" id="a2c5cd30c1b82f8d944bb6fd43b98c4cb"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class charT , class Traits  = std::char_traits&lt;charT&gt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classCgu_1_1basic__gostream.html">Cgu::basic_gostream</a>&lt; charT, Traits &gt;::set_buffered </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>buffered</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This method converts the attached GIO output stream to an unbuffered stream for output if 'buffered' is false, or back to a buffered stream if buffering has previously been switched off and 'buffered' is true. Buffering is on by default for any newly created gostream object and any newly attached GIO output stream. If buffering is turned off, all characters at present in the buffers which are stored for output are flushed (but if writing to a file which is being written over/replaced, output may not appear in the destination until the GIO stream is closed). This method has no effect if no GIO output stream has yet been attached. Switching output buffering off is similar in effect to setting the std::ios_base::unitbuf flag, but is slightly more efficient. This class does not offer concurrent access from multiple threads to the same stream object, and if that is required users should provide their own synchronisation.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buffered</td><td>'false' if buffering is to be turned off, 'true' if it is to be turned back on.</td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::bad_alloc</td><td>This method will throw std::bad_alloc if 'buffered' is true, output buffering had previously been switched off, memory is exhausted and the system throws on such exhaustion (unless the library has been installed using the --with-glib-memory-slices-compat or --with-glib-memory-slices-no-compat configuration option, in which case glib will terminate the program if it is unable to obtain memory from the operating system). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="gstream_8h_source.html">gstream.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Sep 16 2013 20:45:31 for c++-gtk-utils by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.4
</small></address>
</body>
</html>