#include <messageRedirection.h>
Public Member Functions | |
StdRedirector (std::ostream &a_Stream, pfncb a_Cb, void *a_pUsrData) | |
~StdRedirector () | |
std::streamsize | xsputn (const Elem *_Ptr, std::streamsize _Count) |
Tr::int_type | overflow (typename Tr::int_type v) |
Protected Attributes | |
std::basic_ostream< Elem, Tr > & | m_Stream |
std::streambuf * | m_pBuf |
pfncb | m_pCbFunc |
void * | m_pUserData |
Private Types | |
typedef void(* | pfncb )(const Elem *, std::streamsize _Count, void *pUsrData) |
typedef void(* StdRedirector< Elem, Tr >::pfncb)(const Elem *, std::streamsize _Count, void *pUsrData) [private] |
Callback Function.
StdRedirector< Elem, Tr >::StdRedirector | ( | std::ostream & | a_Stream, | |
pfncb | a_Cb, | |||
void * | a_pUsrData | |||
) | [inline] |
Constructor.
a_Stream | the stream to redirect | |
a_Cb | the callback function | |
a_pUsrData | user data passed to callback |
StdRedirector< Elem, Tr >::~StdRedirector | ( | ) | [inline] |
Destructor. Restores the original stream.
Tr::int_type StdRedirector< Elem, Tr >::overflow | ( | typename Tr::int_type | v | ) | [inline] |
Override overflow and make it forward data to the callback function.
std::streamsize StdRedirector< Elem, Tr >::xsputn | ( | const Elem * | _Ptr, | |
std::streamsize | _Count | |||
) | [inline] |
Override xsputn and make it forward data to the callback function.
std::streambuf* StdRedirector< Elem, Tr >::m_pBuf [protected] |
pfncb StdRedirector< Elem, Tr >::m_pCbFunc [protected] |
void* StdRedirector< Elem, Tr >::m_pUserData [protected] |
std::basic_ostream<Elem, Tr>& StdRedirector< Elem, Tr >::m_Stream [protected] |