[ Lit Window Library at SourceForge[ Lit Window Productions Homepage ]  [ wxWidgets Tips&Tricks ]  [  wxVisualSetup ]

Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

template_redirect_streambuf Class Template Reference

This template class can be inserted into the logging stream to route the log output to a Printer. More...

List of all members.

Public Types

typedef Printer printer_t

Public Member Functions

void insert (std::ostream &where)
 Insert the redirector into a stream.
void remove ()
 Remove the redirector from the stream.
void set_linewise (bool enabled=true)
 Set or clear the linewise flag.
void set_passthrough (bool enabled=true)
 Set or clear the passthrough flag.
 template_redirect_streambuf (printer_t _printer)
virtual ~template_redirect_streambuf ()

Protected Member Functions

virtual int overflow (int _Meta)

Protected Attributes

std::string m_line
bool m_linewise
std::streambuf * m_original_stream
bool m_passthrough
printer_t m_printer
std::ostream * m_redirected_ios


Detailed Description

template<class Printer>
class template_redirect_streambuf< Printer >

The Printer class is a function object that takes a const char* parameter as input and returns void. The following options determine the behaviour:


Member Typedef Documentation

typedef Printer printer_t
 


Constructor & Destructor Documentation

template_redirect_streambuf printer_t  _printer  ) 
 

virtual ~template_redirect_streambuf  )  [virtual]
 


Member Function Documentation

void insert std::ostream &  where  ) 
 

virtual int overflow int  _Meta  )  [protected, virtual]
 

void remove  ) 
 

void set_linewise bool  enabled = true  ) 
 

void set_passthrough bool  enabled = true  ) 
 


Member Data Documentation

std::string m_line [protected]
 

bool m_linewise [protected]
 

std::streambuf* m_original_stream [protected]
 

bool m_passthrough [protected]
 

printer_t m_printer [protected]
 

std::ostream* m_redirected_ios [protected]
 


Copyright 2004, Hajo Kirchhoff, Lit Window Productions