#include <_vector.hpp>
Public Types | |
typedef T::size_type | size_type |
Typename for the index type and vector size type. | |
typedef T::value_type | value_type |
Typename for the vector elements. | |
Static Public Member Functions | |
static size_type | get_size (const T &x) |
Returns the size of the vector. | |
static value_type | get_element (const T &x, const size_type &i) |
Gets element of a vector by index. | |
static void | set_element (T &x, const size_type &i, const value_type &v) |
Modifies value of element with given index. | |
static void | construct (T &x, const size_type &i) |
Constructs vector with the given size. |
This is a "non-intrusive" interface for the vector type. A type is vector if it is possible to query it's size and to access it's elements by index in constant-time.
The default implementation is made so that std::vector<T> automatically becomes a model of this concept.
static size_type instigate::stl::vector::interface< T >::get_size | ( | const T & | x | ) | [inline, static] |
Returns the size of the vector.
x | The vector. |
Referenced by instigate::stl::vector::interface< T >::get_element(), and instigate::stl::vector::interface< T >::set_element().
static value_type instigate::stl::vector::interface< T >::get_element | ( | const T & | x, | |
const size_type & | i | |||
) | [inline, static] |
Gets element of a vector by index.
x | The vector. | |
i | The index of element. |
References instigate::stl::vector::interface< T >::get_size().
static void instigate::stl::vector::interface< T >::set_element | ( | T & | x, | |
const size_type & | i, | |||
const value_type & | v | |||
) | [inline, static] |
Modifies value of element with given index.
x | The vector. | |
i | The index of the element. | |
v | The new value for the element. |
References instigate::stl::vector::interface< T >::get_size().
static void instigate::stl::vector::interface< T >::construct | ( | T & | x, | |
const size_type & | i | |||
) | [inline, static] |