Renamed ostream -> ostream_wrapper

This commit is contained in:
Jesse Beder
2012-05-25 17:28:35 -05:00
parent 2dd1cf4596
commit 1602f78974
6 changed files with 47 additions and 47 deletions

View File

@@ -107,7 +107,7 @@ namespace YAML
return true;
}
void WriteCodePoint(ostream& out, int codePoint) {
void WriteCodePoint(ostream_wrapper& out, int codePoint) {
if (codePoint < 0 || codePoint > 0x10FFFF) {
codePoint = REPLACEMENT_CHARACTER;
}
@@ -185,7 +185,7 @@ namespace YAML
return true;
}
void WriteDoubleQuoteEscapeSequence(ostream& out, int codePoint) {
void WriteDoubleQuoteEscapeSequence(ostream_wrapper& out, int codePoint) {
static const char hexDigits[] = "0123456789abcdef";
char escSeq[] = "\\U00000000";
@@ -208,7 +208,7 @@ namespace YAML
out << escSeq;
}
bool WriteAliasName(ostream& out, const std::string& str) {
bool WriteAliasName(ostream_wrapper& out, const std::string& str) {
int codePoint;
for(std::string::const_iterator i = str.begin();
GetNextCodePointAndAdvance(codePoint, i, str.end());
@@ -247,7 +247,7 @@ namespace YAML
return StringFormat::DoubleQuoted;
}
bool WriteSingleQuotedString(ostream& out, const std::string& str)
bool WriteSingleQuotedString(ostream_wrapper& out, const std::string& str)
{
out << "'";
int codePoint;
@@ -267,7 +267,7 @@ namespace YAML
return true;
}
bool WriteDoubleQuotedString(ostream& out, const std::string& str, bool escapeNonAscii)
bool WriteDoubleQuotedString(ostream_wrapper& out, const std::string& str, bool escapeNonAscii)
{
out << "\"";
int codePoint;
@@ -297,7 +297,7 @@ namespace YAML
return true;
}
bool WriteLiteralString(ostream& out, const std::string& str, int indent)
bool WriteLiteralString(ostream_wrapper& out, const std::string& str, int indent)
{
out << "|\n";
out << IndentTo(indent);
@@ -314,7 +314,7 @@ namespace YAML
return true;
}
bool WriteChar(ostream& out, char ch)
bool WriteChar(ostream_wrapper& out, char ch)
{
if(('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z'))
out << ch;
@@ -334,7 +334,7 @@ namespace YAML
return true;
}
bool WriteComment(ostream& out, const std::string& str, int postCommentIndent)
bool WriteComment(ostream_wrapper& out, const std::string& str, int postCommentIndent)
{
const unsigned curIndent = out.col();
out << "#" << Indentation(postCommentIndent);
@@ -354,19 +354,19 @@ namespace YAML
return true;
}
bool WriteAlias(ostream& out, const std::string& str)
bool WriteAlias(ostream_wrapper& out, const std::string& str)
{
out << "*";
return WriteAliasName(out, str);
}
bool WriteAnchor(ostream& out, const std::string& str)
bool WriteAnchor(ostream_wrapper& out, const std::string& str)
{
out << "&";
return WriteAliasName(out, str);
}
bool WriteTag(ostream& out, const std::string& str, bool verbatim)
bool WriteTag(ostream_wrapper& out, const std::string& str, bool verbatim)
{
out << (verbatim ? "!<" : "!");
StringCharSource buffer(str.c_str(), str.size());
@@ -386,7 +386,7 @@ namespace YAML
return true;
}
bool WriteTagWithPrefix(ostream& out, const std::string& prefix, const std::string& tag)
bool WriteTagWithPrefix(ostream_wrapper& out, const std::string& prefix, const std::string& tag)
{
out << "!";
StringCharSource prefixBuffer(prefix.c_str(), prefix.size());
@@ -416,7 +416,7 @@ namespace YAML
return true;
}
bool WriteBinary(ostream& out, const Binary& binary)
bool WriteBinary(ostream_wrapper& out, const Binary& binary)
{
WriteDoubleQuotedString(out, EncodeBase64(binary.data(), binary.size()), false);
return true;