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 (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 (TClass *cl) | |
Add reference to specified class object. More... | |
~TClassRef () | |
TClass * | GetClass () const |
const char * | GetClassName () |
operator TClass * () const | |
TClass * | operator-> () const |
TClassRef & | operator= (const TClassRef &rhs) |
TClassRef & | operator= (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... | |
TClass * | InternalGetClass () 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>
|
inline |
Definition at line 45 of file TClassRef.h.
TClassRef::TClassRef | ( | TClass * | cl | ) |
Add reference to specified class object.
Definition at line 47 of file TClassRef.cxx.
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::TClassRef | ( | const TClassRef & | org | ) |
Copy ctor, increases reference count to original TClass object.
Definition at line 30 of file TClassRef.cxx.
|
inline |
Definition at line 64 of file TClassRef.h.
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.
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.
|
inline |
Definition at line 71 of file TClassRef.h.
|
inline |
Definition at line 70 of file TClassRef.h.
|
private |
Return the current TClass object corresponding to fClassName.
Definition at line 83 of file TClassRef.cxx.
|
inline |
Definition at line 75 of file TClassRef.h.
|
inline |
Definition at line 74 of file TClassRef.h.
Definition at line 49 of file TClassRef.h.
Definition at line 56 of file TClassRef.h.
Definition at line 72 of file TClassRef.h.
|
inline |
Definition at line 66 of file TClassRef.h.
|
friend |
Ptr to the permanent TClass ptr/reference.
Definition at line 39 of file TClassRef.h.
|
private |
Definition at line 32 of file TClassRef.h.
|
private |
Definition at line 36 of file TClassRef.h.