Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RGroup.hxx
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (C) 1995-2020, Rene Brun and Fons Rademakers. *
3 * All rights reserved. *
4 * *
5 * For the licensing terms see $ROOTSYS/LICENSE. *
6 * For the list of contributors see $ROOTSYS/README/CREDITS. *
7 *************************************************************************/
8
9#ifndef ROOT7_Browsable_RGroup
10#define ROOT7_Browsable_RGroup
11
13
14namespace ROOT {
15namespace Experimental {
16namespace Browsable {
17
18/** \class RGroup
19\ingroup rbrowser
20\brief Group of browsable elements - combines several different elements together.
21\author Sergey Linev <S.Linev@gsi.de>
22\date 2019-11-22
23\warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
24*/
25
26class RGroup : public RElement {
27
28 std::string fName;
29 std::string fTitle;
30 std::vector<std::shared_ptr<RElement>> fChilds;
31
32public:
33
34 RGroup(const std::string &name, const std::string &title = "") : RElement(), fName(name), fTitle(title) {}
35
36 virtual ~RGroup() = default;
37
38 /** Name of browsable, must be provided in derived classes */
39 std::string GetName() const override { return fName; }
40
41 /** Title of browsable (optional) */
42 std::string GetTitle() const override { return fTitle; }
43
44 /** Create iterator for childs elements if any */
45 std::unique_ptr<RLevelIter> GetChildsIter() override;
46
47 void Add(std::shared_ptr<RElement> elem) { fChilds.emplace_back(elem); }
48
49 auto &GetChilds() const { return fChilds; }
50};
51
52
53} // namespace Browsable
54} // namespace Experimental
55} // namespace ROOT
56
57#endif
char name[80]
Definition TGX11.cxx:110
Basic element of browsable hierarchy.
Definition RElement.hxx:33
Group of browsable elements - combines several different elements together.
Definition RGroup.hxx:26
void Add(std::shared_ptr< RElement > elem)
Definition RGroup.hxx:47
RGroup(const std::string &name, const std::string &title="")
Definition RGroup.hxx:34
std::vector< std::shared_ptr< RElement > > fChilds
Definition RGroup.hxx:30
std::unique_ptr< RLevelIter > GetChildsIter() override
Create iterator for childs elements if any.
Definition RGroup.cxx:78
std::string GetName() const override
Name of browsable, must be provided in derived classes.
Definition RGroup.hxx:39
std::string GetTitle() const override
Title of browsable (optional)
Definition RGroup.hxx:42
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...