![]() ![]() Not Left, nor right. Just correct. |
Not a Member? - Login or Create an Account |
![]() |
Wednesday the 10th of March 2010 @ 06:24pm |
LibN2L-4 Library Code ReferenceClassesCompounds Files Members Method Index Full Reference n2l::cAutoPtr< TPtr > Class Template ReferenceA template based reference counting auto pointer. More...
Public Member Functions
Detailed Descriptiontemplate<class TPtr>
A template based reference counting auto pointer.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||
|
Standard boring default constructor. Make the autopointer null by default. Definition at line 84 of file cAutoPtr.h. |
|
||||||||||
|
Standard copy constructor.
Definition at line 94 of file cAutoPtr.h. |
|
||||||||||
|
Construct & take control of a passed dumb pointer.
Definition at line 104 of file cAutoPtr.h. |
|
|||||||||
|
Deconstruct this pointer by releasing its reference. See release() for more information. Definition at line 113 of file cAutoPtr.h. |
|
||||||||||
|
Set the address of the actual internal instance. This should never EVER be used by outside methods. It is provided publicly only to allow typcasting to other cAutoPtr instances of other types. Any use of these methods besides strictly in the typecast provided in this class is *strictly and expressly* not allowed. Any use of this method in any other way should be considered a critical error and may result in leaks, segfaults, and undefined behaviour. You have been warned. The more appropriate way to do this is with a friend template, which apparently isn't implemented correctly on some compilers.
Definition at line 303 of file cAutoPtr.h. Referenced by n2l::cAutoPtr< cSubSysHolder >::as(), and n2l::cAutoPtr< cSubSysHolder >::operator cAutoPtr(). |
|
||||||||||
|
Set the address of the actual internal instance. This should never EVER be used by outside methods. It is provided publicly only to allow typcasting to other cAutoPtr instances of other types. Any use of these methods besides strictly in the typecast provided in this class is *strictly and expressly* not allowed. Any use of this method in any other way should be considered a critical error and may result in leaks, segfaults, and undefined behaviour. You have been warned. The more appropriate way to do this is with a friend template, which apparently isn't implemented correctly on some compilers.
Definition at line 284 of file cAutoPtr.h. Referenced by n2l::cAutoPtr< cSubSysHolder >::as(), and n2l::cAutoPtr< cSubSysHolder >::operator cAutoPtr(). |
|
|||||||||||||
|
cAutoPtr to cAutoPtr dynamic_cast method which won't throw. Ths method behaves exactly like the cAutoPtr assignment except it will not throw a bad cast exception instead returning a 0 autopointer. Definition at line 313 of file cAutoPtr.h. Referenced by n2l::vfsGetExecBinaryDir(). |
|
||||||||||
|
Take control of the provided pointer and begin reference counting it. May be assigned NULL (or better, 0) to clear the current reference and become a 'null' cAutoPtr. Assigning memory this way will (as always) take control of the memory and delete it automatically when it leaves addressed scope.
Definition at line 159 of file cAutoPtr.h. |
|
||||||||||
|
Share references with another cAutoPtr Appropriately calls release for its current reference, if any. May be assigned a 'null' cAutoPtr to release itself and become a 'null' pointer itself.
Definition at line 132 of file cAutoPtr.h. Referenced by n2l::cAutoPtr< cSubSysHolder >::cAutoPtr(), and n2l::cAutoPtr< cSubSysHolder >::operator=(). |
|
|||||||||
|
Return the value of the internal reference counter.
Definition at line 121 of file cAutoPtr.h. Referenced by n2l::cAutoPtr< cSubSysHolder >::release(). |
|
|||||||||
|
Definition at line 383 of file cAutoPtr.h. Referenced by n2l::cGuiCanvas::add(), and n2l::cParticle::textureID(). |
|
||||||||||
|
Compair a cAutoPtr to a dumb pointer of the same type. Not terribly useful, this allows the compairison of a tValue pointer to the internal tValue pointer.
Definition at line 230 of file cAutoPtr.h. |
|
||||||||||
|
Compair two cAutoPtrs.
Definition at line 216 of file cAutoPtr.h. Referenced by n2l::cAutoPtr< cSubSysHolder >::operator!=(), and n2l::cAutoPtr< cSubSysHolder >::operator==(). |
|
|||||||||
|
|||||||||
|
Dereference override to return the dereferenced internal pointer.
Definition at line 255 of file cAutoPtr.h. |
|
|||||||||||||
|
Definition at line 357 of file cAutoPtr.h. |
|
|||||||||||||
|
cAutoPtr to cAutoPtr dynamic_cast. This allows the dymamic cast of one cAutoPtr<Child> to a cAutoPtr<Parent> and back in a simple assignment. The pointers internal to cAutoPtr should never be discovered and casted manually because it destroys the entire reason for using cAutoPtrs to begin with.
Definition at line 340 of file cAutoPtr.h. |
|
|||||||||
|
Boolean type cast to return 0 or NULL if this cAutoPtr doesn't point to anything. Allows the syntax of checking for a null pointer to be the same for cAutoPtrs as for dumb pointers.
Definition at line 267 of file cAutoPtr.h. |
|
||||||||||
|
Definition at line 248 of file cAutoPtr.h. |
|
||||||||||
|
Definition at line 239 of file cAutoPtr.h. |
|
|||||||||
|
Provide access to internal class members.
Definition at line 260 of file cAutoPtr.h. |
|
||||||||||
|
Definition at line 184 of file cAutoPtr.h. |
|
||||||||||
|
Definition at line 192 of file cAutoPtr.h. |
|
||||||||||
|
An alias to the appropriate assign().
Definition at line 178 of file cAutoPtr.h. |
|
||||||||||
|
An alias to the appropriate assign().
Definition at line 175 of file cAutoPtr.h. |
|
||||||||||
|
An alias to the appropriate equals() method.
Definition at line 244 of file cAutoPtr.h. |
|
||||||||||
|
An alias to the appropriate equals() method.
Definition at line 235 of file cAutoPtr.h. |
|
||||||||||
|
Definition at line 180 of file cAutoPtr.h. |
|
||||||||||
|
Definition at line 188 of file cAutoPtr.h. |
|
|||||||||
|
Release the current reference (deleteing the reference counter and controlled memory as needed. Make the cAutoPtr in effect, a null pointer. Definition at line 200 of file cAutoPtr.h. Referenced by n2l::cAutoPtr< cSubSysHolder >::assign(), and n2l::cAutoPtr< cSubSysHolder >::~cAutoPtr(). |