From 87051183eea0f573bd4f3521446d7eb4da4622be Mon Sep 17 00:00:00 2001 From: Baptiste Lepilleur Date: Wed, 1 Sep 2004 19:17:36 +0000 Subject: Include/cppunit/XmlOutputter. include/cppunit/XmlOutputter.h: * include/cppunit/tools/XmlDocument.h * src/cppunit/XmlDocument.cpp: * src/cppunit/XmlOutputter.cpp: integrated patch #997006 from Akos Maroy. This patch makes the 'standalone' attribute in XML header optional. --- include/cppunit/XmlOutputter.h | 9 +++++++++ include/cppunit/tools/XmlDocument.h | 15 +++++++++++++++ 2 files changed, 24 insertions(+) (limited to 'include/cppunit') diff --git a/include/cppunit/XmlOutputter.h b/include/cppunit/XmlOutputter.h index 4034d2e..0de9676 100644 --- a/include/cppunit/XmlOutputter.h +++ b/include/cppunit/XmlOutputter.h @@ -75,6 +75,15 @@ public: */ virtual void setStyleSheet( const std::string &styleSheet ); + /*! \brief set the output document as standalone or not. + * + * For the output document, specify wether it's a standalone XML + * document, or not. + * + * \param standalone if true, the output will be specified as standalone. + * if false, it will be not. + */ + virtual void setStandalone( bool standalone ); typedef CppUnitMap > FailedTests; diff --git a/include/cppunit/tools/XmlDocument.h b/include/cppunit/tools/XmlDocument.h index 8d3f0c7..4ee7325 100644 --- a/include/cppunit/tools/XmlDocument.h +++ b/include/cppunit/tools/XmlDocument.h @@ -21,6 +21,8 @@ class XmlElement; * * A XmlDocument represents a XML file. It holds a pointer on the root XmlElement * of the document. It also holds the encoding and style sheet used. + * + * By default, the XML document is stand-alone and tagged with enconding "ISO-8859-1". */ class CPPUNIT_API XmlDocument { @@ -42,6 +44,18 @@ public: std::string styleSheet() const; void setStyleSheet( const std::string &styleSheet = "" ); + bool standalone() const; + + /*! \brief set the output document as standalone or not. + * + * For the output document, specify wether it's a standalone XML + * document, or not. + * + * \param standalone if true, the output will be specified as standalone. + * if false, it will be not. + */ + void setStandalone( bool standalone ); + void setRootElement( XmlElement *rootElement ); XmlElement &rootElement() const; @@ -58,6 +72,7 @@ protected: std::string m_encoding; std::string m_styleSheet; XmlElement *m_rootElement; + bool m_standalone; }; -- cgit v1.2.1