LCOV - code coverage report
Current view: top level - include/Tools/Reporter - Reporter.hpp (source / functions) Hit Total Coverage
Test: streampu_clean.info Lines: 0 1 0.0 %
Date: 2024-06-12 12:04:18 Functions: 0 2 0.0 %

          Line data    Source code
       1             : /*!
       2             :  * \file
       3             :  * \brief Class tools::Reporter.
       4             :  */
       5             : #ifndef REPORTER_HPP__
       6             : #define REPORTER_HPP__
       7             : 
       8             : #include <string>
       9             : #include <tuple>
      10             : #include <utility>
      11             : #include <vector>
      12             : 
      13             : #include "Tools/Interface/Interface_reset.hpp"
      14             : 
      15             : namespace spu
      16             : {
      17             : namespace tools
      18             : {
      19             : class Reporter : public Interface_reset
      20             : {
      21             :   public:
      22             :     using title_t = std::tuple<std::string, std::string, size_t>;
      23             :     using group_title_t = title_t;
      24             :     using column_titles_t = std::vector<title_t>;
      25             :     using group_t = std::pair<group_title_t, column_titles_t>;
      26             : 
      27             :     using report_t = std::vector<std::vector<std::string>>;
      28             : 
      29             :   protected:
      30             :     std::vector<group_t> cols_groups;
      31             : 
      32             :   public:
      33           0 :     virtual ~Reporter() = default;
      34             : 
      35             :     const std::vector<group_t>& get_groups() const;
      36             : 
      37             :     /*
      38             :      * Report a vector as long as the number of groups (cols_groups.size())
      39             :      * with each sub vector as long as the number of columns of the matching group (cols_groups[i].second.size())
      40             :      */
      41             :     virtual report_t report(bool final = false) = 0;
      42             : 
      43             :     virtual void init(); // do nothing by default
      44             : 
      45             :     virtual void reset();
      46             : };
      47             : }
      48             : }
      49             : 
      50             : #endif // REPORTER_HPP__

Generated by: LCOV version 1.14