Voxellancer
0.3
A game about voxels in space
Main Page
Related Pages
Classes
Files
File List
All
Classes
Functions
Pages
streamredirect.h
1
#pragma once
2
3
#include <iostream>
4
#include <streambuf>
5
#include <string>
6
7
8
class
HUD
;
9
10
class
StreamRedirect
:
public
std::basic_streambuf<char> {
11
public
:
12
StreamRedirect
(std::ostream &stream,
HUD
*hud,
bool
copy =
false
);
13
~
StreamRedirect
();
14
15
protected
:
16
virtual
int_type overflow(int_type v)
override
;
17
virtual
std::streamsize xsputn(
const
char
*p, std::streamsize n)
override
;
18
19
private
:
20
std::ostream &m_stream;
21
std::ostream *m_old_wrap;
22
std::streambuf *m_old_buf;
23
std::string m_string;
24
bool
m_copy;
25
HUD
* m_hud;
26
};
StreamRedirect
Definition:
streamredirect.h:10
HUD
Definition:
hud.h:34
src
ui
streamredirect.h
Generated on Sun Mar 30 2014 13:32:31 for Voxellancer by
1.8.6