BALL::List< Value > Class Template Reference
[Miscellaneous]

Extended list object. More...

#include <list.h>

Inheritance diagram for BALL::List< Value >:
Inheritance graph
[legend]

List of all members.


Public Types

Type Definitions
typedef std::list< Value >
::iterator
Iterator
Iterator type.
typedef std::list< Value >
::iterator
iterator
typedef std::list< Value >
::const_iterator
ConstIterator
Constant iterator type.
typedef std::list< Value >
::const_iterator
const_iterator

Public Member Functions

bool operator== (const List< Value > &list) const
Equality operator.
bool operator!= (const List< Value > &list) const
Inequality operator.
Constructors and Destructors
List ()
Default constructor.
List (const List &new_list, bool)
Copy constructor.
void destroy ()
Clear the list.
virtual ~List ()
Destructor.
Assignment
void set (const List &list, bool=true)
Assign a list from another.
const List & operator= (const List &list)
Assign a list from another.
void get (List &list, bool deep=true) const
Assign the content of a list to another.
void swap (List &list)
Swaps the contents of two lists.
Accessors
Size getSize () const
Return the size of the list.
bool remove (const Value &item)
Remove an item from the list.
Predicates
bool isEmpty () const
Return true if the list is empty.
DatatypeMiscellaneous
virtual void host (Visitor< List< Value > > &visitor)
Visitor host method.
Internal Iterators
bool apply (UnaryProcessor< Value > &processor)
Processor application method.

Detailed Description

template<typename Value>
class BALL::List< Value >

Extended list object.

This object is an improved version of the STL list class


Constructor & Destructor Documentation

template<typename Value>
BALL::List< Value >::List ( )

Default constructor.

Create an empty list.

template<typename Value>
BALL::List< Value >::List ( const List< Value > & new_list,
bool
)

Copy constructor.

Create a copy of an existing list.

Parameters:
map the list to be copied
deep ignored

Member Function Documentation

template<typename Value>
bool BALL::List< Value >::apply ( UnaryProcessor< Value > & processor )

Processor application method.

Applies the processor to each entry of the list.

Parameters:
processor the processor to be applied

template<typename Value>
void BALL::List< Value >::host ( Visitor< List< Value > > & visitor ) [virtual]

Visitor host method.

Lists may be visited.

Parameters:
visitor the visitor

template<typename Value>
bool BALL::List< Value >::isEmpty ( ) const

Return true if the list is empty.

This method return true if the list does not contain any entries.

template<typename Value>
bool BALL::List< Value >::operator!= ( const List< Value > & list ) const

Inequality operator.

Test if two instances differ in at least one element.

template<typename Value>
bool BALL::List< Value >::operator== ( const List< Value > & list ) const

Equality operator.

Test if two instances have the same size and same items at the same positions.

template<typename Value>
bool BALL::List< Value >::remove ( const Value & item )

Remove an item from the list.

The first item that matches item will be removed.

Parameters:
item the item to be removed
Returns:
bool true if the item was removed

template<typename Value>
void BALL::List< Value >::set ( const List< Value > & list,
bool = true
)

Assign a list from another.

Parameters:
list the map to be copied
deep ignored

Referenced by BALL::List< EnergyProcessor * >::get(), and BALL::List< EnergyProcessor * >::swap().


Generated on Thu Aug 6 18:30:28 2009 for BALL by doxygen 1.5.8