Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::Collection< T > Class Template Reference

Base class for a strongly typed collection. More...

#include <arccore/common/Collection.h>

Public Types

typedef const T & ObjectRef
typedef T & Ref
typedef T * Iterator
typedef EnumeratorT< T > Enumerator
 Type of an iterator over the entire collection.

Public Member Functions

 Collection ()=default
 Creates a null collection.
Enumerator enumerator () const
Iterator begin ()
Iterator end ()
Ref front ()
bool remove (ObjectRef value)
void removeAt (Integer index)
void add (ObjectRef value)
bool contains (ObjectRef value) const
template<class Function>
Function each (Function f)
 Applies the functor f to all elements of the collection.
Public Member Functions inherited from Arcane::CollectionBase
 CollectionBase (const CollectionBase &rhs)
 CollectionBase ()=default
 Creates a null collection.
CollectionBase & operator= (const CollectionBase &rhs)
void clear ()
 Removes all elements from the collection.
Integer count () const
 Number of elements in the collection.
bool empty () const
 True if the collection is empty.
CollectionChangeEventHandler & change ()
 Event invoked when the collection changes.

Protected Member Functions

 Collection (Impl *vb)
Protected Member Functions inherited from Arcane::CollectionBase
 CollectionBase (Impl *vb)
Impl * _ref ()
const Impl * _ref () const
Impl * _noNullRef ()
const Impl * _noNullRef () const
void _setRef (Impl *new_impl)

(Note that these are not member symbols.)

typedef EventObservable< const CollectionEventArgs & > CollectionChangeEventHandler
 Events sent by a Collection.

Detailed Description

template<typename T>
class Arcane::Collection< T >

Base class for a strongly typed collection.

Definition at line 558 of file arccore/src/common/arccore/common/Collection.h.

Member Typedef Documentation

◆ Enumerator

template<typename T>
typedef EnumeratorT<T> Arcane::Collection< T >::Enumerator

Type of an iterator over the entire collection.

Definition at line 574 of file arccore/src/common/arccore/common/Collection.h.

◆ Iterator

template<typename T>
typedef T* Arcane::Collection< T >::Iterator

◆ ObjectRef

template<typename T>
typedef const T& Arcane::Collection< T >::ObjectRef

◆ Ref

template<typename T>
typedef T& Arcane::Collection< T >::Ref

Constructor & Destructor Documentation

◆ Collection() [1/2]

template<typename T>
Arcane::Collection< T >::Collection ( )
default

Creates a null collection.

The instance is not usable until it has been assigned to a non-null collection.

◆ Collection() [2/2]

template<typename T>
Arcane::Collection< T >::Collection ( Impl * vb)
inlineexplicitprotected

Member Function Documentation

◆ add()

template<typename T>
void Arcane::Collection< T >::add ( ObjectRef value)
inline

◆ begin()

template<typename T>
Iterator Arcane::Collection< T >::begin ( )
inline

◆ contains()

template<typename T>
bool Arcane::Collection< T >::contains ( ObjectRef value) const
inline

◆ each()

template<typename T>
template<class Function>
Function Arcane::Collection< T >::each ( Function f)
inline

Applies the functor f to all elements of the collection.

Definition at line 614 of file arccore/src/common/arccore/common/Collection.h.

◆ end()

template<typename T>
Iterator Arcane::Collection< T >::end ( )
inline

◆ enumerator()

template<typename T>
Enumerator Arcane::Collection< T >::enumerator ( ) const
inline

◆ front()

template<typename T>
Ref Arcane::Collection< T >::front ( )
inline

◆ remove()

template<typename T>
bool Arcane::Collection< T >::remove ( ObjectRef value)
inline

◆ removeAt()

template<typename T>
void Arcane::Collection< T >::removeAt ( Integer index)
inline

◆ CollectionChangeEventHandler

template<typename T>
typedef EventObservable<const CollectionEventArgs&> CollectionChangeEventHandler
related

Events sent by a Collection.

Definition at line 299 of file arccore/src/common/arccore/common/Collection.h.


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