Basic element of browsable hierarchy.
Provides access to data, creates iterator if any
Definition at line 35 of file RElement.hxx.
Public Types | |
enum | EActionKind { kActNone , kActBrowse , kActEdit , kActImage , kActDraw6 , kActDraw7 , kActCanvas , kActTree , 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 bool | CheckValid () |
Check if element still contains valid content. | |
virtual std::unique_ptr< RItem > | CreateItem () const |
Returns item with element description. | |
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 | IsFolder () const |
Check if element can have childs. | |
virtual bool | IsObject (void *) |
Check if element contains provided pointer. | |
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 51 of file RElement.hxx.
Definition at line 38 of file RElement.hxx.
|
virtualdefault |
|
inlinevirtual |
Select element as active.
Reimplemented in TDirectoryElement.
Definition at line 104 of file RElement.hxx.
|
inlinevirtual |
Check if element still contains valid content.
Reimplemented in ROOT::Experimental::Browsable::TObjectElement.
Definition at line 92 of file RElement.hxx.
|
static |
Compare two paths, Returns number of elements matches in both paths.
Definition at line 144 of file RElement.cxx.
|
virtual |
Returns item with element description.
Reimplemented in ROOT::Experimental::Browsable::TObjectElement, RNTupleElement, and TKeyElement.
Definition at line 104 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 177 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, TDirectoryElement, TKeyElement, TFolderElement, and TCollectionElement.
Definition at line 29 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, TTreeBrowsingElement, TDirectoryElement, and ROOT::Experimental::Browsable::RWrapper.
Definition at line 89 of file RElement.cxx.
|
static |
Find item with specified name Default implementation, should work for all.
Definition at line 51 of file RElement.cxx.
|
inlinevirtual |
Get default action.
Reimplemented in ROOT::Experimental::Browsable::RSysFile, ROOT::Experimental::Browsable::RWrapper, ROOT::Experimental::Browsable::TObjectElement, RFieldElement, TTreeBrowsingElement, TTreeElement, TDirectoryElement, TKeyElement, and TColorElement.
Definition at line 95 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, TDirectoryElement, and TKeyElement.
|
virtual |
Returns number of childs By default creates iterator and iterates over all items.
Reimplemented in TBrBrowsableElement, TFolderElement, and TCollectionElement.
Definition at line 38 of file RElement.cxx.
|
inlinevirtual |
Access object.
Reimplemented in ROOT::Experimental::Browsable::RWrapper, ROOT::Experimental::Browsable::TObjectElement, RFieldElement, and TKeyElement.
Definition at line 81 of file RElement.hxx.
|
static |
Converts element path back to string.
Definition at line 159 of file RElement.cxx.
|
static |
Returns sub element.
Definition at line 68 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, TDirectoryElement, and TKeyElement.
Definition at line 72 of file RElement.hxx.
|
inlinevirtual |
Check if want to perform action.
Reimplemented in ROOT::Experimental::Browsable::RWrapper, TTreeBrowsingElement, TTreeElement, TKeyElement, RFieldElement, and ROOT::Experimental::Browsable::TObjectElement.
Definition at line 98 of file RElement.hxx.
|
inlinevirtual |
Should item representing element be expand by default.
Reimplemented in ROOT::Experimental::Browsable::RWrapper.
Definition at line 101 of file RElement.hxx.
|
inlinevirtual |
Check if element can have childs.
Reimplemented in ROOT::Experimental::Browsable::TObjectElement, TDirectoryElement, and TKeyElement.
Definition at line 87 of file RElement.hxx.
|
inlinevirtual |
Check if element contains provided pointer.
Reimplemented in ROOT::Experimental::Browsable::TObjectElement.
Definition at line 84 of file RElement.hxx.
|
inlinevirtual |
Checks if element name match to provided value.
Reimplemented in ROOT::Experimental::Browsable::RSysFile.
Definition at line 69 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 115 of file RElement.cxx.