#pragma once #include #include #include #include namespace nix { using std::string; using std::map; using std::list; typedef map XMLAttrs; class XMLWriter { private: std::ostream & output; bool indent; bool closed; list pendingElems; public: XMLWriter(bool indent, std::ostream & output); ~XMLWriter(); void close(); void openElement(const string & name, const XMLAttrs & attrs = XMLAttrs()); void closeElement(); void writeEmptyElement(const string & name, const XMLAttrs & attrs = XMLAttrs()); private: void writeAttrs(const XMLAttrs & attrs); void indent_(unsigned int depth); }; class XMLOpenElement { private: XMLWriter & writer; public: XMLOpenElement(XMLWriter & writer, const string & name, const XMLAttrs & attrs = XMLAttrs()) : writer(writer) { writer.openElement(name, attrs); } ~XMLOpenElement() { writer.closeElement(); } }; } bs'> aboutsummaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2018-10-18services: dhcp-client: Deprecate 'dhcp-client-service' procedure....Ludovic Courtès
2018-06-13tests: Honor the return value of 'start-service'....Clément Lassieur
2018-06-01marionette: Add 'wait-for-tcp-port'....Ludovic Courtès
2017-07-20tests: Use 'virtual-machine' records instead of monadic procedures....Ludovic Courtès
2017-04-16tests: dicod: Bail out if we cannot connect within 20 seconds....Ludovic Courtès
2017-04-01tests: Add GNU dicod test....Ludovic Courtès