Merged emitter branch into trunk, changes r105:r151

This commit is contained in:
Jesse Beder
2009-05-22 21:52:31 +00:00
parent b3a5a519f2
commit 9245f9253a
20 changed files with 2478 additions and 37 deletions

31
include/ostream.h Normal file
View File

@@ -0,0 +1,31 @@
#pragma once
#include <string>
namespace YAML
{
class ostream
{
public:
ostream();
~ostream();
void reserve(unsigned size);
void put(char ch);
const char *str() const { return m_buffer; }
unsigned row() const { return m_row; }
unsigned col() const { return m_col; }
private:
char *m_buffer;
unsigned m_pos;
unsigned m_size;
unsigned m_row, m_col;
};
ostream& operator << (ostream& out, const char *str);
ostream& operator << (ostream& out, const std::string& str);
ostream& operator << (ostream& out, char ch);
}