ApparatusFramework::PriorityList< Item, maxSize > Class Template Reference
[RT-STL]

#include <RT_STL/current/include/PriorityList.h>

List of all members.

Public Types

typedef list< Item, maxSize >
::iterator 
iterator

Public Member Functions

 PriorityList ()
 ~PriorityList ()
iterator begin () const
iterator end () const
void insert (const Item &item)
void remove (const Item &item)
void pop_front ()
Item & front ()
bool empty () const
int size () const

Detailed Description

template<class Item, int maxSize>
class ApparatusFramework::PriorityList< Item, maxSize >

The priority list orders the inserted items into the list. We use the operator < to sort the list. The smallest item is at the front and the biggest item is at the back.

Definition at line 57 of file PriorityList.h.


Member Typedef Documentation

template<class Item, int maxSize>
typedef list<Item, maxSize>::iterator ApparatusFramework::PriorityList< Item, maxSize >::iterator

Represents an iterator of the PriorityList template.

Definition at line 72 of file PriorityList.h.


Constructor & Destructor Documentation

template<class Item , int maxSize>
ApparatusFramework::PriorityList< Item, maxSize >::PriorityList (  )  [inline]

constructors, destructors Default constructor of the class. All instance variables are initialized to their default values.

Definition at line 127 of file PriorityList.h.

template<class Item , int maxSize>
ApparatusFramework::PriorityList< Item, maxSize >::~PriorityList (  )  [inline]

Destructor of the class. All resources are released.

Definition at line 131 of file PriorityList.h.


Member Function Documentation

template<class Item, int maxSize>
iterator ApparatusFramework::PriorityList< Item, maxSize >::begin (  )  const [inline]

Returns an iterator pointing at the beginning of the container.

Returns:
iterator iterator to the beginning of the container.

Definition at line 77 of file PriorityList.h.

template<class Item , int maxSize>
bool ApparatusFramework::PriorityList< Item, maxSize >::empty (  )  const [inline]

Returns true if the priority list is empty.

Returns:
bool true if the list is empty, false otherwise.

Definition at line 172 of file PriorityList.h.

References ApparatusFramework::list< T, maxSize >::empty().

template<class Item, int maxSize>
iterator ApparatusFramework::PriorityList< Item, maxSize >::end (  )  const [inline]

Returns an iterator pointing at the end of the container.

Returns:
iterator iterator to the end of the container.

Definition at line 82 of file PriorityList.h.

template<class Item , int maxSize>
Item & ApparatusFramework::PriorityList< Item, maxSize >::front (  )  [inline]

queries Returns the front item from the priority list.

Returns:
Item& front item of the priority list.

Definition at line 159 of file PriorityList.h.

References ApparatusFramework::list< T, maxSize >::front().

template<class Item, int maxSize>
void ApparatusFramework::PriorityList< Item, maxSize >::insert ( const Item &  item  )  [inline]

modifiers Inserts the item into the priority list using the operator <.

Parameters:
item item to be inserted into the list.

Definition at line 135 of file PriorityList.h.

References ApparatusFramework::list< T, maxSize >::begin(), ApparatusFramework::list< T, maxSize >::end(), ApparatusFramework::list< T, maxSize >::insert(), and ApparatusFramework::list< T, maxSize >::push_back().

template<class Item , int maxSize>
void ApparatusFramework::PriorityList< Item, maxSize >::pop_front (  )  [inline]

Removes the front item from the priority list.

Definition at line 165 of file PriorityList.h.

References ApparatusFramework::list< T, maxSize >::pop_front().

template<class Item, int maxSize>
void ApparatusFramework::PriorityList< Item, maxSize >::remove ( const Item &  item  )  [inline]

Removes the given item from the priority list if found.

Parameters:
item item to be removed from the list.

Definition at line 153 of file PriorityList.h.

References ApparatusFramework::list< T, maxSize >::remove().

template<class Item , int maxSize>
int ApparatusFramework::PriorityList< Item, maxSize >::size (  )  const [inline]

Returns the size of the container.

Returns:
int size of the containter.

Definition at line 178 of file PriorityList.h.

References ApparatusFramework::list< T, maxSize >::size().

© 2004-2010 bbv Software Services AG / Apparatus Services