#include <type_allocator.h>
Public Methods | |
| wrap_ptr (const T *p=0) | |
| Default constructor is 0 pointer. More... | |
| wrap_ptr (const wrap_ptr<T>& w) | |
| Create wrapped ptr from a wrapped pointer. More... | |
| wrap_ptr<T>& | operator= (const wrap_ptr<T>& w) |
| Make two objects equal. | |
| ~wrap_ptr () | |
| Object does not own memory. | |
| void | destroy_obj () |
| Object does not own memory. | |
| operator const T * () const | |
| Cast operator to void * pointer. More... | |
| operator T * () | |
Friends | |
| int | operator== (const wrap_ptr<T>& a, const wrap_ptr<T>& b) |
| Equality operator. More... | |
This class wraps T * but 0 memory. Useful for arrays (because allocated memory needs to be 0). Not required if just a regular list.
|
||||
|
Default constructor is 0 pointer.
|
|
||||
|
Create wrapped ptr from a wrapped pointer.
|
|
||||
|
Cast operator to void * pointer.
|
|
||||
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
||||||
|
Equality operator. Pointers must be equal. |
1.2.0 written by Dimitri van Heesch,
© 1997-2000