MCPcopy Create free account
hub / github.com/Kitware/CMake / cmXMLSafe

Class cmXMLSafe

Source/cmXMLSafe.h:13–34  ·  view source on GitHub ↗

\class cmXMLSafe * \brief Write strings to XML with proper escapes */

Source from the content-addressed store, hash-verified

11 * \brief Write strings to XML with proper escapes
12 */
13class cmXMLSafe
14{
15public:
16 /** Construct with the data to be written. This assumes the data
17 will exist for the duration of this object's life. */
18 cmXMLSafe(char const* s);
19 cmXMLSafe(std::string const& s);
20
21 /** Specify whether to escape quotes too. This is needed when
22 writing the content of an attribute value. By default quotes
23 are escaped. */
24 cmXMLSafe& Quotes(bool b = true);
25
26 /** Get the escaped data as a string. */
27 std::string str() const;
28
29private:
30 char const* Data;
31 unsigned long Size;
32 bool DoQuotes;
33 friend std::ostream& operator<<(std::ostream&, cmXMLSafe const&);
34};

Callers 2

SafeContentMethod · 0.85
PrepareNamesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…