summaryrefslogtreecommitdiff
path: root/src/user/lib/fwik/include/IO/IOStream.h
blob: e9ae2464e1f126b8a61e97f8e6ae9611f12266f5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef DEF_FWIK_IO_IOSTREAM_H
#define DEF_FWIK_IO_IOSTREAM_H

#include "Term.h"

class IOStream {
	public:
	Term *term;

	IOStream() : term(0) {}
	IOStream(Term *t) : term(t) {}

	void print(char* str);
	void printf(char* fmt, ...);
	char* readln();

	IOStream &operator<<(char* s) {
		print(s);
		return *this;
	}
	IOStream &operator<<(int i) {
		printf("%d", i);
		return *this;
	}
	IOStream &operator<<(void* p) {
		printf("%p", p);
		return *this;
	}
};

extern IOStream stdio;

#endif