Horizon
Loading...
Searching...
No Matches
Catch::XmlWriter Class Reference

Classes

class  ScopedElement

Public Member Functions

 XmlWriter (std::ostream &os)
 XmlWriter (XmlWriter const &)=delete
XmlWriter & operator= (XmlWriter const &)=delete
XmlWriterstartElement (std::string const &name, XmlFormatting fmt=XmlFormatting::Newline|XmlFormatting::Indent)
ScopedElement scopedElement (std::string const &name, XmlFormatting fmt=XmlFormatting::Newline|XmlFormatting::Indent)
XmlWriterendElement (XmlFormatting fmt=XmlFormatting::Newline|XmlFormatting::Indent)
XmlWriterwriteAttribute (StringRef name, StringRef attribute)
 The attribute content is XML-encoded.
XmlWriterwriteAttribute (StringRef name, bool attribute)
 Writes the attribute as "true/false".
XmlWriterwriteAttribute (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>>
XmlWriter & writeAttribute (StringRef name, T const &attribute)
XmlWriterwriteText (StringRef text, XmlFormatting fmt=XmlFormatting::Newline|XmlFormatting::Indent)
 Writes escaped text in a element.
XmlWriterwriteComment (StringRef text, XmlFormatting fmt=XmlFormatting::Newline|XmlFormatting::Indent)
 Writes XML comment as "<!-- text -->".
void writeStylesheetRef (StringRef url)
void ensureTagClosed ()

Member Function Documentation

◆ writeAttribute()

template<typename T, typename = typename std::enable_if_t< !std::is_convertible<T, StringRef>::value>>
XmlWriter & Catch::XmlWriter::writeAttribute ( StringRef name,
T const & attribute )
inline

The attribute value must provide op<<(ostream&, T). The resulting serialization is XML-encoded


The documentation for this class was generated from the following files: