library: libCore #include "TRefTable.h" |
TRefTable
class description - source file - inheritance tree (.pdf)
public:
TRefTable()
TRefTable(TObject* owner, Int_t size)
TRefTable(const TRefTable&)
virtual ~TRefTable()
virtual Int_t Add(Int_t uid)
static TClass* Class()
virtual void Clear(Option_t* = "")
virtual Int_t Expand(Int_t newsize)
virtual void FillBuffer(TBuffer& b)
Int_t GetN() const
TObject* GetOwner() const
TObject* GetParent(Int_t uid) const
TObjArray* GetParents() const
static TRefTable* GetRefTable()
Int_t GetSize() const
UInt_t GetUID() const
virtual TClass* IsA() const
virtual Bool_t Notify()
TRefTable& operator=(const TRefTable&)
virtual void ReadBuffer(TBuffer& b)
virtual Int_t SetParent(const TObject* parent)
static void SetRefTable(TRefTable* table)
virtual void SetUID(UInt_t uid)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
protected:
Int_t fSize allocated size of array fParentIDs
Int_t fN current maximum number of IDs in array fParentIDs
Int_t* fParentIDs [fSize] array of Parent IDs
Int_t fParentID current parent ID in fParents (latest call to SetParent)
UInt_t fUID !Current uid (set by TRef::GetObject)
TObjArray* fParents array of Parent objects (eg TTree branch) holding the referenced objects
TObject* fOwner Object owning this TRefTable
static TRefTable* fgRefTable Pointer to current TRefTable
TRefTable
A TRefTable maintains the association between a referenced object
and the parent object supporting this referenced object.
The parent object is typically a branch of a TTree.
TRefTable()
Default constructor for I/O
TRefTable(TObject *owner, Int_t size)
Create a TRefTable with initial size
~TRefTable()
Int_t Add(Int_t uid)
add a new uid to the table
we add a new pair (uid,fparent) to the map
This function is called by TObject::Streamer or TStreamerInfo::WriteBuffer
void Clear(Option_t * /*option*/)
clear all entries in the table
Int_t Expand(Int_t newsize)
expand fParentID to newsize
void FillBuffer(TBuffer &b)
fill buffer b with the fN elements in fParentdIDs
This function is called by TBranchRef::FillLeaves
TObject* GetParent(Int_t uid) const
return object corresponding to uid
TRefTable* GetRefTable()
static function returning the current TRefTable
Bool_t Notify()
This function is called by TRef::Streamer or TStreamerInfo::ReadBuffer
when reading a reference.
This function, in turns, notifies the TRefTable owner for action.
eg, when the owner is a TBranchRef, TBranchRef::Notify is called
to read the branch containing the referenced object.
void ReadBuffer(TBuffer &b)
fill buffer b with the fN elements in fParentdIDs
This function is called by TBranchRef::ReadLeaves
Int_t SetParent(const TObject *parent)
Set Current parent object
The parent object is typically a branch of a Tree.
This function is called by TBranchElement::Fill
void SetRefTable(TRefTable *table)
static function setting the current TRefTable
Inline Functions
Int_t GetSize() const
Int_t GetN() const
TObject* GetOwner() const
TObjArray* GetParents() const
UInt_t GetUID() const
void SetUID(UInt_t uid)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
TRefTable TRefTable(const TRefTable&)
TRefTable& operator=(const TRefTable&)
Author: Rene Brun 28/09/2001
Last update: root/cont:$Name: $:$Id: TRefTable.cxx,v 1.3 2004/08/24 10:41:58 brun Exp $
Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.