CACAO
|
An ordered_list is an indexed sequence container. More...
Data Structures | |
struct | DecrementEntry |
Decrement function struct. More... | |
struct | Entry |
tagged list entry More... | |
struct | IncreasingEntry |
Increasing function struct. More... | |
struct | IncrementEntry |
Increment function struct. More... | |
struct | Inserter |
Inserter. More... | |
Public Types | |
typedef T | value_type |
typedef Allocator | allocator_type |
typedef allocator_type::reference | reference |
typedef allocator_type::const_reference | const_reference |
typedef allocator_type::pointer | pointer |
typedef allocator_type::const_pointer | const_pointer |
typedef _ordered_iterator< T, Allocator, intern_list > | iterator |
typedef _ordered_const_iterator< T, Allocator, intern_list > | const_iterator |
typedef std::reverse_iterator < iterator > | reverse_iterator |
typedef std::reverse_iterator < const_iterator > | const_reverse_iterator |
Public Member Functions | |
ordered_list () | |
construct an empty MachineBasicBlock More... | |
ordered_list (const ordered_list< T, Allocator > &other) | |
copy constructor More... | |
ordered_list & | operator= (const ordered_list< T, Allocator > &other) |
copy assignment operator More... | |
bool | empty () const |
checks if the container has no elements. More... | |
std::size_t | size () const |
returns the number of elements More... | |
std::size_t | max_size () const |
returns the maximum possible number of elements More... | |
void | push_back (const T &value) |
Appends the given element value to the end of the container. More... | |
void | push_front (const T &value) |
inserts value to the beginning More... | |
iterator | insert (iterator pos, const T &value) |
inserts value before the element pointed to by pos More... | |
template<class InputIt > | |
void | insert (iterator pos, InputIt first, InputIt last) |
inserts elements from range [first, last) before the element pointed to by pos More... | |
iterator | erase (iterator pos) |
erases element More... | |
iterator | erase (iterator first, iterator last) |
erases elements More... | |
iterator | begin () |
returns an iterator to the beginning More... | |
iterator | end () |
returns an iterator to the end More... | |
const_iterator | begin () const |
returns a const_iterator to the beginning More... | |
const_iterator | end () const |
returns a const_iterator to the end More... | |
reverse_iterator | rbegin () |
returns a reverse iterator to the beginning More... | |
reverse_iterator | rend () |
returns a reverse iterator to the end More... | |
const_reverse_iterator | rbegin () const |
returns a const reverse iterator to the beginning More... | |
const_reverse_iterator | rend () const |
returns a const reverse iterator to the end More... | |
const_reference | front () const |
access the first element More... | |
const_reference | back () const |
access the last element More... | |
reference | front () |
access the first element More... | |
reference | back () |
access the last element More... | |
void | clear () |
removes all elements from the container More... | |
void | swap (ordered_list< T, Allocator > &other) |
exchanges the contents of the container with those of other More... | |
template<class InputIt > | |
void | insert (typename ordered_list< T, Allocator >::iterator pos, InputIt first, InputIt last) |
Private Types | |
typedef std::list< Entry, typename Allocator::template rebind< Entry >::other > | intern_list |
typedef intern_list::iterator | intern_iterator |
Private Attributes | |
intern_list | list |
internal storage More... | |
Friends | |
template<class _T , class _Allocator > | |
bool | operator== (const ordered_list< _T, _Allocator > &lhs, const ordered_list< _T, _Allocator > &rhs) |
template<class _T , class _Allocator > | |
bool | operator== (const typename ordered_list< _T, _Allocator >::Entry &lhs, const typename ordered_list< _T, _Allocator >::Entry &rhs) |
An ordered_list is an indexed sequence container.
It shares most characteristics with a std::list with the difference that its iterators are more powerful. In addition the features of bidirectional iterators the total ordering relation is supported (hence the name ordered_list).
Like std::list it supports constant time insertion and removal of elements anywhere. Additionally those operations do not invalidate iterators.
ordered_list meets the requirement of Container, AllocatorAwareContainer, SequenceContainer, ReversibleContainer.
Definition at line 55 of file ordered_list.hpp.
typedef Allocator cacao::ordered_list< T, Allocator >::allocator_type |
Definition at line 106 of file ordered_list.hpp.
typedef _ordered_const_iterator<T, Allocator, intern_list > cacao::ordered_list< T, Allocator >::const_iterator |
Definition at line 112 of file ordered_list.hpp.
typedef allocator_type::const_pointer cacao::ordered_list< T, Allocator >::const_pointer |
Definition at line 110 of file ordered_list.hpp.
typedef allocator_type::const_reference cacao::ordered_list< T, Allocator >::const_reference |
Definition at line 108 of file ordered_list.hpp.
typedef std::reverse_iterator<const_iterator> cacao::ordered_list< T, Allocator >::const_reverse_iterator |
Definition at line 114 of file ordered_list.hpp.
|
private |
Definition at line 59 of file ordered_list.hpp.
|
private |
Definition at line 57 of file ordered_list.hpp.
typedef _ordered_iterator<T, Allocator, intern_list > cacao::ordered_list< T, Allocator >::iterator |
Definition at line 111 of file ordered_list.hpp.
typedef allocator_type::pointer cacao::ordered_list< T, Allocator >::pointer |
Definition at line 109 of file ordered_list.hpp.
typedef allocator_type::reference cacao::ordered_list< T, Allocator >::reference |
Definition at line 107 of file ordered_list.hpp.
typedef std::reverse_iterator<iterator> cacao::ordered_list< T, Allocator >::reverse_iterator |
Definition at line 113 of file ordered_list.hpp.
typedef T cacao::ordered_list< T, Allocator >::value_type |
Definition at line 105 of file ordered_list.hpp.
|
inline |
construct an empty MachineBasicBlock
Definition at line 117 of file ordered_list.hpp.
|
inline |
copy constructor
Definition at line 119 of file ordered_list.hpp.
|
inline |
access the last element
Definition at line 424 of file ordered_list.hpp.
|
inline |
access the last element
Definition at line 414 of file ordered_list.hpp.
|
inline |
returns an iterator to the beginning
Definition at line 362 of file ordered_list.hpp.
|
inline |
returns a const_iterator to the beginning
Definition at line 368 of file ordered_list.hpp.
|
inline |
removes all elements from the container
Definition at line 428 of file ordered_list.hpp.
|
inline |
checks if the container has no elements.
Definition at line 297 of file ordered_list.hpp.
|
inline |
returns an iterator to the end
Definition at line 373 of file ordered_list.hpp.
|
inline |
returns a const_iterator to the end
Definition at line 379 of file ordered_list.hpp.
iterator cacao::ordered_list< T, Allocator >::erase | ( | iterator | pos | ) |
erases element
iterator cacao::ordered_list< T, Allocator >::erase | ( | iterator | first, |
iterator | last | ||
) |
erases elements
|
inline |
access the first element
Definition at line 419 of file ordered_list.hpp.
|
inline |
access the first element
Definition at line 409 of file ordered_list.hpp.
iterator cacao::ordered_list< T, Allocator >::insert | ( | iterator | pos, |
const T & | value | ||
) |
inserts value before the element pointed to by pos
void cacao::ordered_list< T, Allocator >::insert | ( | iterator | pos, |
InputIt | first, | ||
InputIt | last | ||
) |
inserts elements from range [first, last) before the element pointed to by pos
|
inline |
Definition at line 333 of file ordered_list.hpp.
|
inline |
returns the maximum possible number of elements
Definition at line 307 of file ordered_list.hpp.
|
inline |
copy assignment operator
Definition at line 291 of file ordered_list.hpp.
|
inline |
Appends the given element value to the end of the container.
Definition at line 312 of file ordered_list.hpp.
|
inline |
inserts value to the beginning
Definition at line 317 of file ordered_list.hpp.
|
inline |
returns a reverse iterator to the beginning
Definition at line 385 of file ordered_list.hpp.
|
inline |
returns a const reverse iterator to the beginning
Definition at line 397 of file ordered_list.hpp.
|
inline |
returns a reverse iterator to the end
Definition at line 391 of file ordered_list.hpp.
|
inline |
returns a const reverse iterator to the end
Definition at line 403 of file ordered_list.hpp.
|
inline |
returns the number of elements
Definition at line 302 of file ordered_list.hpp.
|
inline |
exchanges the contents of the container with those of other
Definition at line 433 of file ordered_list.hpp.
|
friend |
|
friend |
|
private |
internal storage
Definition at line 102 of file ordered_list.hpp.