Vector< Contained, tp > Class Template Reference

List of all members.

Classes

struct  Incrementor

Public Types

typedef Incrementor< Contained > Iterator
typedef Incrementor< const
Contained > 
ConstIterator

Public Member Functions

 Vector ()
 Vector (unsigned int capacity)
 ~Vector ()
void pushBack (const Contained &contained)
Contained & popBack ()
Contained & getFront () const
Contained & getBack () const
template<class IteratorTp >
Contained & remove (const IteratorTp &it)
unsigned int capacity () const
unsigned int size () const
bool isEmpty () const
Iterator begin ()
Iterator end ()
ConstIterator begin () const
ConstIterator end () const

Protected Attributes

VecBehaviour< tp, Contained > _p


Detailed Description

template<class Contained, VecType tp = GROWABLE>
class Vector< Contained, tp >

that uses arrays as internal representation
Author:
Group 06

Definition at line 153 of file ep_vector.h.


Constructor & Destructor Documentation

template<class Contained, VecType tp = GROWABLE>
Vector< Contained, tp >::Vector (  )  [inline]

Default constructor

Definition at line 247 of file ep_vector.h.

template<class Contained, VecType tp = GROWABLE>
Vector< Contained, tp >::Vector ( unsigned int  capacity  )  [inline]

Constructor that the user may pass the maximum initial size of the Vector

Parameters:
capacity the maximum initial size in the [1..n] range

Definition at line 253 of file ep_vector.h.

template<class Contained, VecType tp = GROWABLE>
Vector< Contained, tp >::~Vector (  )  [inline]

Destructor

Definition at line 258 of file ep_vector.h.


Member Function Documentation

template<class Contained, VecType tp = GROWABLE>
ConstIterator Vector< Contained, tp >::begin (  )  const [inline]

Gets a iterator that iterates over const Contained values

Returns:
a ConstIterator that iterates over the Vector instance first element

Definition at line 346 of file ep_vector.h.

template<class Contained, VecType tp = GROWABLE>
Iterator Vector< Contained, tp >::begin (  )  [inline]

Gets a iterator that iterates over const Contained values

Returns:
a ConstIterator that iterates over the Vector instance first element

Definition at line 330 of file ep_vector.h.

template<class Contained, VecType tp = GROWABLE>
unsigned int Vector< Contained, tp >::capacity (  )  const [inline]

Returns the current Vector instance capacity

Returns:
a unsigned int that is the current maximum number of elements in the Vector

Definition at line 306 of file ep_vector.h.

template<class Contained, VecType tp = GROWABLE>
ConstIterator Vector< Contained, tp >::end (  )  const [inline]

Gets a iterator that iterates over const Contained values

Returns:
a ConstIterator that iterates over the Vector instance end (garbage)

Definition at line 354 of file ep_vector.h.

template<class Contained, VecType tp = GROWABLE>
Iterator Vector< Contained, tp >::end (  )  [inline]

Gets a iterator that iterates over const Contained values

Returns:
a ConstIterator that iterates over the Vector instance end (garbage)

Definition at line 338 of file ep_vector.h.

template<class Contained, VecType tp = GROWABLE>
Contained& Vector< Contained, tp >::getBack (  )  const [inline]

Gets the last element of the Vector

Returns:
a reference to the last element of the Vector

Definition at line 289 of file ep_vector.h.

template<class Contained, VecType tp = GROWABLE>
Contained& Vector< Contained, tp >::getFront (  )  const [inline]

Gets the first element of the Vector

Returns:
a reference to the first element of the Vector

Definition at line 281 of file ep_vector.h.

template<class Contained, VecType tp = GROWABLE>
bool Vector< Contained, tp >::isEmpty (  )  const [inline]

Gets whether the Vector is empty or not

Returns:
true if the Vector is empty and false otherwise

Definition at line 322 of file ep_vector.h.

template<class Contained, VecType tp = GROWABLE>
Contained& Vector< Contained, tp >::popBack (  )  [inline]

Removes the last element of the vector and returns a reference to it

Definition at line 273 of file ep_vector.h.

template<class Contained, VecType tp = GROWABLE>
void Vector< Contained, tp >::pushBack ( const Contained &  contained  )  [inline]

Inserts the passed Contained to the last position of the Vector instance

Parameters:
contained the Contained object to be inserted at the Vector last position

Definition at line 266 of file ep_vector.h.

template<class Contained, VecType tp = GROWABLE>
unsigned int Vector< Contained, tp >::size (  )  const [inline]

Returns the current Vector instance size

Returns:
a unsigned int that is the number of elements in the Vector

Definition at line 314 of file ep_vector.h.


The documentation for this class was generated from the following file:

Generated on Mon May 4 09:42:22 2009 for EPOS-- by  doxygen 1.5.8