1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
15 #include <cmsys/stl/string>
16 #include <cmsys/ios/iosfwd>
19 * \brief Write strings to XML with proper escapes
24 /** Construct with the data to be written. This assumes the data
25 will exist for the duration of this object's life. */
26 cmXMLSafe(const char* s);
27 cmXMLSafe(cmsys_stl::string const& s);
29 /** Specify whether to escape quotes too. This is needed when
30 writing the content of an attribute value. By default quotes
32 cmXMLSafe& Quotes(bool b = true);
34 /** Get the escaped data as a string. */
35 cmsys_stl::string str();
40 friend cmsys_ios::ostream& operator<<(cmsys_ios::ostream&,