    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
     <channel>
        <title>ACCU  :: Multiple Streams Going Nowhere</title>
        <link>https://members.accu.org/index.php/journals/260</link>
        <description>Professionalism in Programming</description>
        <dc:language>en-us</dc:language> 
        <dc:creator>Administrator</dc:creator> 
        <admin:generatorAgent rdf:resource="http://www.xaraya.org" /> 
        <admin:errorReportsTo rdf:resource="mailto:webeditor@accu.org" />
       <sy:updatePeriod>hourly</sy:updatePeriod>
       <sy:updateFrequency>1</sy:updateFrequency>
       <docs>http://backend.userland.com/rss</docs>


        <h2>Journal Articles</h2>


<div class="xar-mod-head"><span class="xar-mod-title">Overload Journal #65 - Feb 2005 + Programming Topics</span></div>

<table border="0" cellpadding="1" cellspacing="0">
    <tbody>
    <tr>
        <td valign="top">
            Browse in :
       </td>
       <td valign="top">

                                            <a href="https://members.accu.org/index.php/journals/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/journals/c76/">Journals</a>

                     &gt;                         <a href="https://members.accu.org/index.php/journals/c78/">Overload</a>

                     &gt;                         <a href="https://members.accu.org/index.php/journals/c147/">65</a>
                    (9)
<br />

                                            <a href="https://members.accu.org/index.php/journals/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/journals/c13/">Topics</a>

                     &gt;                         <a href="https://members.accu.org/index.php/journals/c65/">Programming</a>
                    (877)
<br />

                                            <a href="https://members.accu.org/index.php/journals/c147-65/">Any of these categories</a>

                    -                        <a href="https://members.accu.org/index.php/journals/c147+65/">All of these categories</a>
<br />
</td>
   </tr>
   </tbody>
</table>




<div class="xar-error">
   <p>
 <strong>Note:</strong> when you create a new publication type,
the articles module will automatically use the templates
<em>user-display-[publicationtype].xt</em>
and <em>user-summary-[publicationtype].xt</em>.
If those templates do not exist when you try to preview or display a new article,
you'll get this warning :-)  Please place your own templates in themes/<em>yourtheme</em>/modules/articles . The templates will get the extension .xt there. </p>
</div>
<div class="xar-norm xar-standard-box-padding">
   <h1><strong>Title:</strong>&nbsp;Multiple Streams Going Nowhere</h1>
<p><strong>Author:</strong>&nbsp;</p>
<p>
<strong>Date:</strong> 12 February 2005 16:35:57 +00:00 or Sat, 12 February 2005 16:35:57 +00:00</p>
<p><strong>Summary:</strong>&nbsp;</p>
<p><strong>Body:</strong>&nbsp;<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e18" id="d0e18"></a></h2>
</div>
<p>In this case study I am going to describe two streams I
developed for use within my C++ testing framework, Aeryn [<a href=
"#Aeryn">Aeryn</a>]. Aeryn has two output streams. One is minimal
and only reports test failures and the test, pass and failure
counts. The other is more verbose and includes all the output from
the minimal stream, plus a list of all test sets along with their
individual test cases. The minimal stream is intended to be sent to
the console and the verbose stream to a more permanent medium such
as a log file or database, but either can be sent to any sort of
output stream.</p>
<p>The use of the two streams introduces two specific problems:</p>
<div class="orderedlist">
<ol type="1">
<li>
<p>The stream sink for both streams must be passed into the
function that runs the tests. For example:</p>
<pre class="programlisting">
std::ofstream verbose(&quot;testlog.txt&quot;);
std::stringstream minimal;
testRunner.Run(verbose, minimal);
</pre>
<p>Even if only one of the two outputs is required, both streams
must be specified.</p>
</li>
<li>
<p>The same information must be sent to both streams, which results
in duplicate code. For example:</p>
<pre class="programlisting">
verbose &lt;&lt; &quot;Ran 6 tests, 3 passes, 3 failures&quot;;
minimal &lt;&lt; &quot;Ran 6 tests, 3 passes, 3 failures&quot;;
</pre>
<p>This is far from ideal as every time the text sent to one stream
is modified, the text sent to the other stream must also be
modified. It would be all too easy to forget to update one or other
of the streams or to update one incorrectly.</p>
</li>
</ol>
</div>
<p>Both of these problems can be solved by writing a custom stream.
Writing custom streams is covered in detail in section 13.13.3
(User-Defined Stream Buffers) of The C++ Standard Library [<a href=
"#Josuttis">Josuttis</a>]. As Josuttis does such a good job of
describing custom streams and his book is widely distributed, I
will only cover the necessary points relevant to this case
study.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e47" id="d0e47"></a>Null Output
Stream</h2>
</div>
<p>Problem 1 can be easily solved with a null output stream. A null
output stream is a type of null object [<a href=
"#Null_Object">Null_Object</a>]. Kevlin Henney describes a null
object as follows: &quot;The intent of a null object is to encapsulate
the absence of an object by providing a substitutable alternative
that offers suitable default do nothing behaviour.&quot; So basically a
null output stream is a stream that does nothing with what is
streamed to it. Therefore if either the minimal or verbose stream
is not required it can be directed to a null output stream. For
example:</p>
<pre class="programlisting">
cnullostream ns;
testRunner.Run(ns, std::cout);
</pre>
<p>The key to writing a custom stream is implementing its stream
buffer. The functionality for stream buffers is held in the
standard library template class <tt class=
"classname">std::basic_streambuf</tt>. Custom stream buffers can be
written by inheriting from <tt class=
"classname">std::basic_streambuf</tt> and overriding the necessary
member functions.</p>
<p>It is not necessary for the custom stream buffer to be a
template, but it makes life a lot easier if you want your custom
stream to work with <tt class="type">char</tt>, <tt class=
"type">wchar_t</tt> and custom character traits. This is also
discussed in detail in The C++ Standard Library.</p>
<pre class="programlisting">
template&lt;typename char_type, typename traits
               = std::char_traits&lt;char_type&gt; &gt;
class nulloutbuf : public
     std::basic_streambuf&lt;char_type, traits&gt; {
protected:
  virtual int_type overflow(int_type c) {
    return traits::not_eof(c);
  }
};
</pre>
<p>The code above shows the complete implementation for the null
output stream buffer. The <tt class="methodname">overflow</tt>
member function is all that is needed to handle characters sent to
the stream buffer. The <tt class="function">traits::not_eof(c)</tt>
function ensures that the correct character is returned if
<tt class="varname">c</tt> is <tt class="literal">EOF</tt>.</p>
<p>Now that the stream buffer is complete it needs to be passed to
an output stream. The easiest way to do this is to inherit from
<tt class="classname">std::basic_ostream</tt> and have the stream
buffer as a member of the subclass.</p>
<pre class="programlisting">
template&lt;typename char_type, typename traits
               = std::char_traits&lt;char_type&gt; &gt;
class null_ostream : public
       std::basic_ostream&lt;char_type, traits&gt; {
private:
  nulloutbuf&lt;char_type, traits&gt; buf_;

public:
  null_ostream()
    : std::basic_ostream&lt;char_type,
                     traits&gt;(&amp;buf_), buf_() {}
};
</pre>
<p>Notice the constructor initialisation list. The <tt class=
"varname">buf_</tt> member of <tt class=
"classname">null_ostream</tt> is passed to the <tt class=
"classname">basic_ostream</tt> base class before it has been
initialised. In his book Josuttis actually puts <tt class=
"varname">buf_</tt> first in the list, but this makes no
difference. The base class is still initialised before <tt class=
"varname">buf_</tt>. This could give rise to a problem where
<tt class="varname">buf_</tt> is accessed by a <tt class=
"classname">nullstream</tt> base class prior to it being
initialised.</p>
<p>Some standard library implementations do nothing to avoid this
and they don't need to. A library vendor knows their own
implementation and if protection was required it would be provided.
As the C++ standard gives no guarantee it is sensible for a custom
stream to take steps to avoid the stream buffer being accessed
before it is created. One way to do this is to put it in a private
base class, which is then initialised before <tt class=
"classname">basic_ostream</tt>:</p>
<pre class="programlisting">
template&lt;typename char_type, typename traits&gt;
class nulloutbuf_init {
private:
  nulloutbuf&lt;char_type, traits&gt; buf_;

public:
  nulloutbuf&lt;char_type, traits&gt;* buf() {
    return &amp;buf_;
  }
};
template&lt;typename char_type, typename traits
               = std::char_traits&lt;char_type&gt; &gt;
class nullostream : private virtual
       nulloutbuf_init&lt;char_type, traits&gt;,
     public
       std::basic_ostream&lt;char_type, traits&gt; {
private:
  typedef nulloutbuf_init&lt;char_type, traits&gt;
                              nulloutbuf_init;

public:
  nullostream() : nulloutbuf_init(), 
          std::basic_ostream&lt;char_type,
            traits&gt;(nulloutbuf_init::buf()) {}
};
</pre>
<p>The code above shows that as well as being inherited privately,
<tt class="methodname">nulloutbuf_init</tt> is also inherited
virtually. This makes sure that <tt class=
"classname">nulloutbuf</tt> and <tt class=
"methodname">nulloutbuf_init</tt> are initialised first, avoiding
the undefined behaviour described in 27.4.4/2 of the [<a href=
"#CppStandard">CppStandard</a>]. The undefined behaviour would
occur if <tt class="classname">nulloutbuf</tt>'s constructor was to
throw in between the construction of <tt class=
"classname">basic_ios</tt> (a base class of <tt class=
"classname">basic_ostream</tt>) and the call to <tt class=
"methodname">basic_ios::init()</tt> from <tt class=
"classname">basic_ostream</tt>'s contrustor. See the C++ standard
for more details.</p>
<p>Now that the implementation of <tt class=
"classname">null_ostream</tt> is complete two helpful typedefs can
be added. One for <tt class="type">char</tt> and one for <tt class=
"type">wchar_t</tt>:</p>
<pre class="programlisting">
typedef null_ostream&lt;char&gt; cnullostream;
typedef null_ostream&lt;wchar_t&gt; wnullostream;
</pre>
<p>I always like to unit test the code I write and usually the
tests are in place beforehand. Naturally I use Aeryn for unit
testing. Testing <tt class="classname">null_ostream</tt> has its
own interesting problems. I started by writing two simple tests to
make sure that <tt class="classname">cnullostream</tt> and
<tt class="classname">wnullostream</tt> compile and accept
input:</p>
<pre class="programlisting">
void CharNullOStreamTest() {
  cnullostream ns;
  ns &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; '!' &lt;&lt; std::endl;
}

void WideNullOStreamTest() {
  wnullostream wns;
  wns &lt;&lt; L&quot;Hello, World!&quot; &lt;&lt; '!' &lt;&lt; std::endl;
}
</pre>
<p>The whole point of a null output stream is that it shouldn't
allocate memory when something is streamed to it; otherwise
something like a <tt class="classname">std::stringstream</tt> could
be used instead. Wanting to test for memory allocation caused me to
write, with considerable help from <tt class=
"literal">accu-general</tt> members, a memory observer library,
called Elephant (see sidebar) [<a href="#Elephant">Elephant</a>].
Elephant allows me to write an observer (<tt class=
"classname">NewDetector</tt>) which can detect allocations from
within <tt class="classname">null_ostream</tt>'s header file, which
in this case, also holds its definition. Originally the observer
was intended to monitor all allocations that occurred while using
<tt class="classname">null_ostream</tt>, but as the standard
permits stream base classes to allocate memory to store the current
locale, I restricted the observer to allocations from <tt class=
"classname">null_ostream</tt> itself:</p>
<pre class="programlisting">
class NewDetector : public elephant::IMemoryObserver {
private:
  bool memoryAllocated_;

public:
  NewDetector() 
    : memoryAllocated_(false) {
  }

  virtual void OnAllocate(void*, std::size_t,
                          std::size_t,
                          const char* file) {
    // Crude black list.
    if(std::strcmp(file,
                   pg::null_ostream_header)) {
      memoryAllocated_ = true;
    }
  }

  virtual void OnFree(void*) {}

  bool AllocationsOccurred() const {
    return memoryAllocated_;
  }
};
</pre>
<p>In order to get <tt class="methodname">OnAllocate</tt> to be
called by the Elephant <tt class="methodname">operator new</tt>
overload that includes the name of the file it was called from, a
macro must be introduced into <tt class=
"classname">null_ostream</tt>'s definition. The easiest way to do
this is to wrap <tt class="classname">null_ostream</tt>'s header
file with the macro in the test source file:</p>
<pre class="programlisting">
// nullostreamtest.h
#define new ELEPHANTNEW
#include &quot;nullostream.h&quot;
#undef new
</pre>
<div class="sidebar">
<p class="title c2">Elephant: C++ Memory Observer</p>
<p>A full discussion of the design of Elephant is beyond the scope
of this case study, but the principles on which it is based are
simple and easy to explain. Elephant consists of two main
components:</p>
<div class="variablelist">
<dl>
<dt><span class="term"><tt class="methodname">new</tt> / <tt class=
"methodname">delete</tt> overloads:</span></dt>
<dd>
<p>Elephant has a total of eight pairs of <tt class=
"methodname">new</tt> / <tt class="methodname">delete</tt>
overloads. As well as allocating and freeing memory, each overload
registers its invocation with the memory monitor by passing the
address of the memory that has been allocated or freed. Four of the
eight new overloads also pass the line and file from which
<tt class="methodname">new</tt> was invoked.</p>
</dd>
<dt><span class="term">Memory monitor:</span></dt>
<dd>
<p>Calls to the <tt class="methodname">new</tt> / <tt class=
"methodname">delete</tt> overloads are monitored by the memory
monitor. The memory monitor is observer-compatible and users of
Elephant can write custom observers (or use those provided) and
register them with the memory monitor. Every time memory is
allocated or freed via the <tt class="methodname">new</tt> /
<tt class="methodname">delete</tt> overloads each observer is
notified and passed the memory address and, where available, the
line and file from which <tt class="methodname">new</tt> was
invoked.</p>
</dd>
</dl>
</div>
</div>
<p>In order to make sure that <tt class=
"methodname">OnAllocate</tt> only registers allocations from
<tt class="classname">null_ostream</tt>, a variable must be
introduced into <tt class="classname">null_ostream</tt>'s header
file:</p>
<pre class="programlisting">
const char* const null_ostream_header
                                  = __FILE__;
</pre>
<p>An ideal solution would not require the <tt class=
"classname">null_ostream</tt> header to be modified at all for
testing. However I could not find a satisfactory alternative.
Suggestions will be gratefully received.</p>
<p>Moving <tt class="function">CharNullOStreamTest</tt> and
<tt class="function">WideNullOStreamTest</tt> into a class, and
giving them new names to better represent what they now test for,
allows <tt class="classname">NewDetector</tt> to be added as a
member, and using Aeryn's <tt class="function">incarnate</tt>
function allows a new instance to be created for each test function
call.</p>
<pre class="programlisting">
class NullOStreamTest {
private:
  NewDetector newDetector_;

public:
  NullOStreamTest()
    : newDetector_() {
    using namespace elephant;
    MemoryMonitorHolder().Instance().
                AddObserver(&amp;newDetector_);
  }

  ~NullOStreamTest() {
    using namespace elephant;
    MemoryMonitorHolder().Instance().
                RemoveObserver(&amp;newDetector_);
  }

  void NoMemoryAllocatedTest() {
    cnullostream ns;
    ns &lt;&lt; testString &lt;&lt; testChar
       &lt;&lt; std::endl;
    IS_FALSE(
          newDetector_.AllocationsOccurred());
  }

  void NoMemoryAllocatedWideTest() {
    wnullostream wns;
    wns &lt;&lt; wtestString &lt;&lt; wtestChar
        &lt;&lt; std::endl;
    IS_FALSE(
          newDetector_.AllocationsOccurred());
  }
};
</pre></div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e303" id="d0e303"></a>Multi Output
Stream</h2>
</div>
<p>Problem 2 can be solved with what I have called a multi output
stream. A multi output stream forwards anything that is streamed to
it onto any number of other output streams. To solve the problem
faced by Aeryn the multi output stream could simply hold references
to two streams (one verbose, one minimal) as members, but this
could potentially restrict future use when more than two streams
may be required.</p>
<p>Again, the key is the output buffer. The first element to
consider is how the multiple output streams, or at least some sort
of reference to them, will be stored and how they will be added to
and removed from the store. The easiest way to store the output
streams is in a vector of <tt class="classname">basic_ostream</tt>
pointers.</p>
<p>The original design for the multi output stream I came up with
managed the lifetime of the output streams as well. This involved
the output streams being created on the heap and managed by a
vector of smart pointers. Therefore a smart pointer either had to
be written or a dependency on a library such as boost [<a href=
"#">boost</a>] introduced. As the lifetime of the multi output
stream would be the same or very similar to the lifetime of the
output streams there was really no need.</p>
<p>The easiest way to add and remove output streams is by way of an
<tt class="function">add</tt> function and a <tt class=
"function">remove</tt> function. This functionality is shown in the
code below.</p>
<pre class="programlisting">
template&lt;typename char_type, typename traits
               = std::char_traits&lt;char_type&gt; &gt;
class multioutbuf : public
               std::basic_streambuf&lt;char_type,
                                    traits&gt; {
private:
  typedef std::vector&lt;std::basic_ostream&lt;
                         char_type, traits&gt;* &gt;
                         stream_container;
  typedef typename stream_container::iterator
                         iterator;
  stream_container streams_;

public:
  void add(std::basic_ostream&lt;char_type,
                              traits&gt;&amp; str) {
    streams_.push_back(&amp;str);
  }

  void remove(std::basic_ostream&lt;char_type,
                               traits&gt;&amp; str) {
    iterator pos = std::find(streams_.begin(),
                        streams_.end(), &amp;str);

    if(pos != streams_.end()) {
      streams_.erase(pos);
    }
  }
};
</pre>
<p>The <tt class="function">add</tt> function simply adds a pointer
to the specified output stream to the store. The <tt class=
"function">remove</tt> function must first check that a pointer to
the specified output stream exists in the store, before removing
it.</p>
<p>Josuttis describes the <tt class=
"classname">std::basic_streambuf</tt> virtual functions that should
be overridden in a custom output buffer: <tt class=
"methodname">overflow</tt> for writing single characters and
<tt class="methodname">xsputn</tt> for efficient writing of
multiple characters.</p>
<pre class="programlisting">
template&lt;typename char_type, typename traits
               = std::char_traits&lt;char_type&gt; &gt;
class multioutbuf : public
               std::basic_streambuf&lt;char_type,
                                    traits&gt; {
  ...
protected:
  virtual std::streamsize xsputn(
                    const char_type* sequence,
                    std::streamsize num) {
    iterator current = streams_.begin();
    iterator end = streams_.end();

    for(; current != end; ++current) {
      (*current)-&gt;write(sequence, num);
    }

    return num;
  }

  virtual int_type overflow(int_type c) {
    iterator current = streams_.begin();
    iterator end = streams_.end();

    for(; current != end; ++current) {
      (*current)-&gt;put(c);
    }

    return c;
  }
};
</pre>
<p>A different approach would be to write three function objects
and use <tt class="function">for_each</tt> to call the appropriate
function for each output stream in the store. However, this would
not add a lot to the clarity and would not provide any better
performance, but would create a lot of extra code.</p>
<p>The output buffer must be initialised and passed to an output
stream and the output stream needs to have corresponding <tt class=
"function">add</tt> and <tt class="function">remove</tt> functions
that forward to the output buffer's functions:</p>
<pre class="programlisting">
template&lt;typename char_type, typename traits&gt;
class multioutbuf_init {
private:
  multioutbuf&lt;char_type, traits&gt; buf_;

public:
  multioutbuf&lt;char_type, traits&gt;* buf() {
    return &amp;buf_;
  }
};

template&lt;typename char_type, typename traits
               = std::char_traits&lt;char_type&gt; &gt;
class multiostream : private
       multioutbuf_init&lt;char_type, traits&gt;, 
      public
       std::basic_ostream&lt;char_type, traits&gt; {
private:
  typedef multioutbuf_init&lt;char_type, traits&gt;
                             multioutbuf_init;

public:
  multiostream() : multioutbuf_init(), 
         std::basic_ostream&lt;char_type,
           traits&gt;(multioutbuf_init::buf()) {}
  bool add(std::basic_ostream&lt;char_type,
                              traits&gt;&amp; str) {
    return multioutbuf_init::buf()
                              -&gt;add(str);
  }

  bool remove(std::basic_ostream&lt;char_type,
                              traits&gt;&amp; str) {
    return multioutbuf_init::buf()
                              -&gt;remove(str);
  }
};
</pre>
<p>All that remains is to provide two convenient typedefs, one for
<tt class="type">char</tt> and one for <tt class=
"type">wchar_t</tt>:</p>
<pre class="programlisting">
typedef multi_ostream&lt;char&gt; cmultiostream;
typedef multi_ostream&lt;wchar_t&gt; wmultiostream;
</pre>
<p>The multi output stream is quite easy to test and should be
tested for the following things:</p>
<div class="orderedlist">
<ol type="1">
<li>
<p>Output streams can be added to the multi output stream.</p>
</li>
<li>
<p>All added output streams receive what is sent to the multi
output stream.</p>
</li>
<li>
<p>Streams can be removed from the multi output stream.</p>
</li>
</ol>
</div>
<p>Although this looks likes three separate tests they are all
linked and the easiest thing to do is to write a single test for
<tt class="type">char</tt>:</p>
<pre class="programlisting">
void CharMultiOStreamTest() {
  std::stringstream os1;
  std::stringstream os2;

  cmultiostream ms;
  ms.add(os1);
  ms.add(os2);
  ms &lt;&lt; &quot;Hello, World&quot;;

  IS_EQUAL(os1.str(), &quot;Hello, World&quot;);
  IS_EQUAL(os2.str(), &quot;Hello, World&quot;);

  ms.remove(os1);
  ms &lt;&lt; '!'

  IS_EQUAL(os1.str(), &quot;Hello, World&quot;);
  IS_EQUAL(os2.str(), &quot;Hello, World!&quot;);
}
</pre>
<p>and a single test for <tt class="type">wchar_t</tt>:</p>
<pre class="programlisting">
void WideMultiOStreamTest() {
  std::wstringstream wos1;
  std::wstringstream wos2;

  wmultiostream wms;
  wms.add(wos1);
  wms.add(wos2);
  wms &lt;&lt; L&quot;Hello, World&quot;;
  IS_EQUAL(wos1.str(), L&quot;Hello, World&quot;);
  IS_EQUAL(L&quot;Hello, World&quot;, wos2.str());

  wms.remove(wos1);
  wms &lt;&lt; '!';

  IS_EQUAL(L&quot;Hello, World&quot;, wos1.str());
  IS_EQUAL(L&quot;Hello, World!&quot;, wos2.str());
}
</pre></div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e400" id=
"d0e400"></a>Conclusion</h2>
</div>
<p>Streams are a hugely powerful part of the C++ language; which
few people seem to make use of and even fewer people customise for
their own uses. The <tt class="classname">null_ostream</tt> and
<tt class="classname">multi_ostream</tt> are very simple examples
of customisation and I have shown here just how easy stream
customisation is.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e411" id=
"d0e411"></a>Acknowledgements</h2>
</div>
<p>Thank you to Jez Higgins, Alan Stokes, Phil Bass, Alan
Griffiths, Alisdair Meredith and Kevlin Henney for their comments
at various stages of this case study.</p>
</div>
<div class="bibliography">
<div class="titlepage">
<h2><a name="d0e416" id="d0e416"></a>References</h2>
</div>
<div class="bibliomixed"><a name="Aeryn" id="Aeryn"></a>
<p class="bibliomixed">[Aeryn] Aeryn: C++ Testing Framework.
<span class="bibliomisc"><a href=
"http://www.paulgrenyer.co.uk/aeryn/" target=
"_top">http://www.paulgrenyer.co.uk/aeryn/</a></span></p>
</div>
<div class="bibliomixed"><a name="Josuttis" id="Josuttis"></a>
<p class="bibliomixed">[Josuttis] Nicolai M. Josuttis, <span class=
"citetitle"><i class="citetitle">The C++ Standard
Library</i></span>, Addison-Wesley, ISBN: 0-201-37926-0.</p>
</div>
<div class="bibliomixed"><a name="Null_Object" id=
"Null_Object"></a>
<p class="bibliomixed">[Null_Object] Kevlin Henney. Null Object,
Something for Nothing, <span class="bibliomisc"><a href=
"http://www.two-sdg.demon.co.uk/curbralan/%20papers/europlop/NullObject.pdf"
target="_top">http://www.two-sdg.demon.co.uk/curbralan/
papers/europlop/NullObject.pdf</a></span></p>
</div>
<div class="bibliomixed"><a name="CppStandard" id=
"CppStandard"></a>
<p class="bibliomixed">[CppStandard] <span class=
"citetitle"><i class="citetitle">The C++ Standard</i></span>, John
Wiley and Sons Ltd. ISBN: 0-470-84674-7.</p>
</div>
<div class="bibliomixed"><a name="Elephant" id="Elephant"></a>
<p class="bibliomixed">[Elephant] Elephant: C++ Memory Observer:
<span class="bibliomisc"><a href=
"http://www.paulgrenyer.dyndns.org/elephant/" target=
"_top">http://www.paulgrenyer.dyndns.org/elephant/</a></span></p>
</div>
<div class="bibliomixed"><a name="Boost" id="Boost"></a>
<p class="bibliomixed">[Boost] Boost. <span class=
"bibliomisc"><a href="http://www.boost.org/" target=
"_top">http://www.boost.org/</a></span></p>
</div>
</div>
</p>
<p><strong>Notes:</strong>&nbsp;C++ output streams ostream</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
