CppUnit project page FAQ CppUnit home page

XmlDocument.h

Go to the documentation of this file.
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   void setRootElement( XmlElement *rootElement );
00046   XmlElement &rootElement() const;
00047 
00048   std::string toString() const;
00049 
00050 private:
00052   XmlDocument( const XmlDocument &copy );
00053 
00055   void operator =( const XmlDocument &copy );
00056 
00057 protected:
00058   std::string m_encoding;
00059   std::string m_styleSheet;
00060   XmlElement *m_rootElement;
00061 };
00062 
00063 
00064 #if CPPUNIT_NEED_DLL_DECL
00065 #pragma warning( pop )
00066 #endif
00067 
00068 
00069 CPPUNIT_NS_END
00070 
00071 #endif  // CPPUNIT_TOOLS_XMLDOCUMENT_H

SourceForge Logo hosts this site. Send comments to:
CppUnit Developers