#include <stlsoft/collections/array_view.hpp>

Attributes | |
| pointer | base () |
| Returns the base of the array. | |
| pointer | base () const |
| Returns the base of the array. | |
| size_type | size () const |
| Returns the number of elements in the sequence. | |
| bool | empty () const |
| Indicates whether the search sequence is empty. | |
| static size_type | max_size () |
| Returns the maximum number of elements in the sequence. | |
Public Types | |
Types | |
| typedef T | value_type |
| typedef array_view< T > | class_type |
| typedef value_type * | pointer |
| typedef value_type const * | const_pointer |
| typedef value_type & | reference |
| typedef value_type const & | const_reference |
| typedef size_t | size_type |
| typedef ss_ptrdiff_t | difference_type |
| typedef value_type * | iterator |
| The iterator type. | |
| typedef value_type const * | const_iterator |
| The non-mutable (const) iterator type. | |
Public Member Functions | |
Construction | |
| array_view () | |
| Default constructor, creating a view of 0 size. | |
| template<size_type N> | |
| array_view (T(&t)[N]) | |
| Constructs an instance of the array view from the given array. | |
| array_view (pointer begin, pointer end) | |
| Constructs an instance of the array view from the given range. | |
| array_view (pointer p, size_type n) | |
| Constructs an instance of the array view from the given pointer. | |
| void | swap (class_type &rhs) throw () |
Swaps the contents between this and rhs. | |
Subscripting | |
| reference | operator[] (size_type index) |
| Returns the element at the given index. | |
| const_reference | operator[] (size_type index) const |
| Returns the element at the given index. | |
| reference | at (size_type index) |
| Returns the element at the given index. | |
| const_reference | at (size_type index) const |
| Returns the element at the given index. | |
Iteration | |
| iterator | begin () |
| Begins the iteration. | |
| iterator | end () |
| Ends the iteration. | |
| const_iterator | begin () const |
| Begins the iteration. | |
| const_iterator | end () const |
| Ends the iteration. | |
| typedef value_type* iterator |
The iterator type.
| typedef value_type const* const_iterator |
The non-mutable (const) iterator type.
| array_view | ( | ) | [inline] |
Default constructor, creating a view of 0 size.
References STLSOFT_ASSERT.
| array_view | ( | T(&) | t[N] | ) | [inline, explicit] |
Constructs an instance of the array view from the given array.
| t | The array |
References STLSOFT_ASSERT.
| array_view | ( | pointer | begin, | |
| pointer | end | |||
| ) | [inline] |
Constructs an instance of the array view from the given range.
| begin | The start point of the range [begin, end) | |
| end | The end point of the range [begin, end) |
References STLSOFT_ASSERT.
| array_view | ( | pointer | p, | |
| size_type | n | |||
| ) | [inline] |
Constructs an instance of the array view from the given pointer.
| p | Pointer to the first element in the range | |
| n | The number of elements in the range |
References STLSOFT_ASSERT.
| void swap | ( | class_type & | rhs | ) | throw () [inline] |
| pointer base | ( | ) | [inline] |
| pointer base | ( | ) | const [inline] |
| size_type size | ( | ) | const [inline] |
Returns the number of elements in the sequence.
References STLSOFT_ASSERT.
Referenced by array_view::end(), and array_view::operator[]().
| bool empty | ( | ) | const [inline] |
| static size_type max_size | ( | ) | [inline, static] |
Returns the maximum number of elements in the sequence.
| reference operator[] | ( | size_type | index | ) | [inline] |
Returns the element at the given index.
| index | The offset of the requested element |
References array_view::size(), STLSOFT_ASSERT, and STLSOFT_MESSAGE_ASSERT.
| const_reference operator[] | ( | size_type | index | ) | const [inline] |
Returns the element at the given index.
| index | The offset of the requested element |
References array_view::size(), STLSOFT_ASSERT, and STLSOFT_MESSAGE_ASSERT.
| reference at | ( | size_type | index | ) | [inline] |
Returns the element at the given index.
| index | The offset of the requested element |
References STLSOFT_ASSERT.
| const_reference at | ( | size_type | index | ) | const [inline] |
Returns the element at the given index.
| index | The offset of the requested element |
References STLSOFT_ASSERT.
| iterator begin | ( | ) | [inline] |
Begins the iteration.
References STLSOFT_ASSERT.
Referenced by array_view::end().
| iterator end | ( | ) | [inline] |
Ends the iteration.
References array_view::begin(), array_view::size(), and STLSOFT_ASSERT.
| const_iterator begin | ( | ) | const [inline] |
Begins the iteration.
References STLSOFT_ASSERT.
| const_iterator end | ( | ) | const [inline] |
Ends the iteration.
References array_view::begin(), array_view::size(), and STLSOFT_ASSERT.
1.5.6