Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RNTupleItem.hxx
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (C) 1995-2025, 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_RNTupleItem
10#define ROOT7_Browsable_RNTupleItem
11
13
14namespace ROOT {
15namespace Browsable {
16
17/** \class RNTupleItem
18\ingroup rbrowser
19\brief Representation of an RNTuple item in the browser
20\author Patryk Tymoteusz Pilichowski
21*/
22
23class RNTupleItem : public RItem {
24public:
29
30 RNTupleItem() = default;
31 RNTupleItem(const std::string &_name, int _nchilds = 0, const std::string &_icon = "", ECategory _category = kField)
33 {
34 }
35 // must be here, one needs virtual table for correct streaming of sub-classes
36 virtual ~RNTupleItem() = default;
37
38 bool IsVisualization() const { return category == kVisualization; }
39 bool IsField() const { return category == kField; }
40
41 bool Compare(const RItem *b, const std::string &s) const override
42 {
43 auto tuple_b = dynamic_cast<const RNTupleItem *>(b);
44 if (tuple_b != nullptr && (IsVisualization() || tuple_b->IsVisualization()))
45 return IsVisualization();
46 return RItem::Compare(b, s);
47 }
48
49protected:
51};
52
53} // namespace Browsable
54} // namespace ROOT
55
56#endif
#define b(i)
Definition RSha256.hxx:100
Representation of single item in the browser.
Definition RItem.hxx:23
virtual bool Compare(const RItem *b, const std::string &) const
Definition RItem.hxx:73
Representation of an RNTuple item in the browser.
virtual ~RNTupleItem()=default
RNTupleItem(const std::string &_name, int _nchilds=0, const std::string &_icon="", ECategory _category=kField)
bool Compare(const RItem *b, const std::string &s) const override