Elm  1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
elm::concept::MutableList< T > Class Template Reference

#include </home/casse/otawa/elm/src/concepts.h>

+ Inheritance diagram for elm::concept::MutableList< T >:

Public Member Functions

void addFirst (const T &item)
 
void addLast (const T &item)
 
void removeFirst (void)
 
void removeLast (void)
 
void addAfter (const Iterator< T > &pos, const T &item)
 
void addBefore (const Iterator< T > &pos, const T &item)
 
void set (const Iterator< T > &pos, const T &item)
 
- Public Member Functions inherited from elm::concept::List< T >
const T & first (void)
 
const T & last (void)
 
Iterator< T > find (const T &item)
 
Iterator< T > find (const T &item, const Iterator &start)
 
- Public Member Functions inherited from elm::concept::Collection< T >
int count (void)
 
bool contains (const T &item)
 
bool containsAll (const C< T > &collection)
 
bool isEmpty (void)
 
 operator bool (void)
 
- Public Member Functions inherited from elm::concept::MutableCollection< T >
void clear (void)
 
void add (const T &item)
 
void addAll (const Collection< T > &items)
 
void remove (const T &item)
 
void removeAll (const Collection< T > &items)
 
void remove (const Iterator< T > &iter)
 

Detailed Description

template<class T>
class elm::concept::MutableList< T >

A list is an ordered sequence of items. It implements the MutableCollection concept but the iterator traverse the list in the sequence of the items.

Implemented by:
elm::genstruct::DLList elm::genstruct::SLList

Member Function Documentation

template<class T >
void elm::concept::MutableList< T >::addAfter ( const Iterator< T > &  pos,
const T &  item 
)

Add an item after another one.

Parameters
posPosition to add after.
itemItem to add.
template<class T >
void elm::concept::MutableList< T >::addBefore ( const Iterator< T > &  pos,
const T &  item 
)

Add an item before another one.

Parameters
posPosition to add before.
itemItem to add.
template<class T >
void elm::concept::MutableList< T >::addFirst ( const T &  item)

Add an item as the first item before other items..

Parameters
itemItem to add.
template<class T >
void elm::concept::MutableList< T >::addLast ( const T &  item)

Add an item as the last item after other items.

Parameters
itemItem to add.
template<class T >
void elm::concept::MutableList< T >::removeFirst ( void  )

Remove the first item.

template<class T >
void elm::concept::MutableList< T >::removeLast ( void  )

Remove the last item.

template<class T >
void elm::concept::MutableList< T >::set ( const Iterator< T > &  pos,
const T &  item 
)

Change an item in the list.

Parameters
posPosition of the item to change.
itemNew item to replace with.

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