Embedded Template Library  1.0
 All Classes Files Functions Variables Typedefs Friends Modules Pages
etl::array< T, SIZE > Class Template Reference

#include <array.h>

Public Types

typedef T value_type
 
typedef std::size_t size_type
 
typedef std::ptrdiff_t difference_type
 
typedef T & reference
 
typedef const T & const_reference
 
typedef T * pointer
 
typedef const T * const_pointer
 
typedef T * iterator
 
typedef const T * const_iterator
 
typedef std::reverse_iterator
< iterator > 
reverse_iterator
 
typedef std::reverse_iterator
< const_iterator > 
const_reverse_iterator
 

Public Member Functions

reference at (size_t i)
 
const_reference at (size_t i) const
 
reference operator[] (size_t i)
 
const_reference operator[] (size_t i) const
 
reference front ()
 Returns a reference to the first element.
 
const_reference front () const
 Returns a const reference to the first element.
 
reference back ()
 Returns a reference to the last element.
 
const_reference back () const
 Returns a const reference to the last element.
 
pointer data ()
 Returns a pointer to the first element of the internal buffer.
 
const_pointer data () const
 Returns a const pointer to the first element of the internal buffer.
 
iterator begin ()
 Returns an iterator to the beginning of the array.
 
const_iterator begin () const
 Returns a const iterator to the beginning of the array.
 
const_iterator cbegin () const
 Returns a const iterator to the beginning of the array.
 
iterator end ()
 Returns an iterator to the end of the array.
 
const_iterator end () const
 Returns a const iterator to the end of the array.
 
const_iterator cend () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 Returns a const reverse iterator to the reverse beginning of the array.
 
const_reverse_iterator crbegin () const
 Returns a const reverse iterator to the reverse beginning of the array.
 
reverse_iterator rend ()
 Returns a reverse iterator to the end of the array.
 
const_reverse_iterator rend () const
 Returns a const reverse iterator to the end of the array.
 
const_reverse_iterator crend () const
 Returns a const reverse iterator to the end of the array.
 
bool empty () const
 Returns true if the array size is zero.
 
size_t size () const
 Returns the size of the array.
 
size_t max_size () const
 Returns the maximum possible size of the array.
 
void fill (parameter_t value)
 
void swap (array &other)
 

Public Attributes

_buffer [SIZE]
 The array data.
 

Detailed Description

template<typename T, const size_t SIZE>
class etl::array< T, SIZE >

A replacement for std::array if you haven't got C++0x11.

Member Function Documentation

template<typename T, const size_t SIZE>
reference etl::array< T, SIZE >::at ( size_t  i)
inline

Returns a reference to the value at index 'i'. If ETL_THROW_EXCEPTIONS is defined then am array_out_of_range is thown if the index is out of range.

Parameters
iThe index of the element to access.
template<typename T, const size_t SIZE>
const_reference etl::array< T, SIZE >::at ( size_t  i) const
inline

Returns a const reference to the value at index 'i'. If ETL_THROW_EXCEPTIONS is defined then am array_out_of_range is thown if the index is out of range.

Parameters
iThe index of the element to access.
template<typename T, const size_t SIZE>
void etl::array< T, SIZE >::fill ( parameter_t  value)
inline

Fills the array with the specified value.

Parameters
valueThe value to fill the array with.
template<typename T, const size_t SIZE>
reference etl::array< T, SIZE >::operator[] ( size_t  i)
inline

[] operator. Returns a reference to the value at index 'i'.

Parameters
iThe index of the element to access.
template<typename T, const size_t SIZE>
const_reference etl::array< T, SIZE >::operator[] ( size_t  i) const
inline

[] operator. Returns a const reference to the value at index 'i'.

Parameters
iThe index of the element to access.
template<typename T, const size_t SIZE>
void etl::array< T, SIZE >::swap ( array< T, SIZE > &  other)
inline

Swaps the contents of this array and another.

Parameters
otherA reference to the other array.

The documentation for this class was generated from the following file: