library of assembled shared sources |
http://lass.cocamware.com |
#include <static_vector.h>
Public Types | |
typedef T & | reference |
typedef const T & | const_reference |
typedef T * | iterator |
typedef const T * | const_iterator |
typedef size_t | size_type |
typedef ptrdiff_t | difference_type |
typedef T | value_type |
typedef T * | pointer |
typedef const T * | const_pointer |
typedef std::reverse_iterator < iterator > | reverse_iterator |
typedef std::reverse_iterator < const_iterator > | const_reverse_iterator |
Public Member Functions | |
static_vector () | |
static_vector (size_type n, const value_type &value=value_type()) | |
template<typename InputIterator > | |
static_vector (InputIterator first, InputIterator last) | |
~static_vector () | |
void | assign (size_type n=0, const value_type &value=value_type()) |
template<typename InputIterator > | |
void | assign (InputIterator first, InputIterator last) |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
reverse_iterator | rbegin () |
const_reverse_iterator | rbegin () const |
reverse_iterator | rend () |
const_reverse_iterator | rend () const |
size_type | size () const |
size_type | max_size () const |
void | resize (size_type n, const value_type &value=value_type()) |
size_type | capacity () const |
bool | empty () const |
void | reserve (size_type n) |
reference | operator[] (size_type i) |
const_reference | operator[] (size_type i) const |
reference | at (size_type i) |
const_reference | at (size_type i) const |
reference | front () |
const_reference | front () const |
reference | back () |
const_reference | back () const |
void | push_back (const value_type &value) |
void | pop_back () |
void | insert (iterator position, const value_type &value) |
void | insert (iterator position, size_type n, const value_type &value) |
template<typename InputIterator > | |
void | insert (iterator position, InputIterator first, InputIterator last) |
iterator | erase (iterator position) |
iterator | erase (iterator first, iterator last) |
void | clear () |
void | swap (static_vector< T, maxsize > &iOther) |
Private Types | |
enum | { max_size_ = maxsize } |
Private Member Functions | |
pointer | get_element (size_type i) |
const_pointer | get_element (size_type i) const |
void | insert (iterator position, size_type n, value_type value, meta::Wrap< meta::True > parameter_is_integral) |
template<typename InputIterator > | |
void | insert (iterator position, InputIterator first, InputIterator last, meta::Wrap< meta::False > parameter_is_iterator) |
void | assign (size_type n, value_type value, meta::Wrap< meta::True > parameter_is_integral) |
template<typename InputIterator > | |
void | assign (InputIterator first, InputIterator last, meta::Wrap< meta::False > parameter_is_iterator) |
void | move_to_back (iterator first, iterator last, size_type step) |
void | move_to_front (iterator first, iterator last, size_type step) |
void | enforce_valid_size (size_type new_size) const |
Private Attributes | |
char | data_ [max_size_ *sizeof(T)] |
size_type | size_ |
Related Functions | |
(Note that these are not member functions.) | |
template<typename T , size_t maxsize> | |
bool | operator== (const static_vector< T, maxsize > &a, const static_vector< T, maxsize > &b) |
returns wether a and b are lexicographical idential. | |
template<typename T , size_t maxsize> | |
bool | operator!= (const static_vector< T, maxsize > &a, const static_vector< T, maxsize > &b) |
returns wether a and b are not lexicographical idential. | |
template<typename T , size_t maxsize> | |
bool | operator< (const static_vector< T, maxsize > &a, const static_vector< T, maxsize > &b) |
returns wether a is lexicographical less than b. | |
template<typename T , size_t maxsize> | |
bool | operator> (const static_vector< T, maxsize > &a, const static_vector< T, maxsize > &b) |
returns wether b is lexicographical less than a. | |
template<typename T , size_t maxsize> | |
bool | operator<= (const static_vector< T, maxsize > &a, const static_vector< T, maxsize > &b) |
returns wether a is lexicographical less or equal to b. | |
template<typename T , size_t maxsize> | |
bool | operator>= (const static_vector< T, maxsize > &a, const static_vector< T, maxsize > &b) |
returns wether b is lexicographical less or equal to a. | |
template<typename T , size_t maxsize, typename Char , typename Traits > | |
std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &ostream, const static_vector< T, maxsize > &container) |
template<typename T , size_t maxsize, typename Char , typename Traits > | |
std::basic_istream< Char, Traits > & | operator>> (std::basic_istream< Char, Traits > &istream, static_vector< T, maxsize > &container) |
Definition at line 62 of file static_vector.h.
typedef T& lass::stde::static_vector< T, maxsize >::reference |
Definition at line 66 of file static_vector.h.
typedef const T& lass::stde::static_vector< T, maxsize >::const_reference |
Definition at line 67 of file static_vector.h.
typedef T* lass::stde::static_vector< T, maxsize >::iterator |
Definition at line 68 of file static_vector.h.
typedef const T* lass::stde::static_vector< T, maxsize >::const_iterator |
Definition at line 69 of file static_vector.h.
typedef size_t lass::stde::static_vector< T, maxsize >::size_type |
Definition at line 70 of file static_vector.h.
typedef ptrdiff_t lass::stde::static_vector< T, maxsize >::difference_type |
Definition at line 71 of file static_vector.h.
typedef T lass::stde::static_vector< T, maxsize >::value_type |
Definition at line 72 of file static_vector.h.
typedef T* lass::stde::static_vector< T, maxsize >::pointer |
Definition at line 73 of file static_vector.h.
typedef const T* lass::stde::static_vector< T, maxsize >::const_pointer |
Definition at line 74 of file static_vector.h.
typedef std::reverse_iterator<iterator> lass::stde::static_vector< T, maxsize >::reverse_iterator |
Definition at line 75 of file static_vector.h.
typedef std::reverse_iterator<const_iterator> lass::stde::static_vector< T, maxsize >::const_reverse_iterator |
Definition at line 76 of file static_vector.h.
anonymous enum [private] |
lass::stde::static_vector< T, maxsize >::static_vector | ( | ) | [inline] |
Definition at line 76 of file static_vector.inl.
lass::stde::static_vector< T, maxsize >::static_vector | ( | size_type | n, | |
const value_type & | value = value_type() | |||
) | [inline] |
Definition at line 84 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::end(), and lass::stde::static_vector< T, maxsize >::insert().
lass::stde::static_vector< T, maxsize >::static_vector | ( | InputIterator | first, | |
InputIterator | last | |||
) | [inline] |
Definition at line 94 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::end(), and lass::stde::static_vector< T, maxsize >::insert().
lass::stde::static_vector< T, maxsize >::~static_vector | ( | ) | [inline] |
Definition at line 123 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::clear().
void lass::stde::static_vector< T, maxsize >::assign | ( | size_type | n = 0 , |
|
const value_type & | value = value_type() | |||
) | [inline] |
void lass::stde::static_vector< T, maxsize >::assign | ( | InputIterator | first, | |
InputIterator | last | |||
) | [inline] |
static_vector< T, maxsize >::iterator lass::stde::static_vector< T, maxsize >::begin | ( | ) | [inline] |
Definition at line 132 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::get_element().
Referenced by lass::stde::static_vector< T, maxsize >::assign(), and lass::stde::static_vector< T, maxsize >::operator==().
static_vector< T, maxsize >::const_iterator lass::stde::static_vector< T, maxsize >::begin | ( | ) | const [inline] |
Definition at line 141 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::get_element().
static_vector< T, maxsize >::iterator lass::stde::static_vector< T, maxsize >::end | ( | ) | [inline] |
Definition at line 150 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::get_element(), and lass::stde::static_vector< T, maxsize >::size_.
Referenced by lass::stde::static_vector< T, maxsize >::assign(), lass::stde::static_vector< T, maxsize >::erase(), lass::stde::static_vector< T, maxsize >::insert(), lass::stde::static_vector< T, maxsize >::operator==(), and lass::stde::static_vector< T, maxsize >::static_vector().
static_vector< T, maxsize >::const_iterator lass::stde::static_vector< T, maxsize >::end | ( | ) | const [inline] |
Definition at line 159 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::get_element(), and lass::stde::static_vector< T, maxsize >::size_.
static_vector< T, maxsize >::reverse_iterator lass::stde::static_vector< T, maxsize >::rbegin | ( | ) | [inline] |
Definition at line 168 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::get_element(), and lass::stde::static_vector< T, maxsize >::size_.
static_vector< T, maxsize >::const_reverse_iterator lass::stde::static_vector< T, maxsize >::rbegin | ( | ) | const [inline] |
Definition at line 177 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::get_element(), and lass::stde::static_vector< T, maxsize >::size_.
static_vector< T, maxsize >::reverse_iterator lass::stde::static_vector< T, maxsize >::rend | ( | ) | [inline] |
Definition at line 186 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::get_element().
static_vector< T, maxsize >::const_reverse_iterator lass::stde::static_vector< T, maxsize >::rend | ( | ) | const [inline] |
Definition at line 195 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::get_element().
static_vector< T, maxsize >::size_type lass::stde::static_vector< T, maxsize >::size | ( | ) | const [inline] |
Definition at line 204 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::size_.
Referenced by lass::stde::static_vector< T, maxsize >::operator==(), and lass::stde::static_vector< T, maxsize >::swap().
static_vector< T, maxsize >::size_type lass::stde::static_vector< T, maxsize >::max_size | ( | ) | const [inline] |
Definition at line 213 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::max_size_.
void lass::stde::static_vector< T, maxsize >::resize | ( | size_type | n, | |
const value_type & | value = value_type() | |||
) | [inline] |
Definition at line 221 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::enforce_valid_size(), lass::stde::static_vector< T, maxsize >::get_element(), and lass::stde::static_vector< T, maxsize >::size_.
static_vector< T, maxsize >::size_type lass::stde::static_vector< T, maxsize >::capacity | ( | ) | const [inline] |
Definition at line 239 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::max_size_.
bool lass::stde::static_vector< T, maxsize >::empty | ( | ) | const [inline] |
Definition at line 247 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::size_.
void lass::stde::static_vector< T, maxsize >::reserve | ( | size_type | n | ) | [inline] |
Definition at line 255 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::enforce_valid_size().
static_vector< T, maxsize >::reference lass::stde::static_vector< T, maxsize >::operator[] | ( | size_type | i | ) | [inline] |
Definition at line 264 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::get_element().
static_vector< T, maxsize >::const_reference lass::stde::static_vector< T, maxsize >::operator[] | ( | size_type | i | ) | const [inline] |
Definition at line 273 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::get_element().
static_vector< T, maxsize >::reference lass::stde::static_vector< T, maxsize >::at | ( | size_type | i | ) | [inline] |
Definition at line 282 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::get_element(), and lass::stde::static_vector< T, maxsize >::size_.
static_vector< T, maxsize >::const_reference lass::stde::static_vector< T, maxsize >::at | ( | size_type | i | ) | const [inline] |
Definition at line 295 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::get_element(), and lass::stde::static_vector< T, maxsize >::size_.
static_vector< T, maxsize >::reference lass::stde::static_vector< T, maxsize >::front | ( | ) | [inline] |
Definition at line 308 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::get_element().
static_vector< T, maxsize >::const_reference lass::stde::static_vector< T, maxsize >::front | ( | ) | const [inline] |
Definition at line 317 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::get_element().
static_vector< T, maxsize >::reference lass::stde::static_vector< T, maxsize >::back | ( | ) | [inline] |
Definition at line 326 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::get_element(), and lass::stde::static_vector< T, maxsize >::size_.
static_vector< T, maxsize >::const_reference lass::stde::static_vector< T, maxsize >::back | ( | ) | const [inline] |
Definition at line 335 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::get_element(), and lass::stde::static_vector< T, maxsize >::size_.
void lass::stde::static_vector< T, maxsize >::push_back | ( | const value_type & | value | ) | [inline] |
Definition at line 343 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::enforce_valid_size(), lass::stde::static_vector< T, maxsize >::get_element(), and lass::stde::static_vector< T, maxsize >::size_.
void lass::stde::static_vector< T, maxsize >::pop_back | ( | ) | [inline] |
Definition at line 353 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::get_element(), and lass::stde::static_vector< T, maxsize >::size_.
void lass::stde::static_vector< T, maxsize >::insert | ( | iterator | position, | |
const value_type & | value | |||
) | [inline] |
Definition at line 361 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::end(), lass::stde::static_vector< T, maxsize >::enforce_valid_size(), lass::stde::static_vector< T, maxsize >::move_to_back(), and lass::stde::static_vector< T, maxsize >::size_.
Referenced by lass::stde::static_vector< T, maxsize >::assign(), lass::stde::static_vector< T, maxsize >::insert(), and lass::stde::static_vector< T, maxsize >::static_vector().
void lass::stde::static_vector< T, maxsize >::insert | ( | iterator | position, | |
size_type | n, | |||
const value_type & | value | |||
) | [inline] |
Definition at line 372 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::insert().
void lass::stde::static_vector< T, maxsize >::insert | ( | iterator | position, | |
InputIterator | first, | |||
InputIterator | last | |||
) | [inline] |
Definition at line 381 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::insert().
static_vector< T, maxsize >::iterator lass::stde::static_vector< T, maxsize >::erase | ( | iterator | position | ) | [inline] |
Definition at line 390 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::end(), lass::stde::static_vector< T, maxsize >::move_to_front(), and lass::stde::static_vector< T, maxsize >::size_.
Referenced by lass::stde::static_vector< T, maxsize >::assign().
static_vector< T, maxsize >::iterator lass::stde::static_vector< T, maxsize >::erase | ( | iterator | first, | |
iterator | last | |||
) | [inline] |
Definition at line 402 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::end(), lass::stde::static_vector< T, maxsize >::move_to_front(), and lass::stde::static_vector< T, maxsize >::size_.
void lass::stde::static_vector< T, maxsize >::clear | ( | ) | [inline] |
Definition at line 417 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::get_element(), and lass::stde::static_vector< T, maxsize >::size_.
Referenced by lass::stde::static_vector< T, maxsize >::assign(), and lass::stde::static_vector< T, maxsize >::~static_vector().
void lass::stde::static_vector< T, maxsize >::swap | ( | static_vector< T, maxsize > & | iOther | ) | [inline] |
Definition at line 427 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::size(), and lass::stde::static_vector< T, maxsize >::size_.
pointer lass::stde::static_vector< T, maxsize >::get_element | ( | size_type | i | ) | [inline, private] |
Definition at line 126 of file static_vector.h.
References lass::stde::static_vector< T, maxsize >::data_.
Referenced by lass::stde::static_vector< T, maxsize >::at(), lass::stde::static_vector< T, maxsize >::back(), lass::stde::static_vector< T, maxsize >::begin(), lass::stde::static_vector< T, maxsize >::clear(), lass::stde::static_vector< T, maxsize >::end(), lass::stde::static_vector< T, maxsize >::front(), lass::stde::static_vector< T, maxsize >::operator[](), lass::stde::static_vector< T, maxsize >::pop_back(), lass::stde::static_vector< T, maxsize >::push_back(), lass::stde::static_vector< T, maxsize >::rbegin(), lass::stde::static_vector< T, maxsize >::rend(), and lass::stde::static_vector< T, maxsize >::resize().
const_pointer lass::stde::static_vector< T, maxsize >::get_element | ( | size_type | i | ) | const [inline, private] |
Definition at line 127 of file static_vector.h.
References lass::stde::static_vector< T, maxsize >::data_.
void lass::stde::static_vector< T, maxsize >::insert | ( | iterator | position, | |
size_type | n, | |||
value_type | value, | |||
meta::Wrap< meta::True > | parameter_is_integral | |||
) | [inline, private] |
void lass::stde::static_vector< T, maxsize >::insert | ( | iterator | position, | |
InputIterator | first, | |||
InputIterator | last, | |||
meta::Wrap< meta::False > | parameter_is_iterator | |||
) | [inline, private] |
Definition at line 482 of file static_vector.inl.
References lass::prim::distance(), lass::stde::static_vector< T, maxsize >::end(), lass::stde::static_vector< T, maxsize >::enforce_valid_size(), lass::stde::static_vector< T, maxsize >::move_to_back(), and lass::stde::static_vector< T, maxsize >::size_.
void lass::stde::static_vector< T, maxsize >::assign | ( | size_type | n, | |
value_type | value, | |||
meta::Wrap< meta::True > | parameter_is_integral | |||
) | [inline, private] |
void lass::stde::static_vector< T, maxsize >::assign | ( | InputIterator | first, | |
InputIterator | last, | |||
meta::Wrap< meta::False > | parameter_is_iterator | |||
) | [inline, private] |
Definition at line 509 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::begin(), lass::stde::static_vector< T, maxsize >::clear(), lass::prim::distance(), lass::stde::static_vector< T, maxsize >::enforce_valid_size(), and lass::stde::static_vector< T, maxsize >::insert().
void lass::stde::static_vector< T, maxsize >::move_to_back | ( | iterator | first, | |
iterator | last, | |||
size_type | step | |||
) | [inline, private] |
Definition at line 440 of file static_vector.inl.
Referenced by lass::stde::static_vector< T, maxsize >::insert().
void lass::stde::static_vector< T, maxsize >::move_to_front | ( | iterator | first, | |
iterator | last, | |||
size_type | step | |||
) | [inline, private] |
Definition at line 453 of file static_vector.inl.
Referenced by lass::stde::static_vector< T, maxsize >::erase().
void lass::stde::static_vector< T, maxsize >::enforce_valid_size | ( | size_type | new_size | ) | const [inline, private] |
Definition at line 521 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::max_size_.
Referenced by lass::stde::static_vector< T, maxsize >::assign(), lass::stde::static_vector< T, maxsize >::insert(), lass::stde::static_vector< T, maxsize >::push_back(), lass::stde::static_vector< T, maxsize >::reserve(), and lass::stde::static_vector< T, maxsize >::resize().
bool operator== | ( | const static_vector< T, maxsize > & | a, | |
const static_vector< T, maxsize > & | b | |||
) | [related] |
returns wether a and b are lexicographical idential.
a | first static_vector | |
b | second static_vector |
a.size() == b.size()
and each element of is considered equal to its corresponding element in b by using operator==
O(N) with N = a.size() == b.size() ? a.size() : 1
Definition at line 545 of file static_vector.inl.
References lass::stde::static_vector< T, maxsize >::begin(), lass::stde::static_vector< T, maxsize >::end(), and lass::stde::static_vector< T, maxsize >::size().
bool operator!= | ( | const static_vector< T, maxsize > & | a, | |
const static_vector< T, maxsize > & | b | |||
) | [related] |
returns wether a and b are not lexicographical idential.
a | first static_vector | |
b | second static_vector |
!(a == b)
O(N) with N = a.size() == b.size() ? a.size() : 1
Definition at line 576 of file static_vector.inl.
bool operator< | ( | const static_vector< T, maxsize > & | a, | |
const static_vector< T, maxsize > & | b | |||
) | [related] |
returns wether a is lexicographical less than b.
a | first static_vector | |
b | second static_vector |
a.size() < b.size()
O(N) with N = std::min(a.size(), b.size())
Definition at line 596 of file static_vector.inl.
bool operator> | ( | const static_vector< T, maxsize > & | a, | |
const static_vector< T, maxsize > & | b | |||
) | [related] |
returns wether b is lexicographical less than a.
a | first static_vector | |
b | second static_vector |
(b < a)
O(N) with N = std::min(a.size(), b.size())
Definition at line 628 of file static_vector.inl.
bool operator<= | ( | const static_vector< T, maxsize > & | a, | |
const static_vector< T, maxsize > & | b | |||
) | [related] |
returns wether a is lexicographical less or equal to b.
a | first static_vector | |
b | second static_vector |
!(b < a)
O(N) with N = std::min(a.size(), b.size())
Definition at line 646 of file static_vector.inl.
bool operator>= | ( | const static_vector< T, maxsize > & | a, | |
const static_vector< T, maxsize > & | b | |||
) | [related] |
returns wether b is lexicographical less or equal to a.
a | first static_vector | |
b | second static_vector |
!(a < b)
O(N) with N = std::min(a.size(), b.size())
Definition at line 664 of file static_vector.inl.
std::basic_ostream< Char, Traits > & operator<< | ( | std::basic_ostream< Char, Traits > & | ostream, | |
const static_vector< T, maxsize > & | container | |||
) | [related] |
writes static_vector to output stream.
ostream | should be a good stream. | |
container | static_vector to be written as [foo, bar, spam, ham] |
container.size()
Definition at line 681 of file static_vector.inl.
References lass::stde::impl::print_sequence().
std::basic_istream< Char, Traits > & operator>> | ( | std::basic_istream< Char, Traits > & | istream, | |
static_vector< T, maxsize > & | container | |||
) | [related] |
reads list from stream.
istream | should be a good stream. | |
container | static_vector to be read as [foo, bar, spam, ham] |
Definition at line 702 of file static_vector.inl.
char lass::stde::static_vector< T, maxsize >::data_[max_size_ *sizeof(T)] [private] |
Definition at line 139 of file static_vector.h.
Referenced by lass::stde::static_vector< T, maxsize >::get_element().
size_type lass::stde::static_vector< T, maxsize >::size_ [private] |
Definition at line 140 of file static_vector.h.
Referenced by lass::stde::static_vector< T, maxsize >::at(), lass::stde::static_vector< T, maxsize >::back(), lass::stde::static_vector< T, maxsize >::clear(), lass::stde::static_vector< T, maxsize >::empty(), lass::stde::static_vector< T, maxsize >::end(), lass::stde::static_vector< T, maxsize >::erase(), lass::stde::static_vector< T, maxsize >::insert(), lass::stde::static_vector< T, maxsize >::pop_back(), lass::stde::static_vector< T, maxsize >::push_back(), lass::stde::static_vector< T, maxsize >::rbegin(), lass::stde::static_vector< T, maxsize >::resize(), lass::stde::static_vector< T, maxsize >::size(), and lass::stde::static_vector< T, maxsize >::swap().
Generated on Mon Nov 10 14:22:16 2008 for Library of Assembled Shared Sources by 1.5.7.1 |