summaryrefslogtreecommitdiff
path: root/src/value.h
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-11-07 02:59:40 (GMT)
committerMarius Kintel <marius@kintel.net>2011-11-07 02:59:40 (GMT)
commitf73b8289f6db33713ae0f838649b47b56024f0ff (patch)
tree25bfcb21f98334551de15bcf83be476dc318def4 /src/value.h
parent7bec474b34011dcb0c417ad09d6c84bd833f7535 (diff)
Correctly escape special characters in dumped strings. Fixes dumptest_import_dxf-tests
Diffstat (limited to 'src/value.h')
-rw-r--r--src/value.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/value.h b/src/value.h
index f81d28e..a2cfbdf 100644
--- a/src/value.h
+++ b/src/value.h
@@ -4,12 +4,21 @@
#include <vector>
#include <string>
-class Filename : public std::string
+class QuotedString : public std::string
{
public:
- Filename() : std::string() {}
- Filename(const std::string &f) : std::string(f) {}
+ QuotedString() : std::string() {}
+ QuotedString(const std::string &s) : std::string(s) {}
};
+std::ostream &operator<<(std::ostream &stream, const QuotedString &s);
+
+class Filename : public QuotedString
+{
+public:
+ Filename() : QuotedString() {}
+ Filename(const std::string &f) : QuotedString(f) {}
+};
+std::ostream &operator<<(std::ostream &stream, const Filename &filename);
class Value
{
@@ -77,6 +86,5 @@ private:
};
std::ostream &operator<<(std::ostream &stream, const Value &value);
-std::ostream &operator<<(std::ostream &stream, const Filename &filename);
#endif
contact: Jan Huwald // Impressum