Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RLevelIter.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_RLevelIter
10#define ROOT7_Browsable_RLevelIter
11
12#include <memory>
13#include <string>
14
15namespace ROOT {
16namespace Browsable {
17
18class RElement;
19class RItem;
20
21/** \class RLevelIter
22\ingroup rbrowser
23\brief Iterator over single level hierarchy like any array, keys list, ...
24\author Sergey Linev <S.Linev@gsi.de>
25\date 2019-10-14
26\warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
27*/
28
30public:
31 virtual ~RLevelIter() = default;
32
33 /** Shift to next entry */
34 virtual bool Next() = 0;
35
36 /** Returns current entry name */
37 virtual std::string GetItemName() const = 0;
38
39 /** Returns true if current item can have childs */
40 virtual bool CanItemHaveChilds() const { return false; }
41
42 /** Create RElement for current entry - may take much time to load object or open file */
43 virtual std::shared_ptr<RElement> GetElement() = 0;
44
45 virtual std::unique_ptr<RItem> CreateItem();
46
47 virtual bool Find(const std::string &name, int indx = -1);
48
49};
50
51
52} // namespace Browsable
53} // namespace ROOT
54
55#endif
char name[80]
Definition TGX11.cxx:110
Iterator over single level hierarchy like any array, keys list, ...
virtual std::unique_ptr< RItem > CreateItem()
Create generic description item for RBrowser.
virtual ~RLevelIter()=default
virtual bool Find(const std::string &name, int indx=-1)
Find item with specified name Default implementation, should work for all If index specified,...
virtual std::string GetItemName() const =0
Returns current entry name
virtual bool CanItemHaveChilds() const
Returns true if current item can have childs.
virtual std::shared_ptr< RElement > GetElement()=0
Create RElement for current entry - may take much time to load object or open file.
virtual bool Next()=0
Shift to next entry.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...