Way to browse (hopefully) everything in ROOT.
Definition at line 34 of file RBrowserData.hxx.
Public Member Functions | |
RBrowserData ()=default | |
RBrowserData (std::shared_ptr< Browsable::RElement > elem) | |
virtual | ~RBrowserData ()=default |
void | ClearCache () |
Clear internal objects cache. | |
void | CreateDefaultElements () |
Create default elements shown in the RBrowser. | |
Browsable::RElementPath_t | DecomposePath (const std::string &path, bool relative_to_work_element) |
Decompose path to elements Returns array of names for each element in the path, first element either "/" or "." If returned array empty - it is error. | |
std::shared_ptr< Browsable::RElement > | GetElement (const std::string &str) |
Returns element with path, specified as string. | |
std::shared_ptr< Browsable::RElement > | GetElementFromTop (const Browsable::RElementPath_t &path) |
Returns element with path, specified as Browsable::RElementPath_t. | |
std::shared_ptr< Browsable::RElement > | GetSubElement (const Browsable::RElementPath_t &path) |
Returns sub-element starting from top, using cached data. | |
const Browsable::RElementPath_t & | GetWorkingPath () const |
std::string | ProcessRequest (const RBrowserRequest &request) |
Process browser request, returns string with JSON of RBrowserReply data. | |
void | SetTopElement (std::shared_ptr< Browsable::RElement > elem) |
set top element for browsing | |
void | SetWorkingPath (const Browsable::RElementPath_t &path) |
set working directory relative to top element | |
Private Member Functions | |
bool | ProcessBrowserRequest (const RBrowserRequest &request, RBrowserReply &reply) |
Process browser request. | |
void | ResetLastRequestData (bool with_element) |
Reset all data correspondent to last request. | |
Private Attributes | |
std::vector< std::pair< Browsable::RElementPath_t, std::shared_ptr< Browsable::RElement > > > | fCache |
! already requested elements | |
bool | fLastAllChilds {false} |
! if all chlds were extracted | |
std::shared_ptr< Browsable::RElement > | fLastElement |
! last element used in request | |
std::vector< std::unique_ptr< Browsable::RItem > > | fLastItems |
! created browser items - used in requests | |
Browsable::RElementPath_t | fLastPath |
! path to last used element | |
std::vector< const Browsable::RItem * > | fLastSortedItems |
! sorted child items, used in requests | |
std::string | fLastSortMethod |
! last sort method | |
bool | fLastSortReverse {false} |
! last request reverse order | |
std::shared_ptr< Browsable::RElement > | fTopElement |
! top element | |
Browsable::RElementPath_t | fWorkingPath |
! path showed in Breadcrumb | |
#include <ROOT/RBrowserData.hxx>
|
default |
|
inline |
Definition at line 57 of file RBrowserData.hxx.
|
virtualdefault |
void RBrowserData::ClearCache | ( | ) |
Clear internal objects cache.
Definition at line 322 of file RBrowserData.cxx.
void RBrowserData::CreateDefaultElements | ( | ) |
Create default elements shown in the RBrowser.
Definition at line 68 of file RBrowserData.cxx.
Browsable::RElementPath_t RBrowserData::DecomposePath | ( | const std::string & | path, |
bool | relative_to_work_element | ||
) |
Decompose path to elements Returns array of names for each element in the path, first element either "/" or "." If returned array empty - it is error.
Definition at line 115 of file RBrowserData.cxx.
std::shared_ptr< Browsable::RElement > RBrowserData::GetElement | ( | const std::string & | str | ) |
Returns element with path, specified as string.
Definition at line 245 of file RBrowserData.cxx.
std::shared_ptr< Browsable::RElement > RBrowserData::GetElementFromTop | ( | const Browsable::RElementPath_t & | path | ) |
Returns element with path, specified as Browsable::RElementPath_t.
Definition at line 255 of file RBrowserData.cxx.
std::shared_ptr< Browsable::RElement > RBrowserData::GetSubElement | ( | const Browsable::RElementPath_t & | path | ) |
Returns sub-element starting from top, using cached data.
Definition at line 263 of file RBrowserData.cxx.
|
inline |
Definition at line 67 of file RBrowserData.hxx.
|
private |
Process browser request.
Definition at line 131 of file RBrowserData.cxx.
std::string RBrowserData::ProcessRequest | ( | const RBrowserRequest & | request | ) |
Process browser request, returns string with JSON of RBrowserReply data.
Definition at line 229 of file RBrowserData.cxx.
Reset all data correspondent to last request.
Definition at line 98 of file RBrowserData.cxx.
void RBrowserData::SetTopElement | ( | std::shared_ptr< Browsable::RElement > | elem | ) |
set top element for browsing
Definition at line 48 of file RBrowserData.cxx.
void RBrowserData::SetWorkingPath | ( | const Browsable::RElementPath_t & | path | ) |
set working directory relative to top element
Definition at line 58 of file RBrowserData.cxx.
|
private |
! already requested elements
Definition at line 40 of file RBrowserData.hxx.
|
private |
! if all chlds were extracted
Definition at line 45 of file RBrowserData.hxx.
|
private |
! last element used in request
Definition at line 43 of file RBrowserData.hxx.
|
private |
! created browser items - used in requests
Definition at line 44 of file RBrowserData.hxx.
|
private |
! path to last used element
Definition at line 42 of file RBrowserData.hxx.
|
private |
! sorted child items, used in requests
Definition at line 46 of file RBrowserData.hxx.
|
private |
! last sort method
Definition at line 47 of file RBrowserData.hxx.
|
private |
! last request reverse order
Definition at line 48 of file RBrowserData.hxx.
|
private |
! top element
Definition at line 36 of file RBrowserData.hxx.
|
private |
! path showed in Breadcrumb
Definition at line 38 of file RBrowserData.hxx.