Wiselib
Public Member Functions | Public Attributes
concepts::Sequence_concept Class Reference

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.

List of all members.

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().

Detailed Description

A Sequence is a container whose elements are arranged in a strict order.

Sequences support insertion and removal of elements.


Member Function Documentation

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

void concepts::Sequence_concept::erase ( iterator  p,
iterator  q 
)

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.


Member Data Documentation

Type of the iterators returned by begin() and end().

This type is expected to implement the iterator concept.

Type of the element-counts returned by size() and maxsize().

Usually an (unsigned) integer type.

Type of elements of the container.


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