|
0.12.0
|
|
Freundlich's C++ toolkit |
A simple n dimensional array
See the module description for more information.
Public Types | |
| typedef A | allocator_type |
| A type that represents the allocator class for the grid's storage. | |
| typedef T | value_type |
| A type that represents the data type stored in a grid. | |
| typedef A::size_type | size_type |
| A type that counts the number of elements in a grid. | |
| typedef A::difference_type | difference_type |
| A type that provides the difference between the addresses of two elements in a grid. | |
| typedef A::reference | reference |
| A type that provides a reference to an element stored in a grid. | |
| typedef A::const_reference | const_reference |
A type that provides a reference to a const element stored in a grid for reading and performing const operations. | |
| typedef A::pointer | pointer |
| A type that provides a pointer to an element in a grid. | |
| typedef A::const_pointer | const_pointer |
A type that provides a pointer to a const element in a grid. | |
| typedef container::iterator | iterator |
| A type that provides a random-access iterator that can read or modify any element in a grid. | |
| typedef container::const_iterator | const_iterator |
A type that provides a random-access iterator that can read a const element in a grid. | |
| typedef container::reverse_iterator | reverse_iterator |
| A type that provides a random-access iterator that can read or modify any element in a reversed grid. | |
| typedef container::const_reverse_iterator | const_reverse_iterator |
A type that provides a random-access iterator that can read any const element in the grid. | |
| typedef grid::dim< size_type, N >::type | dim |
| A type representing the dimension of the array. | |
Public Member Functions | |
| object () | |
| An empty grid. | |
| object (dim const &d) | |
| The grid will have an initial size but the elements might not be initialized. | |
| object (dim const &d, const_reference r) | |
| Initialize the grid to a size and fill every cell with the same value. | |
| template<typename In > | |
| object (dim const &d, In beg, In end) | |
| Constructs a grid from an iterator range. | |
| object (object const &) | |
| object & | operator= (object const &) |
| ~object () | |
| reference | operator[] (dim const &) |
| Returns a reference to the grid element at a specified position. | |
| const_reference | operator[] (dim const &) const |
| Returns a reference to the grid element at a specified position. | |
| reference | at (dim const &) |
| Returns a reference to the element at a specified location in the vector. | |
| const_reference | at (dim const &) const |
| Returns a reference to the element at a specified location in the grid. | |
| dim const & | size () const |
| Returns the grid's size. | |
| size_type | content () const |
| Returns the number of elements in the grid. | |
| bool | empty () const |
| Tests if the grid is empty. | |
| void | resize (dim const &d) |
| Resizes the grid leaving its internal elements in an unspecific state. | |
| void | shrink_to_fit () |
| Tries to shrink capacity() to fit size() | |
| pointer | data () |
| Returns the pointer to the store. | |
| const_pointer | data () const |
| Returns the pointer to the store. | |
| pointer | data_end () |
| Returns the pointer to the end of the store. | |
| const_pointer | data_end () const |
| Returns the pointer to the end of the store. | |
| iterator | begin () |
| Returns a random-access iterator to the first element in the container. | |
| const_iterator | begin () const |
| Returns a random-access iterator to the first element in the container. | |
| const_iterator | cbegin () const |
| Returns a random-access const-iterator to the first element in the container. | |
| iterator | end () |
| Returns a random-access iterator that points just beyond the end of the grid. | |
| const_iterator | end () const |
| Returns a random-access iterator that points just beyond the end of the grid. | |
| const_iterator | cend () const |
| Returns a random-access const-iterator that points just beyond the end of the grid. | |
| reverse_iterator | rbegin () |
| Returns an iterator to the first element in a reversed grid. | |
| const_reverse_iterator | rbegin () const |
| Returns an iterator to the first element in a reversed grid. | |
| const_reverse_iterator | crbegin () const |
| Returns a const-iterator to the first element in a reversed grid. | |
| reverse_iterator | rend () |
| Returns an iterator to the end of a reversed grid. | |
| const_reverse_iterator | rend () const |
| Returns an iterator to the end of a reversed grid. | |
| const_reverse_iterator | crend () const |
| Returns an iterator to the end of a reversed grid. | |
| void | swap (object &) |
| Exchanges the elements of two grids. | |
| typedef A fcppt::container::grid::object< T, N, A >::allocator_type |
A type that represents the allocator class for the grid's storage.
| typedef container::const_iterator fcppt::container::grid::object< T, N, A >::const_iterator |
A type that provides a random-access iterator that can read a const element in a grid.
| typedef A::const_pointer fcppt::container::grid::object< T, N, A >::const_pointer |
A type that provides a pointer to a const element in a grid.
| typedef A::const_reference fcppt::container::grid::object< T, N, A >::const_reference |
A type that provides a reference to a const element stored in a grid for reading and performing const operations.
| typedef container::const_reverse_iterator fcppt::container::grid::object< T, N, A >::const_reverse_iterator |
A type that provides a random-access iterator that can read any const element in the grid.
| typedef A::difference_type fcppt::container::grid::object< T, N, A >::difference_type |
A type that provides the difference between the addresses of two elements in a grid.
| typedef grid::dim< size_type, N >::type fcppt::container::grid::object< T, N, A >::dim |
A type representing the dimension of the array.
| typedef container::iterator fcppt::container::grid::object< T, N, A >::iterator |
A type that provides a random-access iterator that can read or modify any element in a grid.
| typedef A::pointer fcppt::container::grid::object< T, N, A >::pointer |
A type that provides a pointer to an element in a grid.
| typedef A::reference fcppt::container::grid::object< T, N, A >::reference |
A type that provides a reference to an element stored in a grid.
| typedef container::reverse_iterator fcppt::container::grid::object< T, N, A >::reverse_iterator |
A type that provides a random-access iterator that can read or modify any element in a reversed grid.
| typedef A::size_type fcppt::container::grid::object< T, N, A >::size_type |
A type that counts the number of elements in a grid.
| typedef T fcppt::container::grid::object< T, N, A >::value_type |
A type that represents the data type stored in a grid.
| object< T, N, A >::object | ( | ) |
An empty grid.
|
explicit |
The grid will have an initial size but the elements might not be initialized.
| d | The initial size of the grid |
|
explicit |
Initialize the grid to a size and fill every cell with the same value.
| d | The size of the grid |
| r | The value to assign to each element of the grid |
|
explicit |
Constructs a grid from an iterator range.
| A | forward iterator type |
| d | The size of the grid |
| beg | The begining of the iterator range |
| end | One past the end of the iterator range |
| object< T, N, A >::object | ( | object< T, N, A > const & | _other | ) |
| object< T, N, A >::~object | ( | ) |
| fcppt::container::grid::object< T, N, A >::reference object< T, N, A >::at | ( | dim const & | _pos | ) |
Returns a reference to the element at a specified location in the vector.
| fcppt::container::out_of_range |
| fcppt::container::grid::object< T, N, A >::const_reference object< T, N, A >::at | ( | dim const & | _pos | ) | const |
Returns a reference to the element at a specified location in the grid.
| fcppt::container::out_of_range |
| fcppt::container::grid::object< T, N, A >::iterator object< T, N, A >::begin | ( | ) |
Returns a random-access iterator to the first element in the container.
| fcppt::container::grid::object< T, N, A >::const_iterator object< T, N, A >::begin | ( | ) | const |
Returns a random-access iterator to the first element in the container.
| fcppt::container::grid::object< T, N, A >::const_iterator object< T, N, A >::cbegin | ( | ) | const |
Returns a random-access const-iterator to the first element in the container.
| fcppt::container::grid::object< T, N, A >::const_iterator object< T, N, A >::cend | ( | ) | const |
Returns a random-access const-iterator that points just beyond the end of the grid.
| fcppt::container::grid::object< T, N, A >::size_type object< T, N, A >::content | ( | ) | const |
Returns the number of elements in the grid.
| fcppt::container::grid::object< T, N, A >::const_reverse_iterator object< T, N, A >::crbegin | ( | ) | const |
Returns a const-iterator to the first element in a reversed grid.
| fcppt::container::grid::object< T, N, A >::const_reverse_iterator object< T, N, A >::crend | ( | ) | const |
Returns an iterator to the end of a reversed grid.
| fcppt::container::grid::object< T, N, A >::pointer object< T, N, A >::data | ( | ) |
Returns the pointer to the store.
| fcppt::container::grid::object< T, N, A >::const_pointer object< T, N, A >::data | ( | ) | const |
Returns the pointer to the store.
| fcppt::container::grid::object< T, N, A >::pointer object< T, N, A >::data_end | ( | ) |
| fcppt::container::grid::object< T, N, A >::const_pointer object< T, N, A >::data_end | ( | ) | const |
| bool object< T, N, A >::empty | ( | ) | const |
Tests if the grid is empty.
| fcppt::container::grid::object< T, N, A >::iterator object< T, N, A >::end | ( | ) |
Returns a random-access iterator that points just beyond the end of the grid.
| fcppt::container::grid::object< T, N, A >::const_iterator object< T, N, A >::end | ( | ) | const |
Returns a random-access iterator that points just beyond the end of the grid.
| fcppt::container::grid::object< T, N, A > & object< T, N, A >::operator= | ( | object< T, N, A > const & | _other | ) |
| fcppt::container::grid::object< T, N, A >::reference object< T, N, A >::operator[] | ( | dim const & | _pos | ) |
Returns a reference to the grid element at a specified position.
| fcppt::container::grid::object< T, N, A >::const_reference object< T, N, A >::operator[] | ( | dim const & | _pos | ) | const |
Returns a reference to the grid element at a specified position.
| fcppt::container::grid::object< T, N, A >::reverse_iterator object< T, N, A >::rbegin | ( | ) |
Returns an iterator to the first element in a reversed grid.
| fcppt::container::grid::object< T, N, A >::const_reverse_iterator object< T, N, A >::rbegin | ( | ) | const |
Returns an iterator to the first element in a reversed grid.
| fcppt::container::grid::object< T, N, A >::reverse_iterator object< T, N, A >::rend | ( | ) |
Returns an iterator to the end of a reversed grid.
| fcppt::container::grid::object< T, N, A >::const_reverse_iterator object< T, N, A >::rend | ( | ) | const |
Returns an iterator to the end of a reversed grid.
| void object< T, N, A >::resize | ( | dim const & | d | ) |
Resizes the grid leaving its internal elements in an unspecific state.
| d | The new dimensions of the grid |
| void object< T, N, A >::shrink_to_fit | ( | ) |
Tries to shrink capacity() to fit size()
| fcppt::container::grid::object< T, N, A >::dim const & object< T, N, A >::size | ( | ) | const |
Returns the grid's size.
size_type value, but the dimension. Use content() to get the number of elements
1.8.2