|
CbmRoot
|
Report builder. More...
#include <CbmQaReportBuilder.h>
Public Member Functions | |
| Builder (std::string_view title, fs::path outPath) | |
| Constructor. | |
| virtual | ~Builder ()=default |
| Destructor. | |
| void | AddSection (std::shared_ptr< Section > pSection) |
| Adds section. | |
| std::shared_ptr< Header > | GetHeader () |
| Gets header. | |
| std::shared_ptr< Tail > | GetTail () |
| Gets tail. | |
| void | CreateScript (Engine &engine, bool bCompile=true) |
| Saves script. | |
| std::string | PathInSource (fs::path path) const |
| Converts path of the object in the code to one in the document source. | |
| std::string | AbsFigurePath (fs::path relPath) const |
| Returns absolute path to the figure. | |
| std::string | SaveCanvas (const TCanvas *canv, const std::string &relPath) const |
| Saves canvas. | |
| void | SetFigureExtention (std::string_view figExtention) |
| Sets figure extention. | |
Private Attributes | |
| std::vector< std::shared_ptr< Section > > | fvpSections |
| List of report sections. | |
| std::string | fsFigureExtention = "pdf" |
| Figure extention. | |
| fs::path | fScriptsPath |
| Scripts path. | |
| fs::path | fFiguresPath |
| Figures path. | |
| std::shared_ptr< Header > | fpHeader = nullptr |
| Header of the report. | |
| std::shared_ptr< Tail > | fpTail = nullptr |
| Tail of the report. | |
Static Private Attributes | |
| static constexpr std::string_view | ksSourceName = "source" |
| Name of source. | |
Report builder.
Definition at line 24 of file CbmQaReportBuilder.h.
| Builder::Builder | ( | std::string_view | title, |
| fs::path | outPath ) |
Constructor.
| title | Report title |
| outPath | Output path |
Definition at line 29 of file CbmQaReportBuilder.cxx.
References fFiguresPath, fpHeader, fpTail, and fScriptsPath.
|
virtualdefault |
Destructor.
|
inline |
Returns absolute path to the figure.
| relPath | Relative path to the figure |
Definition at line 54 of file CbmQaReportBuilder.h.
References fFiguresPath.
Referenced by SaveCanvas().
|
inline |
| void Builder::CreateScript | ( | Engine & | engine, |
| bool | bCompile = true ) |
Saves script.
| engine | Engine of the document |
| bCompile | Flag: true - script will be compiled, if the compilation rule is defined by engine |
Definition at line 45 of file CbmQaReportBuilder.cxx.
References cbm::qa::report::Engine::Compile(), fpHeader, fpTail, fScriptsPath, fvpSections, ksSourceName, cbm::qa::report::Engine::MyName(), and cbm::qa::report::Engine::ScriptExtention().
|
inline |
|
inline |
|
inline |
Converts path of the object in the code to one in the document source.
| path | Path to the object |
Definition at line 50 of file CbmQaReportBuilder.h.
References fScriptsPath.
Referenced by SaveCanvas().
| std::string Builder::SaveCanvas | ( | const TCanvas * | canv, |
| const std::string & | relPath ) const |
Saves canvas.
| canv | Pointer to canvas |
| relPath | Relative path to the canvas image |
Definition at line 66 of file CbmQaReportBuilder.cxx.
References AbsFigurePath(), fsFigureExtention, and PathInSource().
|
inline |
Sets figure extention.
Definition at line 64 of file CbmQaReportBuilder.h.
References fsFigureExtention.
|
private |
Figures path.
Definition at line 72 of file CbmQaReportBuilder.h.
Referenced by AbsFigurePath(), and Builder().
|
private |
Header of the report.
Definition at line 73 of file CbmQaReportBuilder.h.
Referenced by Builder(), CreateScript(), and GetHeader().
|
private |
Tail of the report.
Definition at line 74 of file CbmQaReportBuilder.h.
Referenced by Builder(), CreateScript(), and GetTail().
|
private |
Scripts path.
Definition at line 71 of file CbmQaReportBuilder.h.
Referenced by Builder(), CreateScript(), and PathInSource().
|
private |
Figure extention.
Definition at line 70 of file CbmQaReportBuilder.h.
Referenced by SaveCanvas(), and SetFigureExtention().
|
private |
List of report sections.
Definition at line 69 of file CbmQaReportBuilder.h.
Referenced by AddSection(), and CreateScript().
|
staticconstexprprivate |