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::List< T > Class Template Reference

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

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

Public Member Functions

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)
 

Detailed Description

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

A list is an ordered sequence of items. It implements the Collection 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 >
Iterator<T> elm::concept::List< T >::find ( const T &  item)

Find the iterator of the item equal to the given one in the list.

Parameters
itemItem to look for.
Returns
Iterator on the found item, ended item if not found.
template<class T >
Iterator<T> elm::concept::List< T >::find ( const T &  item,
const Iterator start 
)

Find the iterator of the item equal to the given one in the list.

Parameters
itemItem to look for.
iterPosition to start from.
Returns
Iterator on the found item, ended item if not found.
template<class T >
const T& elm::concept::List< T >::first ( void  )

Get the first item of the list.

Returns
First item.
template<class T >
const T& elm::concept::List< T >::last ( void  )

Get the last item of the list.

Returns
Last item.

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