CopperSpice API
1.9.2
|
Contains a pointer to a dynamically allocated array. More...
Public Methods | |
QScopedArrayPointer (QScopedArrayPointer< element_type > &&other) noexcept | |
QScopedArrayPointer (QScopedArrayPointer< element_type[]> &&other) noexcept | |
QScopedArrayPointer & | operator= (QScopedArrayPointer< element_type > &&other) noexcept |
QScopedArrayPointer & | operator= (QScopedArrayPointer< element_type[]> &&other) noexcept |
T & | operator[] (std::size_t index) const noexcept |
Public Methods inherited from QScopedPointer< T, Deleter > | |
QScopedPointer (Pointer p, Deleter d) noexcept | |
QScopedPointer (Pointer p=nullptr) noexcept | |
QScopedPointer (QScopedPointer< T, Deleter > &&other) | |
QScopedPointer (std::unique_ptr< T, Deleter > &&p) noexcept | |
~QScopedPointer () | |
Pointer | data () const noexcept |
Pointer | get () const noexcept |
const Deleter & | get_deleter () const noexcept |
Deleter & | get_deleter () noexcept |
bool | isNull () const noexcept |
operator bool () const noexcept | |
bool | operator! () const noexcept |
ElementType & | operator* () const noexcept |
Pointer | operator-> () const noexcept |
QScopedPointer & | operator= (QScopedPointer< T, Deleter > &&other) |
Pointer | release () noexcept |
void | reset (Pointer other=nullptr) |
void | swap (QScopedPointer< T, Deleter > &other) noexcept |
Pointer | take () noexcept |
Related Functions | |
These are not member functions | |
QScopedArrayPointer< T > | QMakeScoped (std::size_t size) |
QScopedArrayPointer< T > | QMakeUnique (std::size_t size) |
Related Functions inherited from QScopedPointer< T, Deleter > | |
bool | operator!= (const QScopedPointer< T, Deleter > &ptr1, std::nullptr_t) |
bool | operator!= (const QScopedPointer< T1, Deleter1 > &ptr1, const QScopedPointer< T2, Deleter2 > &ptr2) |
bool | operator!= (const QScopedPointer< T1, Deleter1 > &ptr1, const T2 *ptr2) |
bool | operator!= (const T1 *ptr1, const QScopedPointer< T2, Deleter2 > &ptr2) |
bool | operator!= (std::nullptr_t, const QScopedPointer< T, Deleter > &ptr2) |
bool | operator< (const QScopedPointer< T1 > &ptr1, const QScopedPointer< T2 > ptr2) |
bool | operator<= (const QScopedPointer< T1 > &ptr1, const QScopedPointer< T2 > ptr2) |
bool | operator== (const QScopedPointer< T, Deleter > &ptr1, std::nullptr_t) |
bool | operator== (const QScopedPointer< T1, Deleter1 > &ptr1, const QScopedPointer< T2, Deleter2 > &ptr2) |
bool | operator== (const QScopedPointer< T1, Deleter1 > &ptr1, const T2 *ptr2) |
bool | operator== (const T1 *ptr1, const QScopedPointer< T2, Deleter2 > &ptr2) |
bool | operator== (std::nullptr_t, const QScopedPointer< T, Deleter > &ptr2) |
bool | operator> (const QScopedPointer< T1 > &ptr1, const QScopedPointer< T2 > ptr2) |
bool | operator>= (const QScopedPointer< T1 > &ptr1, const QScopedPointer< T2 > ptr2) |
QScopedPointer< T > | QMakeScoped (Args &&...args) |
QScopedPointer< T > | QMakeUnique (Args &&...args) |
Additional Inherited Members | |
Public Typedefs inherited from QScopedPointer< T, Deleter > | |
using | deleter_type = typename std::unique_ptr< T, Deleter >::deleter_type |
using | DeleterType = deleter_type |
using | element_type = typename std::unique_ptr< T, Deleter >::element_type |
using | ElementType = element_type |
using | pointer = typename std::unique_ptr< T, Deleter >::pointer |
using | Pointer = pointer |
The QScopedArrayPointer class contains a pointer to a dynamically allocated array of objects. This class inherits from QScopedPointer and implements the operator[] method which returns a specific element in the array. When this class is destroyed the array it points to is also destroyed.
Refer to the QScopedPointer documentation for inherited methods like get(), isNull, and release().
|
noexcept |
Move constructs a new QScopedArrayPointer from other.
|
noexcept |
Move constructs a new QScopedArrayPointer from other.
|
noexcept |
Move assigns from other and returns a reference to this object.
|
noexcept |
Move assigns from other and returns a reference to this object.
|
noexcept |
Returns a reference to the element located at the given index of the array. If this smart pointer is a nullptr then the behavior is undefined.
|
related |
Constructs a new array containing elements of type T. The number of elements in the array will be equal to the value for size. Each element will be value initialized.
Refer to default constructed elements for additional information.
|
related |
Equivalent to calling QMakeScoped().