|
TraceMaker
C++ API of the engine
|
Renders the run report (doc 18 D3, D136) from a route summary (route --json, with the sections route --report adds). More...
#include <string>#include <nlohmann/json.hpp>Go to the source code of this file.
Namespaces | |
| namespace | tmk |
| namespace | tmk::report |
Enumerations | |
| enum class | tmk::report::Format { tmk::report::Html , tmk::report::Markdown } |
Functions | |
| Format | tmk::report::format_for_path (const std::string &path) |
| Markdown for a path ending in .md or .markdown, else HTML. | |
| std::string | tmk::report::value_text (const nlohmann::json &v) |
| A JSON value as the report prints it: integers as they are, other numbers to three decimals without trailing zeros, true/false as yes/no, null as n/a, strings as they are. | |
| std::string | tmk::report::render (const nlohmann::json &summary, Format format, const std::string &json_name) |
| The report of summary. json_name is the summary file the report points at for its sources (shown as written). | |
Renders the run report (doc 18 D3, D136) from a route summary (route --json, with the sections route --report adds).
The renderer reads nothing but the summary and does no arithmetic: every number and every name it prints is a field of the JSON, and the HTML marks each with its JSON pointer (data-src), so a reader can trace any figure.
Definition in file render.hpp.