CbmRoot
Loading...
Searching...
No Matches
CbmQaReportSection.cxx
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#include "CbmQaReportSection.h"
11
15
16// ---------------------------------------------------------------------------------------------------------------------
17//
18Section::Section(std::string_view label, std::string_view title)
19 : CollapsibleElement(std::string("section") + std::string(label), title)
20{
21}
22
23// ---------------------------------------------------------------------------------------------------------------------
24//
25void Section::Add(std::shared_ptr<Element> pElement)
26{
27 // Add level to the section
28 if (auto* pSubSection = dynamic_cast<Section*>(pElement.get())) {
29 pSubSection->SetLevel(this->fLevel + 1);
30 }
31 this->CollapsibleElement::Add(pElement);
32}
Base class for the report section (header)
Interface to the element, which can contain daughter elements.
virtual void Add(std::shared_ptr< Element > pElement)
Adds element.
Interface for the report element.
Section of the report.
Section()=default
Default constructor.
void Add(std::shared_ptr< Element > pElement) override
Adds daughter element.
int fLevel
Level of the section.
Hash for CbmL1LinkKey.