CbmRoot
Loading...
Searching...
No Matches
CbmQaReportEngine.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 <string>
13#include <string_view>
14
15namespace cbm::qa::report
16{
17 class Figure;
18 class Header;
19 class Section;
20 class Table;
21 class Tail;
22
28 class Engine {
29 public:
31 virtual ~Engine() = default;
32
36 virtual std::string FigureBody(const Figure& figure) const = 0;
37
41 virtual std::string HeaderBody(const Header& header) const = 0;
42
46 virtual std::string SectionBody(const Section& section) const = 0;
47
51 virtual std::string TableBody(const Table& table) const = 0;
52
56 virtual std::string TailBody(const Tail& tail) const = 0;
57
59 virtual std::string ScriptExtention() const = 0;
60
62 virtual std::string MyName() const = 0;
63
66 virtual void Compile(const std::string& /*source*/) const {};
67 };
68} // namespace cbm::qa::report
A base abstract class to provide an interface for element body (a visitor in the Visitor pattern)
virtual std::string HeaderBody(const Header &header) const =0
Creates a body for header.
virtual std::string FigureBody(const Figure &figure) const =0
Creates a body for figure.
virtual std::string ScriptExtention() const =0
Returns script extention.
virtual std::string TableBody(const Table &table) const =0
Creates a body for table.
virtual std::string SectionBody(const Section &section) const =0
Creates a body for section.
virtual std::string TailBody(const Tail &tail) const =0
Creates a body for tail.
virtual void Compile(const std::string &) const
Defines the compilation rule (can be omitted)
virtual std::string MyName() const =0
Returns engine name.
virtual ~Engine()=default
Destructor.
Figure in the report.
Header of the report.
Section of the report.
Table element in the report.
Tail of the report.