stream.h 426 Bytes
Newer Older
1
2
3
4
5
6
7
#pragma once

#include <ios>
#include <string>

namespace YAML
{
8
	class Stream
9
	{
10
11
12
	public:
		Stream(std::istream& input);
		~Stream();
13

14
15
		operator bool() const;
		bool operator !() const { return !static_cast <bool>(*this); }
16

17
		const char *current() const { return buffer + pos; }
18
19
20
21
22
		char peek();
		char get();
		std::string get(int n);
		void eat(int n = 1);

23
24
25
26
		int pos, line, column, size;
	
	private:
		char *buffer;
27
28
	};
}