Wiselib
|
A Sequence is a container whose elements are arranged in a strict order. More...
Inherits concepts::Container_concept, and concepts::DefaultConstructable_concept.
Inherited by concepts::BackInsertionSequence_concept, and concepts::FrontInsertionSequence_concept.
Public Member Functions | |
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). | |
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. | |
X () | |
The default constructor. | |
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 Sequence is a container whose elements are arranged in a strict order.
Sequences support insertion and removal of elements.
iterator concepts::Container_concept::begin | ( | ) | [inherited] |
Return an iterator that points at the first element.
void concepts::Sequence_concept::clear | ( | ) |
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 | ) |
Erase element pointed to by p from the container.
void concepts::Sequence_concept::insert | ( | iterator | p, |
size_type | n, | ||
value_type | t | ||
) |
Insert n copies of t before p.
void concepts::Sequence_concept::insert | ( | iterator | p, |
value_type | t | ||
) |
Insert value t before the place pointed to by p.
void concepts::Sequence_concept::insert | ( | iterator | p, |
value_type | a, | ||
value_type | b | ||
) |
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::Sequence_concept::resize | ( | size_type | n, |
value_type | t | ||
) |
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 | ( | size_type | n, |
value_type | t | ||
) |
Create a sequence consisting of n copies of t.
concepts::Sequence_concept::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).
concepts::Sequence_concept::X | ( | size_type | n | ) |
Create a sequence consisting of n instances of the default value for value_type.
concepts::DefaultConstructable_concept::X | ( | ) | [inherited] |
The default constructor.
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.