ROOT » CORE » META » TClassRef

class TClassRef


TClassRef is used to implement a permanent reference to a TClass
object.  In particular this reference will change if and when the
TClass object is regenerated.  This regeneration usually happens
when a library containing the described class is loaded after a
file containing an instance of this class has been opened.

The references kept track of using an intrusive double linked list.
The intrusive list is maintained by TClass::AddRef and
TClass::RemoveRef.  The 'start' of the list is held in
TClass::fRefStart.


Function Members (Methods)

public:
~TClassRef()
TClass*GetClass() const
const char*GetClassName()
TClass*operator TClass *() const
TClass*operator->() const
TClassRef&operator=(const TClassRef& rhs)
TClassRef&operator=(TClass* rhs)
voidReset()
voidSetName(const char* new_name)
TClassRef()
TClassRef(TClass* cl)
TClassRef(const char* classname)
TClassRef(const TClassRef&)
private:
voidAssign(const TClassRef&)
voidAssign(TClass*)
TClass*InternalGetClass() const
voidListReset()

Data Members

private:
stringfClassNameName of referenced class
TClass*fClassPtr! Ptr to the TClass object
TClassRef*fNext! link to the next refs
TClassRef*fPrevious! link to the previous refs

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TClassRef(const TClassRef& )
 Copy ctor, increases reference count to original TClass object.
TClassRef(const char* classname)
 Create reference to specified class name, but don't set referenced
 class object.
TClassRef(TClass* cl)
 Add reference to specified class object.
void Assign(const TClassRef& )
 Assignment operator implementation, increases reference count to original class object.
 This routines assumes that the copy actually need to be done.
void Assign(TClass* )
 Assignment operator, increases reference count to original class object.
 This routines assumes that the copy actually need to be done.
TClass * InternalGetClass() const
 Return the current TClass object corresponding to fClassName.
void ListReset()
 Reset this object and all the objects in the list.
 We assume that the TClass has also reset its fRefStart data member.
TClassRef()
{}
TClassRef & operator=(const TClassRef& rhs)
 Inline implementation of operator= to speed the no-op case.
TClassRef & operator=(TClass* rhs)
 Inline implementation of operator= to speed the no-op case.
~TClassRef()
{ if (fClassPtr) fClassPtr->RemoveRef(this); }
void SetName(const char* new_name)
const char * GetClassName()
{ return fClassName.c_str(); }
TClass * GetClass() const
void Reset()
{ if (fClassPtr) fClassPtr->RemoveRef(this); fClassPtr = 0; }
TClass* operator->() const