#include <TCScopedArray.h>
Public Types | |
typedef DATA_TYPE *ThisType::* | unspecified_bool_type |
Public Member Functions | |
ScopedArray () | |
Construct the object pointing to a empty array. | |
ScopedArray (DATA_TYPE *ptr) | |
Construct the object pointing to a specified array. | |
~ScopedArray () | |
Destructor deletes the pointer. | |
const DATA_TYPE & | operator[] (uint32 index) const |
Get element at specified index. | |
DATA_TYPE & | operator[] (uint32 index) |
Get element at specified index. | |
operator unspecified_bool_type () const | |
User define conversion for if like "if (pointer)". | |
bool | operator! () const |
User define conversion for if like "if (!pointer)". | |
Private Types | |
typedef ScopedArray< DATA_TYPE > | ThisType |
Private Attributes | |
DATA_TYPE * | m_array |
TC::ScopedArray mimics a built-in pointer except that it guarantees deletion of the object pointed to on destruction of the TC::ScopedArray TC::ScopedArray is a simple solution for simple needs; use TC::SharedPtr or std::auto_ptr if your needs are more complex.
Definition at line 63 of file TCScopedArray.h.
typedef ScopedArray<DATA_TYPE> TC::ScopedArray< DATA_TYPE, DELETER >::ThisType [private] |
Definition at line 66 of file TCScopedArray.h.
typedef DATA_TYPE* ThisType::* TC::ScopedArray< DATA_TYPE, DELETER >::unspecified_bool_type |
Definition at line 82 of file TCScopedArray.h.
TC::ScopedArray< DATA_TYPE, DELETER >::ScopedArray | ( | ) | [inline] |
TC::ScopedArray< DATA_TYPE, DELETER >::ScopedArray | ( | DATA_TYPE * | ptr | ) | [inline, explicit] |
TC::ScopedArray< DATA_TYPE, DELETER >::~ScopedArray | ( | ) | [inline] |
Destructor deletes the pointer.
Definition at line 75 of file TCScopedArray.h.
References TC::ScopedArray< DATA_TYPE, DELETER >::m_array.
const DATA_TYPE& TC::ScopedArray< DATA_TYPE, DELETER >::operator[] | ( | uint32 | index | ) | const [inline] |
Get element at specified index.
Definition at line 78 of file TCScopedArray.h.
References TC::ScopedArray< DATA_TYPE, DELETER >::m_array.
DATA_TYPE& TC::ScopedArray< DATA_TYPE, DELETER >::operator[] | ( | uint32 | index | ) | [inline] |
Get element at specified index.
Definition at line 80 of file TCScopedArray.h.
References TC::ScopedArray< DATA_TYPE, DELETER >::m_array.
TC::ScopedArray< DATA_TYPE, DELETER >::operator unspecified_bool_type | ( | ) | const [inline] |
User define conversion for if like "if (pointer)".
Definition at line 84 of file TCScopedArray.h.
References TC::ScopedArray< DATA_TYPE, DELETER >::m_array.
bool TC::ScopedArray< DATA_TYPE, DELETER >::operator! | ( | ) | const [inline] |
User define conversion for if like "if (!pointer)".
Definition at line 89 of file TCScopedArray.h.
References TC::ScopedArray< DATA_TYPE, DELETER >::m_array.
DATA_TYPE* TC::ScopedArray< DATA_TYPE, DELETER >::m_array [private] |