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*/
27
29public:
30 virtual ~RLevelIter() = default;
31
32 /** Shift to next entry */
33 virtual bool Next() = 0;
34
35 /** Returns current entry name */
36 virtual std::string GetItemName() const = 0;
37
38 /** Returns true if current item can have childs */
39 virtual bool CanItemHaveChilds() const { return false; }
40
41 /** Create RElement for current entry - may take much time to load object or open file */
42 virtual std::shared_ptr<RElement> GetElement() = 0;
43
44 virtual std::unique_ptr<RItem> CreateItem();
45
46 virtual bool Find(const std::string &name, int indx = -1);
47
48};
49
50
51} // namespace Browsable
52} // namespace ROOT
53
54#endif
char name[80]
Definition TGX11.cxx:148
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.