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 28 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. | |
TClassRef (const TClassRef &) | |
Copy ctor, increases reference count to original TClass object. | |
TClassRef (TClass *cl) | |
Add reference to specified class object. | |
~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. | |
void | Assign (TClass *) |
Assignment operator, increases reference count to original class object. | |
TClass * | InternalGetClass () const |
Return the current TClass object corresponding to fClassName. | |
Private Attributes | |
std::string | fClassName |
TClass *const * | fClassPtr |
Friends | |
class | TClass |
Ptr to the permanent TClass ptr/reference. | |
#include <TClassRef.h>
|
inline |
Definition at line 40 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 59 of file TClassRef.h.
|
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.
|
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.
|
inline |
Definition at line 66 of file TClassRef.h.
|
inline |
Definition at line 65 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 70 of file TClassRef.h.
|
inline |
Definition at line 69 of file TClassRef.h.
Definition at line 44 of file TClassRef.h.
Definition at line 51 of file TClassRef.h.
|
inline |
Definition at line 67 of file TClassRef.h.
|
inline |
Definition at line 61 of file TClassRef.h.
|
friend |
Ptr to the permanent TClass ptr/reference.
Definition at line 34 of file TClassRef.h.
|
private |
Definition at line 31 of file TClassRef.h.
|
private |
Definition at line 32 of file TClassRef.h.