Manak  2.0.0
output_handler.hpp
Go to the documentation of this file.
1 #ifndef MANAK_OUTPUT_HANDLER_HPP_INCLUDED
2 #define MANAK_OUTPUT_HANDLER_HPP_INCLUDED
3 
4 #include <iostream>
5 #include <iomanip>
6 #include <map>
7 #include <string>
8 #include <fstream>
9 
11 
12 namespace manak
13 {
14 
16 {
17  public:
18  OutputHandler(const std::string& filename)
19  : stream(filename)
20  {}
21 
22  virtual ~OutputHandler() {}
23 
24  virtual void Initialize(bool compare,
25  const std::string& c_time) = 0;
26 
27  virtual void OpenSuite(const std::string& name) = 0;
28 
29  virtual void CloseSuite() = 0;
30 
31  virtual void AddCase(const std::string& uname,
32  const std::string& name,
33  const std::map<std::string, std::list<utils::ObjectStore>>& results) = 0;
34 
35  virtual void Finalize() = 0;
36 
37  protected:
38  std::ofstream stream;
39 };
40 
41 }
42 
43 #endif // MANAK_OUTPUT_HANDLER_HPP_INCLUDED
virtual void CloseSuite()=0
virtual void Initialize(bool compare, const std::string &c_time)=0
OutputHandler(const std::string &filename)
virtual void Finalize()=0
virtual void OpenSuite(const std::string &name)=0
virtual void AddCase(const std::string &uname, const std::string &name, const std::map< std::string, std::list< utils::ObjectStore >> &results)=0