summaryrefslogtreecommitdiff
path: root/include/object/stdbuf.h
blob: db3062111faa2449c5b315c24d3d6cae7a416b58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef STDBUF_H
#define STDBUF_H

#include "object/outputstream.h"

template <class T = OutputStream>
class BufferOutput : public T {
	private:
		BufferOutput(const BufferOutput &copy);
		char *buffer;

	public:
		BufferOutput(char *target) { buffer = target; }
		virtual void put(char c) {
			*buffer = c;
			buffer++;
		}
};

#endif