Manak  2.0.0
output_manager.hpp
Go to the documentation of this file.
1 #ifndef MANAK_OUTPUT_MANAGER_HPP_INCLUDED
2 #define MANAK_OUTPUT_MANAGER_HPP_INCLUDED
3 
4 #include <map>
5 #include <list>
6 #include <fstream>
7 
10 
11 #include "output_handler.hpp"
12 #include "txt_output_handler.hpp"
13 #include "html_output_handler.hpp"
14 
15 namespace manak
16 {
17 
19 {
20  public:
22  {
23  static OutputManager singleton;
24  return singleton;
25  }
26 
28  {
29  for(auto oh : handlers)
30  {
31  delete oh;
32  }
33  }
34 
35  MANAK_INLINE void AddHandler(OutputHandler* handler);
36 
37  MANAK_INLINE void Initialize(bool compare,
38  const std::string& c_time);
39 
40  MANAK_INLINE void OpenSuite(const std::string& name);
41 
42  MANAK_INLINE void CloseSuite();
43 
44  MANAK_INLINE void AddCase(const std::string& uname,
45  const std::string& name,
46  const std::map<std::string, std::list<utils::ObjectStore>>& results);
47 
48  MANAK_INLINE void Finalize();
49 
50  private:
51  std::list<OutputHandler*> handlers;
52 };
53 
54 }
55 
56 #ifndef MANAK_USE_DYN_LINK
57 #include "output_manager.cpp"
58 #endif // MANAK_USE_DYM_LINK
59 
60 #endif // MANAK_OUTPUT_MANAGER_HPP_INCLUDED
MANAK_INLINE void Initialize(bool compare, const std::string &c_time)
MANAK_INLINE void Finalize()
#define MANAK_INLINE
Check if user has opt for dynamic linking.
Definition: macro_utils.hpp:25
MANAK_INLINE void OpenSuite(const std::string &name)
std::list< OutputHandler * > handlers
static OutputManager & GlobalOutputManager()
MANAK_INLINE void AddCase(const std::string &uname, const std::string &name, const std::map< std::string, std::list< utils::ObjectStore >> &results)
MANAK_INLINE void AddHandler(OutputHandler *handler)
MANAK_INLINE void CloseSuite()