CppUnit project page FAQ

XmlOutputter.h
Go to the documentation of this file.
1 #ifndef CPPUNIT_XMLTESTRESULTOUTPUTTER_H
2 #define CPPUNIT_XMLTESTRESULTOUTPUTTER_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 <cppunit/Outputter.h>
15 
16 
18 
19 
20 class Test;
21 class TestFailure;
23 class XmlDocument;
24 class XmlElement;
25 class XmlOutputterHook;
26 
27 
40 {
41 public:
48  OStream &stream,
49  std::string encoding = std::string("ISO-8859-1") );
50 
52  virtual ~XmlOutputter();
53 
57  virtual void addHook( XmlOutputterHook *hook );
58 
62  virtual void removeHook( XmlOutputterHook *hook );
63 
69  virtual void write();
70 
76  virtual void setStyleSheet( const std::string &styleSheet );
77 
86  virtual void setStandalone( bool standalone );
87 
88  typedef CppUnitMap<Test *,TestFailure*, std::less<Test*> > FailedTests;
89 
98  virtual void setRootNode();
99 
100  virtual void addFailedTests( FailedTests &failedTests,
101  XmlElement *rootNode );
102 
103  virtual void addSuccessfulTests( FailedTests &failedTests,
104  XmlElement *rootNode );
105 
112  virtual void addStatistics( XmlElement *rootNode );
113 
119  virtual void addFailedTest( Test *test,
120  TestFailure *failure,
121  int testNumber,
122  XmlElement *testsNode );
123 
124  virtual void addFailureLocation( TestFailure *failure,
125  XmlElement *testElement );
126 
127 
133  virtual void addSuccessfulTest( Test *test,
134  int testNumber,
135  XmlElement *testsNode );
136 protected:
137  virtual void fillFailedTestsMap( FailedTests &failedTests );
138 
139 protected:
140  typedef CppUnitDeque<XmlOutputterHook *> Hooks;
141 
144  std::string m_encoding;
145  std::string m_styleSheet;
148 
149 private:
151  XmlOutputter( const XmlOutputter &copy );
152 
154  void operator =( const XmlOutputter &copy );
155 
156 private:
157 };
158 
159 
161 
162 #if CPPUNIT_NEED_DLL_DECL
163 #pragma warning( pop )
164 #endif
165 
166 
167 #endif // CPPUNIT_XMLTESTRESULTOUTPUTTER_H

Send comments to:
CppUnit Developers