Logo ROOT   6.10/09
Reference Guide
List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
TClassRef Class Reference

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.

Definition at line 29 of file TClassRef.h.

Public Member Functions

 TClassRef ()
 
 TClassRef (TClass *cl)
 Add reference to specified class object. More...
 
 TClassRef (const char *classname)
 Create reference to specified class name, but don't set referenced class object. More...
 
 TClassRef (const TClassRef &)
 Copy ctor, increases reference count to original TClass object. More...
 
 ~TClassRef ()
 
TClassGetClass () const
 
const char * GetClassName ()
 
 operator TClass * () const
 
TClassoperator-> () const
 
TClassRefoperator= (const TClassRef &rhs)
 
TClassRefoperator= (TClass *rhs)
 
void Reset ()
 
void SetName (const char *new_name)
 

Private Member Functions

void Assign (const TClassRef &)
 Assignment operator implementation, increases reference count to original class object. More...
 
void Assign (TClass *)
 Assignment operator, increases reference count to original class object. More...
 
TClassInternalGetClass () const
 Return the current TClass object corresponding to fClassName. More...
 

Private Attributes

std::string fClassName
 
TClass *const * fClassPtr
 

Friends

class TClass
 Ptr to the permanent TClass ptr/reference. More...
 

#include <TClassRef.h>

Constructor & Destructor Documentation

◆ TClassRef() [1/4]

TClassRef::TClassRef ( )
inline

Definition at line 45 of file TClassRef.h.

◆ TClassRef() [2/4]

TClassRef::TClassRef ( TClass cl)

Add reference to specified class object.

Definition at line 47 of file TClassRef.cxx.

◆ TClassRef() [3/4]

TClassRef::TClassRef ( const char *  classname)

Create reference to specified class name, but don't set referenced class object.

Definition at line 39 of file TClassRef.cxx.

◆ TClassRef() [4/4]

TClassRef::TClassRef ( const TClassRef org)

Copy ctor, increases reference count to original TClass object.

Definition at line 30 of file TClassRef.cxx.

◆ ~TClassRef()

TClassRef::~TClassRef ( )
inline

Definition at line 64 of file TClassRef.h.

Member Function Documentation

◆ Assign() [1/2]

void TClassRef::Assign ( const TClassRef rhs)
private

Assignment operator implementation, increases reference count to original class object.

This routines assumes that the copy actually need to be done.

Definition at line 59 of file TClassRef.cxx.

◆ Assign() [2/2]

void TClassRef::Assign ( TClass rhs)
private

Assignment operator, increases reference count to original class object.

This routines assumes that the copy actually need to be done.

Definition at line 69 of file TClassRef.cxx.

◆ GetClass()

TClass* TClassRef::GetClass ( ) const
inline

Definition at line 71 of file TClassRef.h.

◆ GetClassName()

const char* TClassRef::GetClassName ( )
inline

Definition at line 70 of file TClassRef.h.

◆ InternalGetClass()

TClass * TClassRef::InternalGetClass ( ) const
private

Return the current TClass object corresponding to fClassName.

Definition at line 83 of file TClassRef.cxx.

◆ operator TClass *()

TClassRef::operator TClass * ( ) const
inline

Definition at line 75 of file TClassRef.h.

◆ operator->()

TClass* TClassRef::operator-> ( ) const
inline

Definition at line 74 of file TClassRef.h.

◆ operator=() [1/2]

TClassRef& TClassRef::operator= ( const TClassRef rhs)
inline

Definition at line 49 of file TClassRef.h.

◆ operator=() [2/2]

TClassRef& TClassRef::operator= ( TClass rhs)
inline

Definition at line 56 of file TClassRef.h.

◆ Reset()

void TClassRef::Reset ( void  )
inline

Definition at line 72 of file TClassRef.h.

◆ SetName()

void TClassRef::SetName ( const char *  new_name)
inline

Definition at line 66 of file TClassRef.h.

Friends And Related Function Documentation

◆ TClass

friend class TClass
friend

Ptr to the permanent TClass ptr/reference.

Definition at line 39 of file TClassRef.h.

Member Data Documentation

◆ fClassName

std::string TClassRef::fClassName
private

Definition at line 32 of file TClassRef.h.

◆ fClassPtr

TClass* const* TClassRef::fClassPtr
private

Definition at line 36 of file TClassRef.h.


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