Skip to content

JSONGenerator.hpp

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once

#include "doxide.hpp"
#include "Entity.hpp"

/**
 * JSON generator for coverage data following gcov/gcovr schema.
 * 
 * @ingroup developer
 */
class JSONGenerator {
public:
  /**
   * Generate coverage data.
   * 
   * @param root Root entity.
   */
  void generate(const Entity& root);

private:
  /**
   * Generate documentation.
   * 
   * @param root Root entity.
   * @param nfiles Number of files output so far.
   * 
   * @return Updated number of files output so far.
   */
  int generate(const Entity& root, int nfiles);
};