CbmRoot
Loading...
Searching...
No Matches
CbmQaReportHtmlEngine.h
Go to the documentation of this file.
1/* Copyright (C) 2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergei Zharko [committer] */
4
9
10#pragma once
11
12#include "CbmQaReportEngine.h"
13
14#include <string>
15#include <string_view>
16
17namespace cbm::qa::report
18{
21 class HtmlEngine : public Engine {
22 public:
26 std::string FigureBody(const Figure& figure) const override;
27
31 std::string HeaderBody(const Header& header) const override;
32
36 std::string SectionBody(const Section& section) const override;
37
41 std::string TableBody(const Table& table) const override;
42
46 std::string TailBody(const Tail& tail) const override;
47
49 std::string ScriptExtention() const override { return "html"; };
50
52 std::string MyName() const override { return "HTML engine"; }
53
54 private:
55 // TODO: control with config
56 static constexpr double kFigureWidth = 0.9;
57 static constexpr std::string_view kTableTextAlign = "left";
58 static constexpr int kTablePadding = 4;
59 };
60} // namespace cbm::qa::report
A base abstract class to provide an interface for element body (a visitor in the Visitor pattern)
Figure in the report.
Header of the report.
static constexpr std::string_view kTableTextAlign
Table: align.
std::string MyName() const override
Returns engine name.
static constexpr double kFigureWidth
Figure width [in page width].
std::string TableBody(const Table &table) const override
Creates a body for table.
std::string ScriptExtention() const override
Returns script extention.
std::string TailBody(const Tail &tail) const override
Creates a body for tail.
std::string FigureBody(const Figure &figure) const override
Creates a body for figure.
std::string HeaderBody(const Header &header) const override
Creates a body for header.
static constexpr int kTablePadding
Table: rows padding [px].
std::string SectionBody(const Section &section) const override
Creates a body for section.
Section of the report.
Table element in the report.
Tail of the report.