Skip to content
Snippets Groups Projects
Commit af0e76de authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Add memory buffer (drop-in replacement for kout/stdout)

parent 90664ba8
No related branches found
No related tags found
No related merge requests found
#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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment