Basic element of browsable hierarchy.
Provides access to data, creates iterator if any
Definition at line 33 of file RElement.hxx.
Public Types | |
enum | EActionKind { kActNone , kActBrowse , kActEdit , kActImage , kActDraw6 , kActDraw7 , kActCanvas , kActGeom } |
Possible actions on double-click. More... | |
enum | EContentKind { kNone , kText , kImage , kPng , kJpeg , kJson , kFileName } |
Public Member Functions | |
virtual | ~RElement ()=default |
virtual bool | cd () |
Select element as active. | |
virtual std::unique_ptr< RLevelIter > | GetChildsIter () |
Create iterator for childs elements if any. | |
virtual std::string | GetContent (const std::string &="text") |
Returns element content, depends from kind. | |
virtual EActionKind | GetDefaultAction () const |
Get default action. | |
virtual std::string | GetName () const =0 |
Name of browsable, must be provided in derived classes. | |
virtual int | GetNumChilds () |
Returns number of childs By default creates iterator and iterates over all items. | |
virtual std::unique_ptr< RHolder > | GetObject () |
Access object. | |
virtual std::string | GetTitle () const |
Title of browsable (optional) | |
virtual bool | IsCapable (EActionKind action) const |
Check if want to perform action. | |
virtual bool | IsExpandByDefault () const |
Should item representing element be expand by default. | |
virtual bool | MatchName (const std::string &name) const |
Checks if element name match to provided value. | |
Static Public Member Functions | |
static int | ComparePaths (const RElementPath_t &path1, const RElementPath_t &path2) |
Compare two paths, Returns number of elements matches in both paths. | |
static int | ExtractItemIndex (std::string &name) |
Extract index from name Index coded by client with ###<indx>$$$ suffix Such coding used by browser to identify element by index. | |
static EContentKind | GetContentKind (const std::string &kind) |
Find item with specified name Default implementation, should work for all. | |
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. | |
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. | |
#include <ROOT/Browsable/RElement.hxx>
Possible actions on double-click.
Definition at line 49 of file RElement.hxx.
Definition at line 36 of file RElement.hxx.
|
virtualdefault |
|
inlinevirtual |
Select element as active.
Reimplemented in TDirectoryElement.
Definition at line 92 of file RElement.hxx.
|
static |
Compare two paths, Returns number of elements matches in both paths.
Definition at line 131 of file RElement.cxx.
|
static |
Extract index from name Index coded by client with ###<indx>$$$ suffix Such coding used by browser to identify element by index.
Definition at line 164 of file RElement.cxx.
|
virtual |
Create iterator for childs elements if any.
Returns child iterator (if any)
Reimplemented in ROOT::Experimental::Browsable::RGroup, ROOT::Experimental::Browsable::RSysFile, ROOT::Experimental::Browsable::RWrapper, ROOT::Experimental::Browsable::TObjectElement, RFieldElement, RNTupleElement, TBrBrowsableElement, TKeyElement, TDirectoryElement, TFolderElement, and TCollectionElement.
Definition at line 27 of file RElement.cxx.
|
virtual |
Returns element content, depends from kind.
Returns string content like text file content or json representation.
Can be "text" or "image64" or "json"
Reimplemented in ROOT::Experimental::Browsable::RSysFile, TDirectoryElement, and ROOT::Experimental::Browsable::RWrapper.
Definition at line 87 of file RElement.cxx.
|
static |
Find item with specified name Default implementation, should work for all.
Definition at line 49 of file RElement.cxx.
|
inlinevirtual |
Get default action.
Reimplemented in ROOT::Experimental::Browsable::RSysFile, ROOT::Experimental::Browsable::RWrapper, ROOT::Experimental::Browsable::TObjectElement, RFieldElement, TKeyElement, and TDirectoryElement.
Definition at line 83 of file RElement.hxx.
|
pure virtual |
Name of browsable, must be provided in derived classes.
Implemented in ROOT::Experimental::Browsable::RGroup, ROOT::Experimental::Browsable::RSysFile, ROOT::Experimental::Browsable::RWrapper, ROOT::Experimental::Browsable::TObjectElement, RFieldElement, RNTupleElement, TKeyElement, and TDirectoryElement.
|
virtual |
Returns number of childs By default creates iterator and iterates over all items.
Reimplemented in TBrBrowsableElement, TFolderElement, and TCollectionElement.
Definition at line 36 of file RElement.cxx.
|
inlinevirtual |
Access object.
Reimplemented in ROOT::Experimental::Browsable::RWrapper, ROOT::Experimental::Browsable::TObjectElement, RFieldElement, and TKeyElement.
Definition at line 80 of file RElement.hxx.
|
static |
Converts element path back to string.
Definition at line 146 of file RElement.cxx.
|
static |
Returns sub element.
Definition at line 66 of file RElement.cxx.
|
inlinevirtual |
Title of browsable (optional)
Reimplemented in ROOT::Experimental::Browsable::RGroup, ROOT::Experimental::Browsable::RSysFile, ROOT::Experimental::Browsable::RWrapper, ROOT::Experimental::Browsable::TObjectElement, RFieldElement, RNTupleElement, TKeyElement, and TDirectoryElement.
Definition at line 69 of file RElement.hxx.
|
inlinevirtual |
Check if want to perform action.
Reimplemented in ROOT::Experimental::Browsable::RWrapper, TKeyElement, RFieldElement, and ROOT::Experimental::Browsable::TObjectElement.
Definition at line 86 of file RElement.hxx.
|
inlinevirtual |
Should item representing element be expand by default.
Reimplemented in ROOT::Experimental::Browsable::RWrapper.
Definition at line 89 of file RElement.hxx.
|
inlinevirtual |
Checks if element name match to provided value.
Reimplemented in ROOT::Experimental::Browsable::RSysFile.
Definition at line 66 of file RElement.hxx.
|
static |
Parse string path to produce RElementPath_t One should avoid to use string pathes as much as possible.
Definition at line 102 of file RElement.cxx.