![]() |
CopperSpice API
1.7.4
|
The QScopedArrayPointer class stores a pointer to a dynamically allocated array of objects, and deletes it upon destruction. More...
Public Methods | |
QScopedArrayPointer () | |
T & | operator[] (int i) |
const T & | operator[] (int i) const |
![]() | |
QScopedPointer (QScopedPointer< T, Cleanup > &&other) | |
QScopedPointer (T *p=nullptr) | |
~QScopedPointer () | |
T * | data () const |
bool | isNull () const |
operator RestrictedBool () const | |
bool | operator! () const |
T & | operator* () const |
T * | operator-> () const |
QScopedPointer< T, Cleanup > & | operator= (QScopedPointer< T, Cleanup > &&other) |
void | reset (T *other=nullptr) |
void | swap (QScopedPointer< T, Cleanup > &other) |
T * | take () |
The QScopedArrayPointer class stores a pointer to a dynamically allocated array of objects, and deletes it upon destruction. A QScopedArrayPointer is a QScopedPointer that defaults to deleting the object it is pointing to with the delete[] operator. It also features operator[] for convenience, so we can write the following code.
|
inline |
Constructs a QScopedArrayPointer instance.
|
inline |
Provides access to entry i of the scoped pointer's array of objects. If the contained pointer is null
, behavior is undefined.
|
inline |
Provides access to entry i of the scoped pointer's array of objects.
If the contained pointer is null
, behavior is undefined.