#include <link.h>
Inheritance diagram for TLink:
Public Methods | |
TLink () | |
TLink (const TObjectID &DestID) | |
TLink (X *p) | |
TLink (const TLink< X > &link) | |
operator X * () const | |
X * | operator-> () const |
X * | getPointerToDest () const |
virtual int2 | getType () const |
void | setDest (X *p) |
virtual void | setNull () |
Private Methods | |
virtual void | setDest (TLinkable *) |
Friends | |
class | TLinkUpdate |
See TLinkBase for more general information about links.
|
Converts the pointer (to a TLinkable) to a pointer to the real object. If the conversion fails the method calls the Fatal function.
|
|
Reimplemented from TLinkBase. Reimplemented in TDoubleLink. |
|
Casts the link to a pointer. Note: this method is similar to getPointerToDest with the exception that an error message is triggered if the dest pointer is zero.
|
|
This allows using a link in the same way as a pointer. E.g. the following code is exactly doing what you would expect:
TFoo f; // derived from TLinkable link<TFoo> l( &f ); l->aMethodOfTFoo();
|
|
Makes the implementation of TLinkBase::setDest private. This is neccessary because we now need the exact type of the destination object (otherwise it would be possible to pass an pointer to an object with the wrong (!=X) type. Note that there is another setDest method with correct type checking. Reimplemented from TLinkBase. |
|
Sets a link to an object type of X.
|
|
Reimplemented from TLinkBase. |