\class cmXMLSafe * \brief Write strings to XML with proper escapes */
| 11 | * \brief Write strings to XML with proper escapes |
| 12 | */ |
| 13 | class cmXMLSafe |
| 14 | { |
| 15 | public: |
| 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 | |
| 29 | private: |
| 30 | char const* Data; |
| 31 | unsigned long Size; |
| 32 | bool DoQuotes; |
| 33 | friend std::ostream& operator<<(std::ostream&, cmXMLSafe const&); |
| 34 | }; |
no outgoing calls
no test coverage detected
searching dependent graphs…