1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmXMLSafe.h,v $
6 Date: $Date: 2009-02-06 14:08:02 $
7 Version: $Revision: 1.2 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
20 #include <cmsys/stl/string>
21 #include <cmsys/ios/iosfwd>
24 * \brief Write strings to XML with proper escapes
29 /** Construct with the data to be written. This assumes the data
30 will exist for the duration of this object's life. */
31 cmXMLSafe(const char* s
);
32 cmXMLSafe(cmsys_stl::string
const& s
);
34 /** Specify whether to escape quotes too. This is needed when
35 writing the content of an attribute value. By default quotes
37 cmXMLSafe
& Quotes(bool b
= true);
39 /** Get the escaped data as a string. */
40 cmsys_stl::string
str();
45 friend cmsys_ios::ostream
& operator<<(cmsys_ios::ostream
&,