|
| Array () |
| Default constructs zero-length array
|
|
| Array (decltype(nullptr)) |
| Implicit conversion constructor from nullptr to a zero-length array
|
|
| Array (T *ptr, size_t size) |
| Constructs array from pointer and size
|
|
| Array (T *begin, T *end) |
| Constructs array from begin and end iterators
|
|
size_t | size () const |
| Gets size of array
|
|
bool | empty () const |
| Returns true if array is zero length
|
|
T * | data () |
| Gets mutable raw pointer to array data
|
|
const T * | data () const |
| Gets immutable raw pointer to array data
|
|
T * | begin () |
| Gets mutable iterator pointing to beginning of array
|
|
const T * | begin () const |
| Gets immutable iterator pointing to beginning of array
|
|
T * | end () |
| Gets mutable iterator pointing to one past the end of array
|
|
const T * | end () const |
| Gets iterator pointing to one past the end of array
|
|
T & | front () |
| Gets mutable reference to first array element
|
|
const T & | front () const |
| Gets immutable reference to first array element
|
|
T & | back () |
| Gets mutable reference to last array element
|
|
const T & | back () const |
| Gets immutable reference to last array element
|
|
T & | operator[] (size_t index) |
| Mutable index operator into array 更多...
|
|
const T & | operator[] (size_t index) const |
| Immutable index operator into array 更多...
|
|
Array< T > | slice (size_t start, size_t end) |
| Creates a mutable sub-array of the same type based on a start and end index 更多...
|
|
Array< const T > | slice (size_t start, size_t end) const |
| Creates an immutable sub-array of the same type based on a start and end index 更多...
|
|
bool | operator== (const Array &other) const |
| Identity based equality operator
|
|
bool | operator!= (const Array &other) const |
| Identity based inequality operator
|
|
template<typename T>
class astra::Array< T >
Simple wrapper around primitive arrays
Provides a strongly-typed wrapper around primitive C-style arrays. Array does not copy or consider itself the owner of the data provided through the constructor. Users should make sure that the Array instance does not live longer than the data it points to.
- 示例
- SimpleBodyViewer-SFML\main.cpp.