summaryrefslogtreecommitdiff
path: root/src/utils.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-05-18 01:31:01 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-05-18 01:31:01 -0600
commita38ed141c1f33ecdad99b322acb1ae07b30a5da2 (patch)
treec6555946e2575a6bcb0ae7642673257954e38ac1 /src/utils.h
parent3c3bda19d62eed165b9191dbf1adcb3e7c975356 (diff)
downloadfork-ledger-a38ed141c1f33ecdad99b322acb1ae07b30a5da2.tar.gz
fork-ledger-a38ed141c1f33ecdad99b322acb1ae07b30a5da2.tar.bz2
fork-ledger-a38ed141c1f33ecdad99b322acb1ae07b30a5da2.zip
Switched to Boost.PropertyTree for XML generation
Diffstat (limited to 'src/utils.h')
-rw-r--r--src/utils.h45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/utils.h b/src/utils.h
index 34011e3f..7f5242d9 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -727,51 +727,6 @@ inline string sha1sum(const string& str)
return to_hex(message_digest, 5);
}
-class push_xml
-{
- std::ostream& out;
- string tag;
- bool leave_open;
-
-public:
- push_xml(std::ostream& _out, const string& _tag, bool has_attrs = false,
- bool _leave_open = false)
- : out(_out), tag(_tag), leave_open(_leave_open) {
- out << '<' << tag;
- if (! has_attrs)
- out << '>';
- }
- ~push_xml() {
- if (! leave_open)
- out << "</" << tag << '>';
- }
-
- void close_attrs() {
- out << '>';
- }
-
- static string guard(const string& str) {
- std::ostringstream buf;
- foreach (const char& ch, str) {
- switch (ch) {
- case '<':
- buf << "&lt;";
- break;
- case '>':
- buf << "&gt;";
- break;
- case '&':
- buf << "&amp;";
- break;
- default:
- buf << ch;
- break;
- }
- }
- return buf.str();
- }
-};
-
extern const string version;
} // namespace ledger