StreamRedirector< Elem, Tr > Class Template Reference

#include <StreamRedirector.h>

List of all members.

Public Member Functions

 StreamRedirector (std::ostream &a_Stream)
 ~StreamRedirector ()
std::streamsize xsputn (const Elem *_Ptr, std::streamsize _Count)
Tr::int_type overflow (typename Tr::int_type v)

Protected Attributes

std::string value
std::basic_ostream< Elem,
Tr > & 
m_Stream
std::streambuf * m_pBuf
pfncb m_pCbFunc
void * m_pUserData


Detailed Description

template<class Elem = char, class Tr = std::char_traits<Elem>>
class StreamRedirector< Elem, Tr >

Definition at line 2 of file StreamRedirector.h.


Constructor & Destructor Documentation

template<class Elem = char, class Tr = std::char_traits<Elem>>
StreamRedirector< Elem, Tr >::StreamRedirector ( std::ostream &  a_Stream  )  [inline]

Constructor.

Parameters:
a_Stream the stream to redirect

Definition at line 9 of file StreamRedirector.h.

template<class Elem = char, class Tr = std::char_traits<Elem>>
StreamRedirector< Elem, Tr >::~StreamRedirector (  )  [inline]

Destructor. Restores the original stream.

Definition at line 20 of file StreamRedirector.h.


Member Function Documentation

template<class Elem = char, class Tr = std::char_traits<Elem>>
Tr::int_type StreamRedirector< Elem, Tr >::overflow ( typename Tr::int_type  v  )  [inline]

Override overflow and make it forward data to the callback function.

Definition at line 37 of file StreamRedirector.h.

template<class Elem = char, class Tr = std::char_traits<Elem>>
std::streamsize StreamRedirector< Elem, Tr >::xsputn ( const Elem *  _Ptr,
std::streamsize  _Count 
) [inline]

Override xsputn and make it forward data to the callback function.

Definition at line 28 of file StreamRedirector.h.


Member Data Documentation

template<class Elem = char, class Tr = std::char_traits<Elem>>
std::streambuf* StreamRedirector< Elem, Tr >::m_pBuf [protected]

Definition at line 48 of file StreamRedirector.h.

Referenced by StreamRedirector< Elem, Tr >::StreamRedirector(), and StreamRedirector< Elem, Tr >::~StreamRedirector().

template<class Elem = char, class Tr = std::char_traits<Elem>>
pfncb StreamRedirector< Elem, Tr >::m_pCbFunc [protected]

Definition at line 49 of file StreamRedirector.h.

Referenced by StreamRedirector< Elem, Tr >::overflow(), and StreamRedirector< Elem, Tr >::xsputn().

template<class Elem = char, class Tr = std::char_traits<Elem>>
void* StreamRedirector< Elem, Tr >::m_pUserData [protected]

Definition at line 50 of file StreamRedirector.h.

Referenced by StreamRedirector< Elem, Tr >::overflow(), and StreamRedirector< Elem, Tr >::xsputn().

template<class Elem = char, class Tr = std::char_traits<Elem>>
std::basic_ostream<Elem, Tr>& StreamRedirector< Elem, Tr >::m_Stream [protected]

Definition at line 47 of file StreamRedirector.h.

Referenced by StreamRedirector< Elem, Tr >::StreamRedirector(), and StreamRedirector< Elem, Tr >::~StreamRedirector().

template<class Elem = char, class Tr = std::char_traits<Elem>>
std::string StreamRedirector< Elem, Tr >::value [protected]

Definition at line 45 of file StreamRedirector.h.


The documentation for this class was generated from the following file:
Generated on Tue Sep 15 14:48:50 2009 for RoseQtWidgets by  doxygen 1.4.7