Declared in <XAutoPtr.h>
Automatic pointer, like auto_ptr, except that I did it myself.
The rules are simple: this is a substitute for Tptr, except that I cannot manipulate the pointer, I cannot copy to another pointer, and I must either explicitly release the pointer to the world (like TWindow objects) or return the value--both cause this pointer to become NULL.
Construction/Destruction
Access To Pointer
autoptr::operator !
autoptr::operator !=
autoptr::operator !=
autoptr::operator *
autoptr::operator ->
autoptr::operator ==
autoptr::operator ==
Pointer Processing
Construction/Destruction
Usage: autoptr(T*ptr=NULL)
Construction Class. This creates an automatic pointer on the stack. This can be initialized with an object or without.
Usage: const autoptr&operator=(T*ptr)
Initializes this with a pointer.
Usage: ~autoptr()
Destruction class. If this still points to an object, this calls the object's destructor. This makes this an exception safe mechanism for storing temporary pointers.
Access To Pointer
Usage: int operator!()
This returns true if the pointer is NULL.
Usage: int operator!=(const T*a)
This returns true if two pointers are not equal.
Usage: int operator!=(const autoptr&ptr)
This returns true if two pointers are not equal.
Usage: T&operator*()
This emulates the normal operator to permit access to the contents of a class or structure.
Usage: T*operator-tr&o()
This emulates the normal -> operator to allow access to fields in a class or structure.
Usage: int operator==(const T*a)
This returns true if two pointers are equal.
Usage: int operator==(const autoptr&ptr)
This returns true if two pointers are equal.
Pointer Processing
Usage: void Detach()
No comment provided
Usage: T*Ptr()
No comment provided
Usage: T*Return()
No comment provided