streamredir Class Referenceabstract
Logging and debugguing

base class to redirect output streams More...

`#include <mia/core/streamredir.hh>`

Inherits std::streambuf.

## Public Member Functions

| streamredir ()
virtual | ~streamredir ()

## Protected Member Functions

int | overflow (int c)
int | sync ()
std::streamsize | xsputn (const char *s, std::streamsize n)

## Detailed Description

base class to redirect output streams

This class implements the abstract base class for stream output redirection to e.g. a text window or a console. The specialization must implement the do_put_buffer method, which writes out the characters from begin to end using a function of the output device.

Definition at line 40 of file streamredir.hh.

## Constructor & Destructor Documentation

## streamredir()

streamredir::streamredir | ( |  | ) |

## ~streamredir()

virtual streamredir::~streamredir | ( |  | ) |

virtual

## Member Function Documentation

## overflow()

int streamredir::overflow | ( | int | c | ) |

protected

implement the overflow function to force output of buffer

Parameters

  c | next character to write

Returns
  0

## sync()

int streamredir::sync | ( |  | ) |

protected

Force writing of buffer.

Returns
  0

## xsputn()

std::streamsize streamredir::xsputn | ( | const char * | s,
|  | std::streamsize | n )

protected

implement function to handle newline and return properly

Parameters

  s | string to write
  n | number of bytes in string

Returns
  number of chars written

The documentation for this class was generated from the following file:

- streamredir.hh