Wiselib
|
A front insertion sequence guarantees that insertion and access operations at the front of the container happen in amortized constant time and provides additional shorthands for those operations. More...
Inherits concepts::Sequence_concept.
Public Member Functions | |
value_type & | front () |
Return reference to first element (equivalent to *(begin())). | |
void | push_front (value_type &t) |
Insert element as new first element of the container (equivalent to insert(begin(), t) ). | |
void | pop_front () |
Remove first element (equivalent to erase(begin()) ). | |
X (size_type n, value_type t) | |
Create a sequence consisting of n copies of t. | |
X (size_type n) | |
Create a sequence consisting of n instances of the default value for value_type. | |
X (value_type a, value_type b) | |
Create a sequence that contains the values from a to b, including a and excluding b or in mathematical notation: [a, b). | |
X () | |
The default constructor. | |
void | insert (iterator p, value_type t) |
Insert value t before the place pointed to by p. | |
void | insert (iterator p, size_type n, value_type t) |
Insert n copies of t before p. | |
void | insert (iterator p, value_type a, value_type b) |
Insert [a, b) before p. | |
void | erase (iterator p) |
Erase element pointed to by p from the container. | |
void | erase (iterator p, iterator q) |
Erase all elements pointed to by [p, q). | |
void | clear () |
Clear container (remove all elements). | |
void | resize (size_type n, value_type t) |
Resize container by removing elements from the end or appending copies of t at the end. | |
iterator | begin () |
Return an iterator that points at the first element. | |
iterator | end () |
Return an iterator that points "after" the last element. | |
size_type | size () |
Return number of elements in the container. | |
size_type | max_size () |
Return maximum number of elements in the container. | |
bool | empty () |
Return true if the container is empty. | |
Public Attributes | |
typedef | value_type |
Type of elements of the container. | |
typedef | iterator |
Type of the iterators returned by begin() and end(). | |
typedef | size_type |
Type of the element-counts returned by size() and maxsize(). |
A front insertion sequence guarantees that insertion and access operations at the front of the container happen in amortized constant time and provides additional shorthands for those operations.
iterator concepts::Container_concept::begin | ( | ) | [inherited] |
Return an iterator that points at the first element.
void concepts::Sequence_concept::clear | ( | ) | [inherited] |
Clear container (remove all elements).
bool concepts::Container_concept::empty | ( | ) | [inline, inherited] |
Return true if the container is empty.
iterator concepts::Container_concept::end | ( | ) | [inherited] |
Return an iterator that points "after" the last element.
I.e. dereferencing this iterator does not need to work, but (equality) comparison to any iterator that has finished iterating over all elements of the container should yield true
Erase all elements pointed to by [p, q).
void concepts::Sequence_concept::erase | ( | iterator | p | ) | [inherited] |
Erase element pointed to by p from the container.
value_type& concepts::FrontInsertionSequence_concept::front | ( | ) | [inline] |
Return reference to first element (equivalent to *(begin())).
void concepts::Sequence_concept::insert | ( | iterator | p, |
size_type | n, | ||
value_type | t | ||
) | [inherited] |
Insert n copies of t before p.
void concepts::Sequence_concept::insert | ( | iterator | p, |
value_type | t | ||
) | [inherited] |
Insert value t before the place pointed to by p.
void concepts::Sequence_concept::insert | ( | iterator | p, |
value_type | a, | ||
value_type | b | ||
) | [inherited] |
Insert [a, b) before p.
size_type concepts::Container_concept::max_size | ( | ) | [inherited] |
Return maximum number of elements in the container.
If the container is not limited in size, return 0.
void concepts::FrontInsertionSequence_concept::pop_front | ( | ) | [inline] |
Remove first element (equivalent to erase(begin()) ).
void concepts::FrontInsertionSequence_concept::push_front | ( | value_type & | t | ) | [inline] |
Insert element as new first element of the container (equivalent to insert(begin(), t) ).
void concepts::Sequence_concept::resize | ( | size_type | n, |
value_type | t | ||
) | [inherited] |
Resize container by removing elements from the end or appending copies of t at the end.
size_type concepts::Container_concept::size | ( | ) | [inherited] |
Return number of elements in the container.
concepts::Sequence_concept::X | ( | value_type | a, |
value_type | b | ||
) | [inherited] |
Create a sequence that contains the values from a to b, including a and excluding b or in mathematical notation: [a, b).
concepts::Sequence_concept::X | ( | size_type | n, |
value_type | t | ||
) | [inherited] |
Create a sequence consisting of n copies of t.
concepts::DefaultConstructable_concept::X | ( | ) | [inherited] |
The default constructor.
concepts::Sequence_concept::X | ( | size_type | n | ) | [inherited] |
Create a sequence consisting of n instances of the default value for value_type.
typedef concepts::Container_concept::iterator [inherited] |
typedef concepts::Container_concept::size_type [inherited] |
Type of the element-counts returned by size() and maxsize().
Usually an (unsigned) integer type.
typedef concepts::Container_concept::value_type [inherited] |
Type of elements of the container.