Logo ROOT  
Reference Guide
ROOT::Experimental::RBrowserData Class Reference

Way to browse (hopefully) everything in ROOT.

Definition at line 35 of file RBrowserData.hxx.

Public Member Functions

 RBrowserData ()
 Default constructor. More...
 
 RBrowserData (std::shared_ptr< Browsable::RElement > elem)
 
virtual ~RBrowserData ()
 Destructor. More...
 
void ClearCache ()
 Clear internal objects cache. More...
 
void CreateDefaultElements ()
 Create default elements shown in the RBrowser. More...
 
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. More...
 
std::shared_ptr< Browsable::RElementGetElement (const std::string &str)
 Returns element with path, specified as string. More...
 
std::shared_ptr< Browsable::RElementGetElementFromTop (const Browsable::RElementPath_t &path)
 Returns element with path, specified as Browsable::RElementPath_t. More...
 
std::shared_ptr< Browsable::RElementGetSubElement (const Browsable::RElementPath_t &path)
 Returns sub-element starting from top, using cached data. More...
 
const Browsable::RElementPath_tGetWorkingPath () const
 
std::string ProcessRequest (const RBrowserRequest &request)
 Process browser request, returns string with JSON of RBrowserReply data. More...
 
bool RemoveFromCache (const Browsable::RElementPath_t &path)
 Remove path (and all sub-paths) from cache Returns true if any element was removed. More...
 
bool RemoveFromCache (void *obj)
 Remove object from cache If nullptr specified - removes no-longer-valid elements Returns true if any element was removed. More...
 
void SetTopElement (std::shared_ptr< Browsable::RElement > elem)
 set top element for browsing More...
 
void SetWorkingPath (const Browsable::RElementPath_t &path)
 set working directory relative to top element More...
 

Private Member Functions

bool ProcessBrowserRequest (const RBrowserRequest &request, RBrowserReply &reply)
 Process browser request. More...
 
void ResetLastRequestData (bool with_element)
 Reset all data correspondent to last request. More...
 

Private Attributes

std::vector< std::pair< Browsable::RElementPath_t, std::shared_ptr< Browsable::RElement > > > fCache
 ! already requested elements More...
 
std::unique_ptr< RBrowserDataCleanupfCleanupHandle
 ! cleanup handle for RecursiveRemove More...
 
bool fLastAllChilds {false}
 ! if all chlds were extracted More...
 
std::shared_ptr< Browsable::RElementfLastElement
 ! last element used in request More...
 
std::vector< std::unique_ptr< Browsable::RItem > > fLastItems
 ! created browser items - used in requests More...
 
Browsable::RElementPath_t fLastPath
 ! path to last used element More...
 
std::vector< const Browsable::RItem * > fLastSortedItems
 ! sorted child items, used in requests More...
 
std::string fLastSortMethod
 ! last sort method More...
 
bool fLastSortReverse {false}
 ! last request reverse order More...
 
std::shared_ptr< Browsable::RElementfTopElement
 ! top element More...
 
Browsable::RElementPath_t fWorkingPath
 ! path showed in Breadcrumb More...
 

Friends

class RBrowserDataCleanup
 

#include <ROOT/RBrowserData.hxx>

Constructor & Destructor Documentation

◆ RBrowserData() [1/2]

RBrowserData::RBrowserData ( )

Default constructor.

Definition at line 68 of file RBrowserData.cxx.

◆ RBrowserData() [2/2]

ROOT::Experimental::RBrowserData::RBrowserData ( std::shared_ptr< Browsable::RElement elem)
inline

Definition at line 61 of file RBrowserData.hxx.

◆ ~RBrowserData()

RBrowserData::~RBrowserData ( )
virtual

Destructor.

Definition at line 78 of file RBrowserData.cxx.

Member Function Documentation

◆ ClearCache()

void RBrowserData::ClearCache ( )

Clear internal objects cache.

Definition at line 370 of file RBrowserData.cxx.

◆ CreateDefaultElements()

void RBrowserData::CreateDefaultElements ( )

Create default elements shown in the RBrowser.

Definition at line 108 of file RBrowserData.cxx.

◆ DecomposePath()

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 155 of file RBrowserData.cxx.

◆ GetElement()

std::shared_ptr< Browsable::RElement > RBrowserData::GetElement ( const std::string &  str)

Returns element with path, specified as string.

Definition at line 290 of file RBrowserData.cxx.

◆ GetElementFromTop()

std::shared_ptr< Browsable::RElement > RBrowserData::GetElementFromTop ( const Browsable::RElementPath_t path)

Returns element with path, specified as Browsable::RElementPath_t.

Definition at line 300 of file RBrowserData.cxx.

◆ GetSubElement()

std::shared_ptr< Browsable::RElement > RBrowserData::GetSubElement ( const Browsable::RElementPath_t path)

Returns sub-element starting from top, using cached data.

Definition at line 308 of file RBrowserData.cxx.

◆ GetWorkingPath()

const Browsable::RElementPath_t & ROOT::Experimental::RBrowserData::GetWorkingPath ( ) const
inline

Definition at line 71 of file RBrowserData.hxx.

◆ ProcessBrowserRequest()

bool RBrowserData::ProcessBrowserRequest ( const RBrowserRequest request,
RBrowserReply reply 
)
private

Process browser request.

Definition at line 171 of file RBrowserData.cxx.

◆ ProcessRequest()

std::string RBrowserData::ProcessRequest ( const RBrowserRequest request)

Process browser request, returns string with JSON of RBrowserReply data.

Definition at line 269 of file RBrowserData.cxx.

◆ RemoveFromCache() [1/2]

bool RBrowserData::RemoveFromCache ( const Browsable::RElementPath_t path)

Remove path (and all sub-paths) from cache Returns true if any element was removed.

Definition at line 406 of file RBrowserData.cxx.

◆ RemoveFromCache() [2/2]

bool RBrowserData::RemoveFromCache ( void *  obj)

Remove object from cache If nullptr specified - removes no-longer-valid elements Returns true if any element was removed.

Definition at line 380 of file RBrowserData.cxx.

◆ ResetLastRequestData()

void RBrowserData::ResetLastRequestData ( bool  with_element)
private

Reset all data correspondent to last request.

Definition at line 138 of file RBrowserData.cxx.

◆ SetTopElement()

void RBrowserData::SetTopElement ( std::shared_ptr< Browsable::RElement elem)

set top element for browsing

Definition at line 88 of file RBrowserData.cxx.

◆ SetWorkingPath()

void RBrowserData::SetWorkingPath ( const Browsable::RElementPath_t path)

set working directory relative to top element

Definition at line 98 of file RBrowserData.cxx.

Friends And Related Function Documentation

◆ RBrowserDataCleanup

friend class RBrowserDataCleanup
friend

Definition at line 37 of file RBrowserData.hxx.

Member Data Documentation

◆ fCache

std::vector<std::pair<Browsable::RElementPath_t, std::shared_ptr<Browsable::RElement> > > ROOT::Experimental::RBrowserData::fCache
private

! already requested elements

Definition at line 43 of file RBrowserData.hxx.

◆ fCleanupHandle

std::unique_ptr<RBrowserDataCleanup> ROOT::Experimental::RBrowserData::fCleanupHandle
private

! cleanup handle for RecursiveRemove

Definition at line 52 of file RBrowserData.hxx.

◆ fLastAllChilds

bool ROOT::Experimental::RBrowserData::fLastAllChilds {false}
private

! if all chlds were extracted

Definition at line 48 of file RBrowserData.hxx.

◆ fLastElement

std::shared_ptr<Browsable::RElement> ROOT::Experimental::RBrowserData::fLastElement
private

! last element used in request

Definition at line 46 of file RBrowserData.hxx.

◆ fLastItems

std::vector<std::unique_ptr<Browsable::RItem> > ROOT::Experimental::RBrowserData::fLastItems
private

! created browser items - used in requests

Definition at line 47 of file RBrowserData.hxx.

◆ fLastPath

Browsable::RElementPath_t ROOT::Experimental::RBrowserData::fLastPath
private

! path to last used element

Definition at line 45 of file RBrowserData.hxx.

◆ fLastSortedItems

std::vector<const Browsable::RItem *> ROOT::Experimental::RBrowserData::fLastSortedItems
private

! sorted child items, used in requests

Definition at line 49 of file RBrowserData.hxx.

◆ fLastSortMethod

std::string ROOT::Experimental::RBrowserData::fLastSortMethod
private

! last sort method

Definition at line 50 of file RBrowserData.hxx.

◆ fLastSortReverse

bool ROOT::Experimental::RBrowserData::fLastSortReverse {false}
private

! last request reverse order

Definition at line 51 of file RBrowserData.hxx.

◆ fTopElement

std::shared_ptr<Browsable::RElement> ROOT::Experimental::RBrowserData::fTopElement
private

! top element

Definition at line 39 of file RBrowserData.hxx.

◆ fWorkingPath

Browsable::RElementPath_t ROOT::Experimental::RBrowserData::fWorkingPath
private

! path showed in Breadcrumb

Definition at line 41 of file RBrowserData.hxx.

Libraries for ROOT::Experimental::RBrowserData:
[legend]

The documentation for this class was generated from the following files: