Description

TOnlyPointerTo(AType* adopt) -- adopts the given object. If the given pointer is NIL, the resulting TOnlyPointerTo does not point to any object.

TOnlyPointerTo(TOnlyPointerTo& transfer) -- transfers ownership from the given TOnlyPointerTo to this one, using transfer.Orphan().

~TOnlyPointerTo() -- destroys the object being pointed to (if any).

operator=(AType* adopt) -- adopts the new object (if any) and destroys the object (if any) to which this wrapper pointed previously.

operator=(TOnlyPointerTo& transfer) -- transfers ownership from the given TOnlyPointerTo to this one, using transfer.Orphan(), and destroys the object (if any) to which this wrapper pointed previously.

Orphan() -- returns a copy of the pointer, and releases the management of it. GetAlias() will subsequently return NIL.

operator ==(), operator !=() -- compare the pointers for equality. operator == returns kTrue if they point to the same object, or if they are both NIL; otherwise it returns kFalse. operator != is the Boolean negation of operator ==.

Resurrect (TOnlyPointerTo<AType>&, TStream& from,...) -- resurrects an object from a stream, and assigns a pointer to the resurrected object into the wrapper. This function won't compile unless Resurrect(AType*&, TStream&) is available.

TOnlyPointerTo also inherits the interface and implementation of TPointerTo.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker