streamable.h File Reference

This file defines the Ostreamable template and the StreableString class. More...

#include <fstream>
#include <cxxtls/classTraits.h>
Include dependency graph for streamable.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  Ostreamable< Derived, charT, traits >
 A base class that hooks up a derived class to the ostream i/o operation set. To give your class the ability to act like an ostream, derive from Ostreamble<Derived> and implement the ostreamable_helper(charT c) function that outputs a single character. More...
class  OstreamableBuffer< Owner, charT, traits >
 a trivial implementation of a stream buffer that only just routes the overflow() behavior (that prints characters) to class that owns the OstreamableBuffer More...
class  StreamableString
 This class implements a quick and dirty way to create formatted strings -- it is simpler to use that strstream but may be slower if you are working on large streams. This kind of string is appropriate for quick formatting activities. More...


namespace  cxxtls

The namespace that encapsulates most of the functionality in the CXX toolkit.

Detailed Description

This file defines the Ostreamable template and the StreableString class.

The Ostreamable<Derived> template's job is to serve as a 'mixin' class. That is, you derive from Ostreamable for the purpose of having functions added into your class -- rather than for for the purpose of defining your class to be a 'Ostreamable' object.

The class, StreamableString, adds 'Ostreamable' to 'stdstring' to give a quick and dirty way to construct formatted strings. May not be fast -- who knows.

Definition in file streamable.h.

Generated on Wed Feb 29 22:51:09 2012 for CXXUtilities by  doxygen 1.6.3