ROOT  6.06/09
Reference Guide
Public Member Functions | Protected Types | Protected Attributes | Friends | List of all members
TRootSnifferScanRec Class Reference

Definition at line 23 of file TRootSniffer.h.

Public Member Functions

 TRootSnifferScanRec ()
 number of childs More...
 
virtual ~TRootSnifferScanRec ()
 destructor More...
 
void CloseNode ()
 close started node More...
 
Bool_t CanSetFields () const
 return true when fields could be set to the hierarchy item More...
 
Bool_t ScanOnlyFields () const
 
void CreateNode (const char *_node_name)
 Starts new node, must be closed at the end. More...
 
void BeforeNextChild ()
 indicates that new child for current element will be started More...
 
void SetField (const char *name, const char *value, Bool_t with_quotes=kTRUE)
 Set item field only when creating is specified. More...
 
void SetRootClass (TClass *cl)
 Mark item with ROOT class and correspondent streamer info. More...
 
Bool_t CanExpandItem ()
 Returns true when item can be expanded. More...
 
Bool_t IsReadyForResult () const
 Checks if result will be accepted. More...
 
Bool_t SetResult (void *obj, TClass *cl, TDataMember *member=0)
 Obsolete, use SetFoundResult instead. More...
 
Bool_t SetFoundResult (void *obj, TClass *cl, TDataMember *member=0)
 Set found element with class and datamember (optional) More...
 
Int_t Depth () const
 Returns depth of hierarchy. More...
 
Bool_t Done () const
 Method indicates that scanning can be interrupted while result is set. More...
 
void MakeItemName (const char *objname, TString &itemname)
 Construct item name, using object name as basis. More...
 
void BuildFullName (TString &buf, TRootSnifferScanRec *prnt=0)
 Produces full name for the current item. More...
 
Bool_t IsReadOnly (Bool_t dflt=kTRUE)
 Returns read-only flag for current item. More...
 
Bool_t GoInside (TRootSnifferScanRec &super, TObject *obj, const char *obj_name=0, TRootSniffer *sniffer=0)
 Method verifies if new level of hierarchy should be started with provided object. More...
 

Protected Types

enum  {
  kScan = 0x0001, kExpand = 0x0002, kSearch = 0x0004, kCheckChilds = 0x0008,
  kOnlyFields = 0x0010, kActions = 0x001F
}
 

Protected Attributes

TRootSnifferScanRecfParent
 
UInt_t fMask
 pointer on parent record More...
 
const char * fSearchPath
 defines operation kind More...
 
Int_t fLevel
 current path searched More...
 
TString fItemName
 current level of hierarchy More...
 
TList fItemsNames
 name of current item More...
 
Int_t fRestriction
 list of created items names, need to avoid duplication More...
 
TRootSnifferStorefStore
 restriction 0 - default, 1 - read-only, 2 - full access More...
 
Bool_t fHasMore
 object to store results More...
 
Bool_t fNodeStarted
 indicates that potentially there are more items can be found More...
 
Int_t fNumFields
 indicate if node was started More...
 
Int_t fNumChilds
 number of fields More...
 

Friends

class TRootSniffer
 

#include <TRootSniffer.h>

+ Collaboration diagram for TRootSnifferScanRec:

Member Enumeration Documentation

anonymous enum
protected
Enumerator
kScan 

normal scan of hierarchy

kExpand 

expand of specified item - allowed to scan object members

kSearch 

search for specified item (only objects and collections)

kCheckChilds 

check if there childs, very similar to search

kOnlyFields 

if set, only fields for specified item will be set (but all fields)

kActions 

mask for actions, only actions copied to child rec

Definition at line 29 of file TRootSniffer.h.

Constructor & Destructor Documentation

TRootSnifferScanRec::TRootSnifferScanRec ( )

number of childs

constructor

Definition at line 71 of file TRootSniffer.cxx.

TRootSnifferScanRec::~TRootSnifferScanRec ( )
virtual

destructor

Definition at line 91 of file TRootSniffer.cxx.

Member Function Documentation

void TRootSnifferScanRec::BeforeNextChild ( )

indicates that new child for current element will be started

Definition at line 108 of file TRootSniffer.cxx.

Referenced by CreateNode().

void TRootSnifferScanRec::BuildFullName ( TString buf,
TRootSnifferScanRec prnt = 0 
)

Produces full name for the current item.

Produce full name, including all parents.

Definition at line 143 of file TRootSniffer.cxx.

Referenced by BuildFullName(), and GoInside().

Bool_t TRootSnifferScanRec::CanExpandItem ( )

Returns true when item can be expanded.

returns true if current item can be expanded - means one could explore objects members

Definition at line 281 of file TRootSniffer.cxx.

Referenced by TRootSniffer::ScanCollection(), TRootSniffer::ScanObjectChilds(), and TRootSniffer::ScanObjectMembers().

Bool_t TRootSnifferScanRec::CanSetFields ( ) const
inline

return true when fields could be set to the hierarchy item

Definition at line 61 of file TRootSniffer.h.

Referenced by BeforeNextChild(), CreateNode(), SetField(), and SetRootClass().

void TRootSnifferScanRec::CloseNode ( )

close started node

Definition at line 177 of file TRootSniffer.cxx.

Referenced by TRootSniffer::ScanHierarchy(), and ~TRootSnifferScanRec().

void TRootSnifferScanRec::CreateNode ( const char *  _node_name)

Starts new node, must be closed at the end.

creates new node with specified name if special symbols like "[]&<>" are used, node name will be replaced by default name like "extra_item_N" and original node name will be recorded as "_original_name" field Optionally, object name can be recorded as "_realname" field

Definition at line 163 of file TRootSniffer.cxx.

Referenced by GoInside(), and TRootSniffer::ScanHierarchy().

Int_t TRootSnifferScanRec::Depth ( ) const

Returns depth of hierarchy.

returns current depth of scanned hierarchy

Definition at line 265 of file TRootSniffer.cxx.

Bool_t TRootSnifferScanRec::Done ( ) const

Method indicates that scanning can be interrupted while result is set.

returns true if scanning is done Can happen when searched element is found

Definition at line 200 of file TRootSniffer.cxx.

Referenced by GoInside(), IsReadyForResult(), TRootSniffer::ScanObjectMembers(), and SetFoundResult().

Bool_t TRootSnifferScanRec::GoInside ( TRootSnifferScanRec super,
TObject obj,
const char *  obj_name = 0,
TRootSniffer sniffer = 0 
)

Method verifies if new level of hierarchy should be started with provided object.

If required, all necessary nodes and fields will be created Used when different collection kinds should be scanned

Definition at line 310 of file TRootSniffer.cxx.

Referenced by TRootSniffer::ScanCollection(), TRootSniffer::ScanObjectMembers(), and TRootSniffer::ScanRoot().

Bool_t TRootSnifferScanRec::IsReadOnly ( Bool_t  dflt = kTRUE)

Returns read-only flag for current item.

returns read-only flag for current item Depends from default value and current restrictions

Definition at line 297 of file TRootSniffer.cxx.

Referenced by TRootSniffer::ScanCollection(), and TRootSniffer::ScanObjectChilds().

Bool_t TRootSnifferScanRec::IsReadyForResult ( ) const

Checks if result will be accepted.

Used to verify if sniffer should read object from the file

Definition at line 219 of file TRootSniffer.cxx.

Referenced by TRootSniffer::ScanCollection(), and SetFoundResult().

void TRootSnifferScanRec::MakeItemName ( const char *  objname,
TString itemname 
)

Construct item name, using object name as basis.

constructs item name from object name if special symbols like '/', '#', ':', '&', '?' are used in object name they will be replaced with '_'.

To avoid item name duplication, additional id number can be appended

Definition at line 120 of file TRootSniffer.cxx.

Referenced by GoInside().

Bool_t TRootSnifferScanRec::ScanOnlyFields ( ) const
inline

Definition at line 66 of file TRootSniffer.h.

Referenced by GoInside(), and TRootSniffer::ScanCollection().

void TRootSnifferScanRec::SetField ( const char *  name,
const char *  value,
Bool_t  with_quotes = kTRUE 
)
Bool_t TRootSnifferScanRec::SetFoundResult ( void obj,
TClass cl,
TDataMember member = 0 
)

Set found element with class and datamember (optional)

set results of scanning when member specified, obj is pointer on object to which member belongs

Definition at line 250 of file TRootSniffer.cxx.

Referenced by TRootSniffer::ScanObjectMembers(), and SetResult().

Bool_t TRootSnifferScanRec::SetResult ( void obj,
TClass cl,
TDataMember member = 0 
)

Obsolete, use SetFoundResult instead.

set results of scanning when member should be specified, use SetFoundResult instead

Definition at line 238 of file TRootSniffer.cxx.

Referenced by TRootSniffer::ScanCollection().

void TRootSnifferScanRec::SetRootClass ( TClass cl)

Mark item with ROOT class and correspondent streamer info.

set root class name as node kind in addition, path to master item (streamer info) specified Such master item required to correctly unstream data on JavaScript

Definition at line 190 of file TRootSniffer.cxx.

Referenced by TRootSniffer::ScanCollection(), and TRootSniffer::ScanObjectMembers().

Friends And Related Function Documentation

friend class TRootSniffer
friend

Definition at line 25 of file TRootSniffer.h.

Member Data Documentation

Bool_t TRootSnifferScanRec::fHasMore
protected

object to store results

Definition at line 48 of file TRootSniffer.h.

Referenced by CanExpandItem(), GoInside(), TRootSniffer::ScanCollection(), and TRootSniffer::ScanObjectMembers().

TString TRootSnifferScanRec::fItemName
protected

current level of hierarchy

Definition at line 43 of file TRootSniffer.h.

Referenced by BuildFullName(), and GoInside().

TList TRootSnifferScanRec::fItemsNames
protected

name of current item

Definition at line 44 of file TRootSniffer.h.

Referenced by MakeItemName(), and TRootSnifferScanRec().

Int_t TRootSnifferScanRec::fLevel
protected

current path searched

Definition at line 42 of file TRootSniffer.h.

Referenced by BeforeNextChild(), CloseNode(), CreateNode(), GoInside(), TRootSniffer::ScanCollection(), and SetField().

UInt_t TRootSnifferScanRec::fMask
protected
Bool_t TRootSnifferScanRec::fNodeStarted
protected

indicates that potentially there are more items can be found

Definition at line 49 of file TRootSniffer.h.

Referenced by CloseNode(), and CreateNode().

Int_t TRootSnifferScanRec::fNumChilds
protected

number of fields

Definition at line 51 of file TRootSniffer.h.

Referenced by BeforeNextChild(), CloseNode(), and SetFoundResult().

Int_t TRootSnifferScanRec::fNumFields
protected

indicate if node was started

Definition at line 50 of file TRootSniffer.h.

Referenced by BeforeNextChild(), and SetField().

TRootSnifferScanRec* TRootSnifferScanRec::fParent
protected

Definition at line 39 of file TRootSniffer.h.

Referenced by BuildFullName(), CanExpandItem(), CreateNode(), Depth(), and GoInside().

Int_t TRootSnifferScanRec::fRestriction
protected

list of created items names, need to avoid duplication

Definition at line 45 of file TRootSniffer.h.

Referenced by GoInside(), IsReadOnly(), and SetFoundResult().

const char* TRootSnifferScanRec::fSearchPath
protected

defines operation kind

Definition at line 41 of file TRootSniffer.h.

Referenced by TRootSniffer::FindInHierarchy(), GoInside(), IsReadyForResult(), and TRootSniffer::ScanHierarchy().

TRootSnifferStore* TRootSnifferScanRec::fStore
protected

restriction 0 - default, 1 - read-only, 2 - full access

Definition at line 47 of file TRootSniffer.h.

Referenced by BeforeNextChild(), CloseNode(), CreateNode(), Done(), TRootSniffer::FindInHierarchy(), GoInside(), IsReadyForResult(), TRootSniffer::ScanHierarchy(), SetField(), SetFoundResult(), and SetResult().


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