Base class for SDL memory allocated array wrap.
More...
|
constexpr | OwnArray (std::nullptr_t=nullptr) |
|
constexpr | OwnArray (T *ptr, size_t size) |
|
constexpr | OwnArray (T *ptr) |
|
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 & | front () |
| Return first element.
|
|
T & | back () |
| Return last element.
|
|
|
T * | begin () |
| Get iterator to first element.
|
|
const T * | begin () const |
|
const T * | cbegin () const |
|
|
T * | end () |
| Get iterator to one past end element.
|
|
const T * | end () const |
|
const T * | cend () const |
|
template<class T>
class SDL::OwnArray< T >
- Template Parameters
-
T | the wrapped array type, without the [] |
- Category:
- Resource
◆ release()
You are responsible to call free() on the returned value, if its different than nullptr.
◆ reset() [1/2]
You are responsible to call free() on the returned value, if its different than nullptr.
◆ reset() [2/2]
You are responsible to call free() on the returned value, if its different than nullptr.
The documentation for this class was generated from the following file: