|
3ds Max C++ API Reference
|
Standard implementation of a AutoPtr for pointer to array types. More...
#include <C:/adskgit/3dsmax/3dsmax/3dswin/src/maxsdk/include/autoptr.h>
Public Member Functions | |
| ArrayAutoPtr (Type *p=NULL) | |
| Construct, assuming ownership of the pointed-to object. | |
| ArrayAutoPtr (const AutoPtrRef< Type > &ref) | |
| Construct from an AutoPtrRef. | |
| template<typename OtherType> | |
| operator ArrayAutoPtr< OtherType > () | |
| Destructive copy-convert allowing for cast of the pointer type. | |
| Type & | operator[] (int index) const |
| Convenience array-index operator for ArrayAutoPtrs. | |
| Public Member Functions inherited from AutoPtr< Type, ArrayPointerDestructor< Type > > | |
| AutoPtr (Type *p=NULL) | |
| Construct, assuming ownership of the pointed-to object. | |
| ~AutoPtr () | |
| Destructor - automatically cleans up the pointed-to object. | |
| AutoPtr & | operator= (const AutoPtr &a) |
| Assignment, takes over ownership from the source AutoPtr. | |
| Type & | operator* () const |
| Dereferencing operator - works exactly like a plain pointer's operator*. | |
| Type * | operator-> () const |
| Pointer-to-member dereferencing operator - works exactly like a plain pointer's operator->. | |
| Type * | Get () const |
| Get the plain pointer back. | |
| Type * | Release () |
| Relinquish ownership of the pointed-to object to the caller. | |
| void | Reset (Type *p=NULL) |
| Assume ownership of a new object, any existing pointer will be deleted. | |
| bool | IsNull () const |
| Addition to the textbook interface. | |
| operator AutoPtrRef< OtherType > () | |
| Convert to an AutoPtrRef. | |
| operator AutoPtr< OtherType, ArrayPointerDestructor< Type > > () | |
| Destructive copy-convert allowing for cast of the pointer type. | |
Additional Inherited Members | |
| Public Types inherited from AutoPtr< Type, ArrayPointerDestructor< Type > > | |
| typedef Type | element_type |
| Typedef to make the element type a member of the class. | |
| typedef ArrayPointerDestructor< Type > | destructor |
| Typedef to make the DestructionPolicy type a member of the class. | |
Standard implementation of a AutoPtr for pointer to array types.
This ArrayAutoPtr template is appropriate for any pointer to a dynamically allocated array (using new [] and delete []). To manage a single dynamically allocated object, use AutoPtr instead.
Please refer to AutoPtr's documentation for more information about AutoPtrs.
|
inlineexplicit |
Construct, assuming ownership of the pointed-to object.
| p | Plain pointer to an array - this AutoPtr will assume ownership of that object. |
|
inline |
Construct from an AutoPtrRef.
This may be done implicitly or explicitly. The Ref object exists to avoid temporarily needing to have two AutoPtrs own the same object.
| ref | helper object. |
Destructive copy-convert allowing for cast of the pointer type.
|
inline |
Convenience array-index operator for ArrayAutoPtrs.
Using this operator is the same as calling Get()[index]. Note that this operator does not check if the index is out of bounds. This is not a bounds checking smart pointer, it's just a handy guard object for dealing with memory ownership.
| index | The index within the array |