CppUnit project page FAQ CppUnit home page

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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 
00027 class CPPUNIT_API XmlDocument
00028 {
00029 public:
00035   XmlDocument( const std::string &encoding = "",
00036                const std::string &styleSheet = "" );
00037 
00039   virtual ~XmlDocument();
00040 
00041   std::string encoding() const;
00042   void setEncoding( const std::string &encoding = "" );
00043   
00044   std::string styleSheet() const;
00045   void setStyleSheet( const std::string &styleSheet = "" );
00046 
00047   bool standalone() const;
00048 
00057   void setStandalone( bool standalone );
00058  
00059   void setRootElement( XmlElement *rootElement );
00060   XmlElement &rootElement() const;
00061 
00062   std::string toString() const;
00063 
00064 private:
00066   XmlDocument( const XmlDocument &copy );
00067 
00069   void operator =( const XmlDocument &copy );
00070 
00071 protected:
00072   std::string m_encoding;
00073   std::string m_styleSheet;
00074   XmlElement *m_rootElement;
00075   bool m_standalone;
00076 };
00077 
00078 
00079 #if CPPUNIT_NEED_DLL_DECL
00080 #pragma warning( pop )
00081 #endif
00082 
00083 
00084 CPPUNIT_NS_END
00085 
00086 #endif  // CPPUNIT_TOOLS_XMLDOCUMENT_H

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