20using namespace std::string_literals;
43 auto iter = GetChildsIter();
46 while (iter->Next()) cnt++;
56 std::string
lkind = kind;
60 if ((
lkind ==
"image") || (
lkind ==
"image64"))
return kImage;
61 if (
lkind ==
"png")
return kPng;
62 if ((
lkind ==
"jpg") || (
lkind ==
"jpeg"))
return kJpeg;
63 if (
lkind ==
"json")
return kJson;
64 if (
lkind ==
"filename")
return kFileName;
79 auto iter =
curr->GetChildsIter();
83 curr = iter->GetElement();
94 if (GetContentKind(kind) == kJson) {
95 auto obj = GetObject();
109 auto item = std::make_unique<RItem>(GetName());
110 item->SetTitle(GetTitle());
124 std::string
slash =
"/";
126 std::string::size_type
previous = 0;
130 while (current != std::string::npos) {
152 for (
int n = 0;
n <
sz; ++
n)
165 for (
auto &
elem : path) {
183 if ((
p1 == std::string::npos) || (
p2 == std::string::npos) || (
p1 >=
p2) || (
p2 !=
name.length()-3))
return -1;
bool gRElementLastKeyCycle
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
static bool IsLastKeyCycle()
Is only last cycle from the list of keys is shown.
static EContentKind GetContentKind(const std::string &kind)
Find item with specified name Default implementation, should work for all.
static void SetLastKeyCycle(bool on=true)
Set flag to show only last cycle from the list of keys.
virtual std::string GetContent(const std::string &="text")
Returns element content, depends from kind.
virtual std::unique_ptr< RLevelIter > GetChildsIter()
Create iterator for childs elements if any.
virtual int GetNumChilds()
Returns number of childs By default creates iterator and iterates over all items.
static int ExtractItemIndex(std::string &name)
Extract index from name Index coded by client with ###<indx>$$$ suffix Such coding used by browser to...
static int ComparePaths(const RElementPath_t &path1, const RElementPath_t &path2)
Compare two paths, Returns number of elements matches in both paths.
static std::string GetPathAsString(const RElementPath_t &path)
Converts element path back to string.
static std::shared_ptr< RElement > GetSubElement(std::shared_ptr< RElement > &elem, const RElementPath_t &path)
Returns sub element.
virtual std::unique_ptr< RItem > CreateItem() const
Returns item with element description.
static RElementPath_t ParsePath(const std::string &str)
Parse string path to produce RElementPath_t One should avoid to use string pathes as much as possible...
A log configuration for a channel, e.g.
const_iterator begin() const
const_iterator end() const
static TString ConvertToJSON(const TObject *obj, Int_t compact=0, const char *member_name=nullptr)
Converts object, inherited from TObject class, to JSON string Lower digit of compact parameter define...
std::vector< std::string > RElementPath_t
ROOT::RLogChannel & BrowsableLog()
Log channel for Browsable diagnostics.