CppUnit project page | FAQ

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

XmlDocument.h
Go to the documentation of this file.
1 #ifndef CPPUNIT_TOOLS_XMLDOCUMENT_H
2 #define CPPUNIT_TOOLS_XMLDOCUMENT_H
3
4 #include <cppunit/Portability.h>
5
6 #if CPPUNIT_NEED_DLL_DECL
7 #pragma warning( push )
8 #pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z
9 #endif
10
11 #include <string>
12
13
14 CPPUNIT_NS_BEGIN
15
16
17 class XmlElement;
18
19
27 class CPPUNIT_API XmlDocument
28 {
29 public:
35 XmlDocument( const std::string &encoding = "",
36 const std::string &styleSheet = "" );
37
39 virtual ~XmlDocument();
40
41 std::string encoding() const;
42 void setEncoding( const std::string &encoding = "" );
43
44 std::string styleSheet() const;
45 void setStyleSheet( const std::string &styleSheet = "" );
46
47 bool standalone() const;
48
57 void setStandalone( bool standalone );
58
59 void setRootElement( XmlElement *rootElement );
60 XmlElement &rootElement() const;
61
62 std::string toString() const;
63
64 private:
66 XmlDocument( const XmlDocument &copy );
67
69 void operator =( const XmlDocument &copy );
70
71 protected:
72 std::string m_encoding;
73 std::string m_styleSheet;
74 XmlElement *m_rootElement;
75 bool m_standalone;
76 };
77
78
79 #if CPPUNIT_NEED_DLL_DECL
80 #pragma warning( pop )
81 #endif
82
83
84 CPPUNIT_NS_END
85
86 #endif // CPPUNIT_TOOLS_XMLDOCUMENT_H
Portability.h
XmlElement
A XML Element.
Definition: XmlElement.h:33
XmlDocument::m_standalone
bool m_standalone
Definition: XmlDocument.h:75
XmlDocument
A XML Document.
Definition: XmlDocument.h:27
XmlDocument::m_rootElement
XmlElement * m_rootElement
Definition: XmlDocument.h:74
CPPUNIT_NS_END
#define CPPUNIT_NS_END
Definition: Portability.h:120
CPPUNIT_NS_BEGIN
#define CPPUNIT_NS_BEGIN
Definition: Portability.h:119
XmlDocument::m_styleSheet
std::string m_styleSheet
Definition: XmlDocument.h:73
XmlDocument::m_encoding
std::string m_encoding
Definition: XmlDocument.h:72
CPPUNIT_API
#define CPPUNIT_API
Definition: CppUnitApi.h:27

| Send comments to: CppUnit Developers