Array with virtual allocator. More...
Public Types | |
| typedef CollectionImplT< T > | BaseClass |
| typedef const T & | ObjectRef |
| typedef T | value_type |
| Type of array elements. | |
| typedef value_type * | iterator |
| Type of iterator over an array element. | |
| typedef const value_type * | const_iterator |
| Type of constant iterator over an array element. | |
| typedef value_type * | pointer |
| Type pointer of an array element. | |
| typedef const value_type * | const_pointer |
| Type constant pointer of an array element. | |
| typedef value_type & | reference |
| Type reference of an array element. | |
| typedef const value_type & | const_reference |
| Type constant reference of an array element. | |
| typedef IterT< ListImplBase< T > > | iter |
| Type of an iterator over the entire array. | |
| typedef ConstIterT< ListImplBase< T > > | const_iter |
| Type of a constant iterator over the entire array. | |
| Public Types inherited from Arcane::CollectionImplT< T > | |
| typedef const T & | ObjectRef |
| typedef T * | ObjectIterator |
| typedef const T * | ConstObjectIterator |
| Public Types inherited from Arcane::CollectionImplBase | |
| typedef Integer | size_type |
| Type indexing the array. | |
| typedef ptrdiff_t | difference_type |
| Type of a distance between array iterator elements. | |
Public Member Functions | |
| ListImplBase ()=default | |
| Constructs an empty array. | |
| void | assign (const ListImplBase< T > &s) |
| Copies the array from s. | |
| void | assign (const ConstArrayView< T > &s) |
| Copies the array from s. | |
| void | assign (const ArrayView< T > &s) |
| Copies the array from s. | |
| T & | operator[] (Integer i) |
| i-th element of the array. | |
| const T & | operator[] (Integer i) const |
| i-th element of the array. | |
| iterator | begin () override |
| Returns an iterator to the first element of the array. | |
| iterator | end () override |
| Returns an iterator to the first element after the end of the array. | |
| const_iterator | begin () const override |
| Returns a constant iterator to the first element of the array. | |
| const_iterator | end () const override |
| Returns a constant iterator to the first element after the end of the array. | |
| T * | begin2 () const override |
| Returns a pointer to the first element of the array. | |
| T * | end2 () const override |
| Returns a pointer to the first element after the end of the array. | |
| template<class Function> | |
| Function | each (Function f) |
| Applies the functor f to all elements of the array. | |
| void | reserve (Integer new_capacity) |
| Signals that memory should be reserved for new_capacity elements This is just an indication. The derived class is free not to take it into account. | |
| Integer | capacity () const |
| Returns the number of allocated elements in the array. | |
| void | clear () override |
| Removes all elements from the collection. | |
| void | add (ObjectRef elem) override |
| Adds element elem to the end of the array. | |
| bool | remove (ObjectRef element) override |
| void | removeAt (Integer index) override |
| const_iterator | find (ObjectRef element) const |
| bool | contains (ObjectRef element) const override |
| EnumeratorImplBase * | enumerator () const override |
| Returns a generic enumerator for the collection. | |
| void | resize (Integer new_size) |
| Changes the size of the array. new_size is the new number of elements in the array. | |
| Public Member Functions inherited from Arcane::CollectionImplT< T > | |
| template<class Function> | |
| Function | each (Function f) |
| Applies the functor f to all elements of the collection. | |
| Public Member Functions inherited from Arcane::CollectionImplBase | |
| CollectionImplBase ()=default | |
| Constructs an empty collection. | |
| CollectionImplBase (Integer acount) | |
| Constructs a collection with acount elements. | |
| CollectionImplBase (const CollectionImplBase &from)=delete | |
| Copy constructor. event handlers are not copied. | |
| Integer | count () const |
| Returns the number of elements in the collection. | |
| virtual void | onClear () |
| Event sent before removing all elements. | |
| virtual void | onClearComplete () |
| Event sent when all elements have been removed. | |
| virtual void | onInsert () |
| Event sent before inserting an element. | |
| virtual void | onInsertComplete (void *object, Integer position) |
| Event sent after inserting an element. | |
| virtual void | onRemove () |
| Event sent before removing an element. | |
| virtual void | onRemoveComplete (void *object, Integer position) |
| Event sent after removing an element. | |
| virtual void | onSet () |
| virtual void | onSetComplete (void *object, Integer position) |
| virtual void | onValidate () |
| CollectionChangeEventHandler & | change () |
| Public Member Functions inherited from Arcane::ObjectImpl | |
| ObjectImpl (const ObjectImpl &rhs)=delete | |
| ObjectImpl & | operator= (const ObjectImpl &rhs)=delete |
| void | addRef () |
| Increments the reference counter. | |
| void | removeRef () |
| Decrements the reference counter. | |
| Int32 | refCount () const |
| Returns the value of the reference counter. | |
| virtual void | deleteMe () |
| Destroys this object. | |
Protected Member Functions | |
| void | _removeAt (Integer index) |
| Integer | _capacity () const |
| void | _arrayCopy (const ListImplBase< T > &array) |
| void | _arrayCopy (const ConstArrayView< T > &array) |
| void | _arrayCopy (const ArrayView< T > &array) |
| void | _arrayCopy (const T *from_ptr, Integer from_size) |
| T * | _ptr () |
| Returns a pointer to the array. | |
| const T * | _ptr () const |
| Protected Member Functions inherited from Arcane::CollectionImplBase | |
| void | _setCount (Integer acount) |
Private Attributes | |
| UniqueArray< T > | m_array |
Array with virtual allocator.
It is up to the virtual class to destroy the objects in the virtual destructor.
Definition at line 42 of file arccore/src/common/arccore/common/List.h.
| typedef CollectionImplT<T> Arcane::ListImplBase< T >::BaseClass |
Definition at line 47 of file arccore/src/common/arccore/common/List.h.
| typedef ConstIterT<ListImplBase<T> > Arcane::ListImplBase< T >::const_iter |
Type of a constant iterator over the entire array.
Definition at line 71 of file arccore/src/common/arccore/common/List.h.
| typedef const value_type* Arcane::ListImplBase< T >::const_iterator |
Type of constant iterator over an array element.
Definition at line 58 of file arccore/src/common/arccore/common/List.h.
| typedef const value_type* Arcane::ListImplBase< T >::const_pointer |
Type constant pointer of an array element.
Definition at line 62 of file arccore/src/common/arccore/common/List.h.
| typedef const value_type& Arcane::ListImplBase< T >::const_reference |
Type constant reference of an array element.
Definition at line 66 of file arccore/src/common/arccore/common/List.h.
| typedef IterT<ListImplBase<T> > Arcane::ListImplBase< T >::iter |
Type of an iterator over the entire array.
Definition at line 69 of file arccore/src/common/arccore/common/List.h.
| typedef value_type* Arcane::ListImplBase< T >::iterator |
Type of iterator over an array element.
Definition at line 56 of file arccore/src/common/arccore/common/List.h.
| typedef const T& Arcane::ListImplBase< T >::ObjectRef |
Definition at line 51 of file arccore/src/common/arccore/common/List.h.
| typedef value_type* Arcane::ListImplBase< T >::pointer |
Type pointer of an array element.
Definition at line 60 of file arccore/src/common/arccore/common/List.h.
| typedef value_type& Arcane::ListImplBase< T >::reference |
Type reference of an array element.
Definition at line 64 of file arccore/src/common/arccore/common/List.h.
| typedef T Arcane::ListImplBase< T >::value_type |
Type of array elements.
Definition at line 54 of file arccore/src/common/arccore/common/List.h.
|
inlineprotected |
Definition at line 281 of file arccore/src/common/arccore/common/List.h.
|
inlineprotected |
Definition at line 277 of file arccore/src/common/arccore/common/List.h.
|
inlineprotected |
Definition at line 273 of file arccore/src/common/arccore/common/List.h.
|
inlineprotected |
Definition at line 285 of file arccore/src/common/arccore/common/List.h.
|
inlineprotected |
Definition at line 266 of file arccore/src/common/arccore/common/List.h.
|
inlineprotected |
Returns a pointer to the array.
Definition at line 305 of file arccore/src/common/arccore/common/List.h.
Referenced by add().
|
inlineprotected |
Definition at line 310 of file arccore/src/common/arccore/common/List.h.
|
inlineprotected |
Definition at line 241 of file arccore/src/common/arccore/common/List.h.
|
inlineoverridevirtual |
Adds element elem to the end of the array.
Implements Arcane::CollectionImplT< T >.
Definition at line 192 of file arccore/src/common/arccore/common/List.h.
References _ptr(), Arcane::CollectionImplBase::count(), Arcane::CollectionImplBase::onInsert(), and Arcane::CollectionImplBase::onInsertComplete().
|
inline |
Copies the array from s.
Definition at line 91 of file arccore/src/common/arccore/common/List.h.
|
inline |
Copies the array from s.
Definition at line 86 of file arccore/src/common/arccore/common/List.h.
|
inline |
Copies the array from s.
Definition at line 81 of file arccore/src/common/arccore/common/List.h.
References ListImplBase().
|
inlineoverridevirtual |
Returns a constant iterator to the first element of the array.
Implements Arcane::CollectionImplT< T >.
Definition at line 129 of file arccore/src/common/arccore/common/List.h.
|
inlineoverridevirtual |
Returns an iterator to the first element of the array.
Implements Arcane::CollectionImplT< T >.
Definition at line 119 of file arccore/src/common/arccore/common/List.h.
Referenced by each().
|
inlineoverridevirtual |
Returns a pointer to the first element of the array.
Implements Arcane::CollectionImplT< T >.
Definition at line 140 of file arccore/src/common/arccore/common/List.h.
Referenced by end2(), and enumerator().
|
inline |
Returns the number of allocated elements in the array.
This is just an indication. The derived class is free not to take it into account.
Definition at line 178 of file arccore/src/common/arccore/common/List.h.
|
inlineoverridevirtual |
Removes all elements from the collection.
Implements Arcane::CollectionImplBase.
Definition at line 183 of file arccore/src/common/arccore/common/List.h.
References Arcane::CollectionImplBase::onClear(), and Arcane::CollectionImplBase::onClearComplete().
|
inlineoverridevirtual |
Implements Arcane::CollectionImplT< T >.
Definition at line 231 of file arccore/src/common/arccore/common/List.h.
|
inline |
Applies the functor f to all elements of the array.
Definition at line 155 of file arccore/src/common/arccore/common/List.h.
References begin(), and end().
|
inlineoverridevirtual |
Returns a constant iterator to the first element after the end of the array.
Implements Arcane::CollectionImplT< T >.
Definition at line 134 of file arccore/src/common/arccore/common/List.h.
References Arcane::CollectionImplBase::count().
|
inlineoverridevirtual |
Returns an iterator to the first element after the end of the array.
Implements Arcane::CollectionImplT< T >.
Definition at line 124 of file arccore/src/common/arccore/common/List.h.
References Arcane::CollectionImplBase::count().
Referenced by each().
|
inlineoverridevirtual |
Returns a pointer to the first element after the end of the array.
Implements Arcane::CollectionImplT< T >.
Definition at line 146 of file arccore/src/common/arccore/common/List.h.
References begin2(), and Arcane::CollectionImplBase::count().
Referenced by enumerator().
|
overridevirtual |
Returns a generic enumerator for the collection.
Implements Arcane::CollectionImplBase.
Definition at line 428 of file arccore/src/common/arccore/common/List.h.
References begin2(), and end2().
|
inline |
Definition at line 222 of file arccore/src/common/arccore/common/List.h.
|
inline |
i-th element of the array.
In check mode, checks for overflows.
Definition at line 103 of file arccore/src/common/arccore/common/List.h.
|
inline |
i-th element of the array.
In check mode, checks for overflows.
Definition at line 113 of file arccore/src/common/arccore/common/List.h.
|
inlineoverridevirtual |
Implements Arcane::CollectionImplT< T >.
Definition at line 201 of file arccore/src/common/arccore/common/List.h.
|
inlineoverridevirtual |
Implements Arcane::CollectionImplT< T >.
Definition at line 214 of file arccore/src/common/arccore/common/List.h.
|
inline |
Signals that memory should be reserved for new_capacity elements This is just an indication. The derived class is free not to take it into account.
Definition at line 167 of file arccore/src/common/arccore/common/List.h.
|
inline |
Changes the size of the array. new_size is the new number of elements in the array.
Definition at line 258 of file arccore/src/common/arccore/common/List.h.
|
private |
Definition at line 317 of file arccore/src/common/arccore/common/List.h.