diff -r 08b64ae5a564 -r 6e1027a05d73 lemon/bits/item_writer.h --- a/lemon/bits/item_writer.h Thu Apr 19 15:12:59 2007 +0000 +++ b/lemon/bits/item_writer.h Thu Apr 19 15:14:34 2007 +0000 @@ -31,6 +31,9 @@ #include #include #include +#include + +#include namespace lemon { @@ -146,13 +149,14 @@ /// /// Constructor for the writer. If the given parameter is true /// the writer creates escape sequences from special characters. - QuotedStringWriter(bool _escaped = true) : escaped(_escaped) {} + QuotedStringWriter(bool _escaped = true, char _quote = '\"') + : escaped(_escaped), quote(_quote) {} /// \brief Writes a quoted string to the given stream. /// /// Writes a quoted string to the given stream. void write(std::ostream& os, const std::string& value) const { - os << "\""; + os << quote; if (escaped) { std::ostringstream ls; for (int i = 0; i < int(value.size()); ++i) { @@ -162,7 +166,7 @@ } else { os << value; } - os << "\""; + os << quote; } private: @@ -213,6 +217,7 @@ } private: bool escaped; + char quote; }; /// \ingroup item_io