Wiselib
Public Types | Public Member Functions | Static Public Attributes
wiselib::list_static< OsModel_P, Value_P, ListSize_P > Struct Template Reference

#include <list_static.h>

List of all members.

Public Types

typedef list_iterator< Value_P > iterator
typedef list_static< OsModel_P,
Value_P, ListSize_P > 
list_type
typedef list_node< Value_P > node_type
typedef reverse_iterator
< iterator
riterator
typedef Value_P value_type
typedef value_typepointer
typedef value_typereference

Public Member Functions

 list_static ()
 default constructor
 list_static (const list_static &list)
 copy constructor
list_staticoperator= (const list_static &list)
Iterators
Returns:
iterator to first list node
iterator begin () const
iterator end () const
riterator rbegin ()
riterator rend ()
Capacity
Returns:
true if list contains no elements
bool empty () const
bool full () const
list_size_t max_size () const
list_size_t size () const
list_size_t capacity () const
Element Access
Returns:
reference to first element
value_typefront ()
const value_typefront () const
value_typeback ()
const value_typeback () const
Modifiers

remove element at given position

const node_typeerase (iterator position)
void erase (iterator first, iterator last)
 remove all elements in given range
bool insert (iterator position, const value_type &x)
 insert new element at given position with given value
void insert (iterator position, list_size_t n, const value_type &x)
 insert n elements with given value at given position
template<typename InputIterator_P >
bool insert (iterator position, InputIterator_P first, InputIterator_P last)
 copy elements from first to last at position
bool push_back (const value_type &x)
 insert element at list end
bool push_front (const value_type &x)
 insert element at list beginning
const node_typepop_back ()
 removes last element
const node_typepop_front ()
 removes first element
void reverse ()
 reverse order of list elements
void clear ()
 remove all list elements in constant time
void remove (const value_type &value)
 remove every element with given value
void splice (iterator position, list_type &l)
 transfer elements of list l to position
void unique ()
 removes every but the first occurrence in a consecutive set of elements with the same value

Static Public Attributes

static const list_size_t LIST_SIZE = (ListSize_P < 1) ? 1 : ListSize_P

template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
struct wiselib::list_static< OsModel_P, Value_P, ListSize_P >


Member Typedef Documentation

template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
typedef list_iterator<Value_P> wiselib::list_static< OsModel_P, Value_P, ListSize_P >::iterator
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
typedef list_static<OsModel_P, Value_P, ListSize_P> wiselib::list_static< OsModel_P, Value_P, ListSize_P >::list_type
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
typedef list_node<Value_P> wiselib::list_static< OsModel_P, Value_P, ListSize_P >::node_type
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
typedef value_type* wiselib::list_static< OsModel_P, Value_P, ListSize_P >::pointer
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
typedef value_type& wiselib::list_static< OsModel_P, Value_P, ListSize_P >::reference
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
typedef reverse_iterator<iterator> wiselib::list_static< OsModel_P, Value_P, ListSize_P >::riterator
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
typedef Value_P wiselib::list_static< OsModel_P, Value_P, ListSize_P >::value_type

Constructor & Destructor Documentation

template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
wiselib::list_static< OsModel_P, Value_P, ListSize_P >::list_static ( ) [inline]

default constructor

template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
wiselib::list_static< OsModel_P, Value_P, ListSize_P >::list_static ( const list_static< OsModel_P, Value_P, ListSize_P > &  list) [inline]

copy constructor


Member Function Documentation

template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
value_type& wiselib::list_static< OsModel_P, Value_P, ListSize_P >::back ( ) [inline]
Returns:
reference to last element
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
const value_type& wiselib::list_static< OsModel_P, Value_P, ListSize_P >::back ( ) const [inline]
Returns:
constant reference to last element
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
iterator wiselib::list_static< OsModel_P, Value_P, ListSize_P >::begin ( ) const [inline]
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
list_size_t wiselib::list_static< OsModel_P, Value_P, ListSize_P >::capacity ( ) const [inline]
Returns:
maximal number of list elements
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
void wiselib::list_static< OsModel_P, Value_P, ListSize_P >::clear ( void  ) [inline]

remove all list elements in constant time

template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
bool wiselib::list_static< OsModel_P, Value_P, ListSize_P >::empty ( ) const [inline]
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
iterator wiselib::list_static< OsModel_P, Value_P, ListSize_P >::end ( ) const [inline]
Returns:
iterator to node after last list element
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
void wiselib::list_static< OsModel_P, Value_P, ListSize_P >::erase ( iterator  first,
iterator  last 
) [inline]

remove all elements in given range

template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
const node_type* wiselib::list_static< OsModel_P, Value_P, ListSize_P >::erase ( iterator  position) [inline]
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
value_type& wiselib::list_static< OsModel_P, Value_P, ListSize_P >::front ( ) [inline]
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
const value_type& wiselib::list_static< OsModel_P, Value_P, ListSize_P >::front ( ) const [inline]
Returns:
constant reference to first element
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
bool wiselib::list_static< OsModel_P, Value_P, ListSize_P >::full ( ) const [inline]
Returns:
true if no elements can be inserted into list
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
bool wiselib::list_static< OsModel_P, Value_P, ListSize_P >::insert ( iterator  position,
const value_type x 
) [inline]

insert new element at given position with given value

template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
void wiselib::list_static< OsModel_P, Value_P, ListSize_P >::insert ( iterator  position,
list_size_t  n,
const value_type x 
) [inline]

insert n elements with given value at given position

template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
template<typename InputIterator_P >
bool wiselib::list_static< OsModel_P, Value_P, ListSize_P >::insert ( iterator  position,
InputIterator_P  first,
InputIterator_P  last 
) [inline]

copy elements from first to last at position

Returns:
true if successful
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
list_size_t wiselib::list_static< OsModel_P, Value_P, ListSize_P >::max_size ( ) const [inline]
Returns:
size() of largest possible list
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
list_static& wiselib::list_static< OsModel_P, Value_P, ListSize_P >::operator= ( const list_static< OsModel_P, Value_P, ListSize_P > &  list) [inline]
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
const node_type* wiselib::list_static< OsModel_P, Value_P, ListSize_P >::pop_back ( ) [inline]

removes last element

template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
const node_type* wiselib::list_static< OsModel_P, Value_P, ListSize_P >::pop_front ( ) [inline]

removes first element

template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
bool wiselib::list_static< OsModel_P, Value_P, ListSize_P >::push_back ( const value_type x) [inline]

insert element at list end

template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
bool wiselib::list_static< OsModel_P, Value_P, ListSize_P >::push_front ( const value_type x) [inline]

insert element at list beginning

template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
riterator wiselib::list_static< OsModel_P, Value_P, ListSize_P >::rbegin ( ) [inline]
Returns:
reverse iterator to first list node
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
void wiselib::list_static< OsModel_P, Value_P, ListSize_P >::remove ( const value_type value) [inline]

remove every element with given value

template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
riterator wiselib::list_static< OsModel_P, Value_P, ListSize_P >::rend ( ) [inline]
Returns:
reverse iterator to node after last list element
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
void wiselib::list_static< OsModel_P, Value_P, ListSize_P >::reverse ( ) [inline]

reverse order of list elements

template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
list_size_t wiselib::list_static< OsModel_P, Value_P, ListSize_P >::size ( void  ) const [inline]
Returns:
number of list elements
template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
void wiselib::list_static< OsModel_P, Value_P, ListSize_P >::splice ( iterator  position,
list_type l 
) [inline]

transfer elements of list l to position

template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
void wiselib::list_static< OsModel_P, Value_P, ListSize_P >::unique ( ) [inline]

removes every but the first occurrence in a consecutive set of elements with the same value


Member Data Documentation

template<typename OsModel_P, typename Value_P, list_size_t ListSize_P>
const list_size_t wiselib::list_static< OsModel_P, Value_P, ListSize_P >::LIST_SIZE = (ListSize_P < 1) ? 1 : ListSize_P [static]

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines