|
SDL3pp
A slim C++ wrapper for SDL3
|
Base class for SDL memory allocated array wrap. More...
Public Member Functions | |
| constexpr | OwnArray (std::nullptr_t=nullptr) |
| Constructor. | |
| constexpr | OwnArray (T *ptr, size_t size) |
| Constructor. | |
| constexpr | OwnArray (T *ptr) |
| Constructor. | |
| constexpr | operator bool () const |
| True if not empty. | |
| constexpr bool | empty () const |
| True if size() == 0. | |
| constexpr T * | data () |
| Data. | |
| constexpr const T * | data () const |
| Data. | |
| constexpr size_t | size () const |
| Size. | |
| T * | release () |
| Release control on object. | |
| void | reset (T *newValue=nullptr) |
| Reset object. | |
| void | reset (T *newValue, size_t size) |
| Reset object. | |
| constexpr T & | operator[] (size_t i) |
| Access index. | |
| constexpr const T & | operator[] (size_t i) const |
| Access index. | |
| T * | begin () |
| Get iterator to first element. | |
| const T * | begin () const |
| Get iterator to first element. | |
| const T * | cbegin () const |
| Get iterator to first element. | |
| T * | end () |
| Get iterator to one past end element. | |
| const T * | end () const |
| Get iterator to one past end element. | |
| const T * | cend () const |
| Get iterator to one past end element. | |
| T & | front () |
| Return first element. | |
| T & | back () |
| Return last element. | |
Base class for SDL memory allocated array wrap.
| T | the wrapped array type, without the [] |
|
inline |
Release control on object.
You are responsible to call free() on the returned value, if its different than nullptr.
|
inline |
Reset object.
You are responsible to call free() on the returned value, if its different than nullptr.
|
inline |
Reset object.
You are responsible to call free() on the returned value, if its different than nullptr.