LCOV - code coverage report
Current view: top level - include/hpactor/cli - output_formatter.hpp (source / functions) Coverage Total Hit
Test: HPActor Coverage Lines: 100.0 % 1 1
Test Date: 2026-05-20 02:24:49 Functions: 50.0 % 2 1
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : #pragma once
       2                 :             : 
       3                 :             : #include <map>
       4                 :             : #include <memory>
       5                 :             : #include <string>
       6                 :             : #include <vector>
       7                 :             : 
       8                 :             : namespace hpactor {
       9                 :             : namespace cli {
      10                 :             : 
      11                 :             : struct TreeNode {
      12                 :             :     std::string name;
      13                 :             :     std::string description;
      14                 :             :     std::vector<TreeNode> children;
      15                 :             : };
      16                 :             : 
      17                 :             : class OutputFormatter {
      18                 :             : public:
      19                 :          17 :     virtual ~OutputFormatter() = default;
      20                 :             :     virtual void header(const std::string& title) = 0;
      21                 :             :     virtual void table(const std::vector<std::string>& columns,
      22                 :             :                        const std::vector<std::vector<std::string>>& rows) = 0;
      23                 :             :     virtual void key_value(const std::map<std::string, std::string>& pairs) = 0;
      24                 :             :     virtual void tree(const TreeNode& root) = 0;
      25                 :             :     virtual void raw(const std::string& text) = 0;
      26                 :             :     virtual void error(const std::string& message) = 0;
      27                 :             :     virtual std::string finalize() = 0;
      28                 :             : 
      29                 :             :     static std::unique_ptr<OutputFormatter> create(const std::string& format);
      30                 :             : };
      31                 :             : 
      32                 :             : }  // namespace cli
      33                 :             : }  // namespace hpactor
        

Generated by: LCOV version 2.0-1