Library: Foundation
Package: Core
Header: Poco/Array.h
STL container like C-style array replacement class.
This implementation is based on the idea of Nicolai Josuttis. His original implementation can be found at http://www.josuttis.com/cppcode/array.html .
Member Functions: assign, at, back, begin, c_array, data, empty, end, front, max_size, operator =, operator [], rbegin, rend, size, swap
typedef const T * const_iterator;
typedef const T & const_reference;
typedef std::reverse_iterator < const_iterator > const_reverse_iterator;
typedef std::ptrdiff_t difference_type;
typedef T * iterator;
typedef T & reference;
typedef std::reverse_iterator < iterator > reverse_iterator;
typedef std::size_t size_type;
typedef T value_type;
static_size = N
void assign(
const T & value
);
Assign one value to all elements
reference at(
size_type i
);
Element access with range check. Throws Poco::InvalidArgumentException if the index is over range.
const_reference at(
size_type i
) const;
Element access with range check. Throws Poco::InvalidArgumentException if the index is over range.
reference back();
const_reference back() const;
iterator begin();
const_iterator begin() const;
T * c_array();
Use array as C array (direct read/write access to data)
const T * data() const;
Direct access to data (read-only)
T * data();
static bool empty();
iterator end();
const_iterator end() const;
reference front();
const_reference front() const;
static size_type max_size();
template < typename Other > Array < T, N > & operator = (
const Array < Other, N > & rhs
);
Assignment with type conversion
reference operator[] (
size_type i
);
Element access without range check. If the index is not small than the given size, the behavior is undefined.
const_reference operator[] (
size_type i
) const;
Element access without range check. If the index is not small than the given size, the behavior is undefined.
reverse_iterator rbegin();
const_reverse_iterator rbegin() const;
reverse_iterator rend();
const_reverse_iterator rend() const;
static size_type size();
void swap(
Array < T, N > & y
);
T elems[N];
Fixed-size array of elements of type T, public specifier used to make this class a aggregate.