#include <BALL/DATATYPE/list.h>
Inherits std::list<Value>.
Public Types | |
Type Definitions | |
| typedef std::list< Value > ::iterator | Iterator |
| typedef std::list< Value > ::iterator | iterator |
| typedef std::list< Value > ::const_iterator | ConstIterator |
| typedef std::list< Value > ::const_iterator | const_iterator |
Public Member Functions | |
| bool | operator== (const List< Value > &list) const |
| bool | operator!= (const List< Value > &list) const |
Constructors and Destructors | |
| List () | |
| List (const List &new_list, bool) | |
| void | destroy () |
| virtual | ~List () |
Assignment | |
| void | set (const List &list, bool=true) |
| const List & | operator= (const List &list) |
| 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 |
| bool | remove (const Value &item) |
Predicates | |
| bool | isEmpty () const |
DatatypeMiscellaneous | |
| virtual void | host (Visitor< List< Value > > &visitor) |
Internal Iterators | |
| bool | apply (UnaryProcessor< Value > &processor) |
Extended list object. This object is an improved version of the STL list class
| typedef std::list<Value>::const_iterator BALL::List< Value >::const_iterator |
| typedef std::list<Value>::const_iterator BALL::List< Value >::ConstIterator |
Constant iterator type.
Reimplemented in BALL::PeakList< PT >, BALL::PyCompositeList, BALL::PyIndexList, and BALL::PeakList< Peak< float > >.
| typedef std::list<Value>::iterator BALL::List< Value >::iterator |
| typedef std::list<Value>::iterator BALL::List< Value >::Iterator |
Iterator type.
Reimplemented in BALL::PeakList< PT >, BALL::PyCompositeList, BALL::PyIndexList, and BALL::PeakList< Peak< float > >.
| BALL::List< Value >::List | ( | ) | [inline] |
Default constructor. Create an empty list.
| BALL::List< Value >::List | ( | const List< Value > & | new_list, | |
| bool | ||||
| ) | [inline] |
Copy constructor. Create a copy of an existing list.
| map | the list to be copied | |
| deep | ignored |
| virtual BALL::List< Value >::~List | ( | ) | [inline, virtual] |
Destructor
| bool BALL::List< Value >::apply | ( | UnaryProcessor< Value > & | processor | ) | [inline] |
Processor application method. Applies the processor to each entry of the list.
| processor | the processor to be applied |
| void BALL::List< Value >::destroy | ( | ) | [inline] |
Clear the list
| void BALL::List< Value >::get | ( | List< Value > & | list, | |
| bool | deep = true | |||
| ) | const [inline] |
Assign the content of a list to another.
| Size BALL::List< Value >::getSize | ( | ) | const [inline] |
Return the size of the list.
| void BALL::List< Value >::host | ( | Visitor< List< Value > > & | visitor | ) | [inline, virtual] |
Visitor host method. Lists may be visited.
| visitor | the visitor |
| bool BALL::List< Value >::isEmpty | ( | ) | const [inline] |
Return true if the list is empty. This method return true if the list does not contain any entries.
| bool BALL::List< Value >::operator!= | ( | const List< Value > & | list | ) | const [inline] |
Inequality operator. Test if two instances differ in at least one element.
| const List& BALL::List< Value >::operator= | ( | const List< Value > & | list | ) | [inline] |
Assign a list from another.
| bool BALL::List< Value >::operator== | ( | const List< Value > & | list | ) | const [inline] |
Equality operator. Test if two instances have the same size and same items at the same positions.
| bool BALL::List< Value >::remove | ( | const Value & | item | ) | [inline] |
Remove an item from the list. The first item that matches item will be removed.
| item | the item to be removed |
| void BALL::List< Value >::set | ( | const List< Value > & | list, | |
| bool | = true | |||
| ) | [inline] |
Assign a list from another.
| list | the map to be copied | |
| deep | ignored |
Referenced by BALL::List< EnergyProcessor * >::get(), and BALL::List< EnergyProcessor * >::swap().
| void BALL::List< Value >::swap | ( | List< Value > & | list | ) | [inline] |
Swaps the contents of two lists.