00001 #ifndef CPPUNIT_TOOLS_XMLDOCUMENT_H
00002 #define CPPUNIT_TOOLS_XMLDOCUMENT_H
00003
00004 #include <cppunit/Portability.h>
00005
00006 #if CPPUNIT_NEED_DLL_DECL
00007 #pragma warning( push )
00008 #pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z
00009 #endif
00010
00011 #include <string>
00012
00013
00014 CPPUNIT_NS_BEGIN
00015
00016
00017 class XmlElement;
00018
00019
00025 class CPPUNIT_API XmlDocument
00026 {
00027 public:
00033 XmlDocument( const std::string &encoding = "",
00034 const std::string &styleSheet = "" );
00035
00037 virtual ~XmlDocument();
00038
00039 std::string encoding() const;
00040 void setEncoding( const std::string &encoding = "" );
00041
00042 std::string styleSheet() const;
00043 void setStyleSheet( const std::string &styleSheet = "" );
00044
00045 bool standalone(void) const;
00046 void setStandalone(bool standalone);
00047
00048 void setRootElement( XmlElement *rootElement );
00049 XmlElement &rootElement() const;
00050
00051 std::string toString() const;
00052
00053 private:
00055 XmlDocument( const XmlDocument © );
00056
00058 void operator =( const XmlDocument © );
00059
00060 protected:
00061 std::string m_encoding;
00062 std::string m_styleSheet;
00063 XmlElement *m_rootElement;
00064 bool m_standalone;
00065 };
00066
00067
00068 #if CPPUNIT_NEED_DLL_DECL
00069 #pragma warning( pop )
00070 #endif
00071
00072
00073 CPPUNIT_NS_END
00074
00075 #endif // CPPUNIT_TOOLS_XMLDOCUMENT_H