Class XmlWriter
Defined in File catch_amalgamated.hpp
Nested Relationships
Nested Types
Class Documentation
-
class XmlWriter
Public Functions
-
XmlWriter(std::ostream &os)
-
~XmlWriter()
-
XmlWriter &startElement(std::string const &name, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent)
-
ScopedElement scopedElement(std::string const &name, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent)
-
XmlWriter &endElement(XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent)
-
XmlWriter &writeAttribute(StringRef name, StringRef attribute)
The attribute content is XML-encoded.
-
XmlWriter &writeAttribute(StringRef name, char const *attribute)
The attribute content is XML-encoded.
-
template<typename T, typename = typename std::enable_if_t<!std::is_convertible<T, StringRef>::value>>
inline XmlWriter &writeAttribute(StringRef name, T const &attribute) The attribute value must provide op<<(ostream&, T). The resulting serialization is XML-encoded
-
XmlWriter &writeText(StringRef text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent)
Writes escaped
text
in a element.
-
XmlWriter &writeComment(StringRef text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent)
Writes XML comment as “<!– text –>”.
-
void ensureTagClosed()
-
class ScopedElement
Public Functions
-
ScopedElement(XmlWriter *writer, XmlFormatting fmt)
-
ScopedElement(ScopedElement &&other) noexcept
-
ScopedElement &operator=(ScopedElement &&other) noexcept
-
~ScopedElement()
-
ScopedElement &writeText(StringRef text, XmlFormatting fmt = XmlFormatting::Newline | XmlFormatting::Indent)
-
ScopedElement &writeAttribute(StringRef name, StringRef attribute)
-
ScopedElement(XmlWriter *writer, XmlFormatting fmt)
-
XmlWriter(std::ostream &os)