Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::ItemVectorT< VectorItemType > Class Template Reference

Typed entity vector. More...

#include <arcane/core/ItemVector.h>

Inheritance diagram for Arcane::ItemVectorT< VectorItemType >:
Collaboration diagram for Arcane::ItemVectorT< VectorItemType >:

Public Types

using ItemType = VectorItemType
Public Types inherited from Arcane::ItemVector
using ItemType = Item

Public Member Functions

 ItemVectorT ()=default
 Empty constructor.
 ItemVectorT (IItemFamily *afamily)
 Empty constructor with family.
 ItemVectorT (IItemFamily *afamily, ConstArrayView< Int32 > local_ids)
 Creates a vector associated with the family afamily and containing the entities local_ids.
 ItemVectorT (const ItemVector &rhs)
 Copy constructor.
 ItemVectorT (IItemFamily *afamily, Integer asize)
 Constructor for asize elements for the family afamily.
 operator ItemVectorViewT< VectorItemType > () const
 Cast operator to ItemVectorView.
ItemType operator[] (Int32 index) const
 Entity at position index of the vector.
void addItem (ItemType item)
 Adds an entity to the end of the vector.
void addItem (ItemLocalIdT< ItemType > local_id)
 Adds an entity to the end of the vector.
ItemVectorViewT< ItemType > view () const
 View of the entire array.
ItemEnumeratorT< ItemType > enumerator () const
 Enumerator.
Public Member Functions inherited from Arcane::ItemVector
 ItemVector (IItemFamily *afamily)
 Creates an empty vector associated with the family family.
 ItemVector (IItemFamily *afamily, Int32ConstArrayView local_ids)
 Creates a vector associated with the family family and containing the entities local_ids.
 ItemVector (IItemFamily *afamily, Integer asize)
 Creates a vector for size elements associated with the family family.
 ItemVector ()
 Creates a null vector. You must then call setFamily() to use it.
 operator ItemVectorView () const
 Cast operator to ItemVectorView.
void setFamily (IItemFamily *afamily)
 Sets the associated family.
void add (Int32 local_id)
 Adds an entity with local ID local_id to the end of the vector.
void add (ConstArrayView< Int32 > local_ids)
 Adds a list of entity local IDs local_ids to the end of the vector.
void addItem (ItemLocalId local_id)
 Adds an entity with local ID local_id to the end of the vector.
void addItem (Item item)
 Adds an entity to the end of the vector.
Int32 size () const
 Number of elements in the vector.
void reserve (Integer capacity)
 Reserves memory for capacity entities.
void clear ()
 Removes all entities from the vector.
ItemVectorView view () const
 View of the vector.
ArrayView< Int32viewAsArray ()
 View of the local IDs.
ConstArrayView< Int32viewAsArray () const
 Constant view of the local IDs.
void removeAt (Int32 index)
 Removes the entity at index index.
void resize (Integer new_size)
 Sets the number of elements in the array.
ItemVector clone ()
 Clones this vector.
Item operator[] (Int32 index) const
 Entity at position index of the vector.
IItemFamilyfamily () const
 Family associated with the vector.
ItemEnumerator enumerator () const
 Enumerator.

Additional Inherited Members

Protected Attributes inherited from Arcane::ItemVector
SharedArray< Int32m_local_ids
IItemFamilym_family = nullptr
ItemSharedInfom_shared_info = ItemSharedInfo::nullInstance()

Detailed Description

template<typename VectorItemType>
class Arcane::ItemVectorT< VectorItemType >

Typed entity vector.

For more information, see ItemVector.

Definition at line 166 of file ItemVector.h.

Member Typedef Documentation

◆ ItemType

template<typename VectorItemType>
using Arcane::ItemVectorT< VectorItemType >::ItemType = VectorItemType

Definition at line 171 of file ItemVector.h.

Constructor & Destructor Documentation

◆ ItemVectorT() [1/4]

template<typename VectorItemType>
Arcane::ItemVectorT< VectorItemType >::ItemVectorT ( IItemFamily * afamily)
inlineexplicit

Empty constructor with family.

Definition at line 179 of file ItemVector.h.

◆ ItemVectorT() [2/4]

template<typename VectorItemType>
Arcane::ItemVectorT< VectorItemType >::ItemVectorT ( IItemFamily * afamily,
ConstArrayView< Int32 > local_ids )
inline

Creates a vector associated with the family afamily and containing the entities local_ids.

Definition at line 184 of file ItemVector.h.

◆ ItemVectorT() [3/4]

template<typename VectorItemType>
Arcane::ItemVectorT< VectorItemType >::ItemVectorT ( const ItemVector & rhs)
inline

Copy constructor.

Definition at line 189 of file ItemVector.h.

◆ ItemVectorT() [4/4]

template<typename VectorItemType>
Arcane::ItemVectorT< VectorItemType >::ItemVectorT ( IItemFamily * afamily,
Integer asize )
inline

Constructor for asize elements for the family afamily.

Definition at line 194 of file ItemVector.h.

Member Function Documentation

◆ addItem() [1/2]

template<typename VectorItemType>
void Arcane::ItemVectorT< VectorItemType >::addItem ( ItemLocalIdT< ItemType > local_id)
inline

Adds an entity to the end of the vector.

Definition at line 215 of file ItemVector.h.

◆ addItem() [2/2]

template<typename VectorItemType>
void Arcane::ItemVectorT< VectorItemType >::addItem ( ItemType item)
inline

Adds an entity to the end of the vector.

Definition at line 212 of file ItemVector.h.

◆ enumerator()

template<typename VectorItemType>
ItemEnumeratorT< ItemType > Arcane::ItemVectorT< VectorItemType >::enumerator ( ) const
inline

Enumerator.

Definition at line 224 of file ItemVector.h.

◆ operator ItemVectorViewT< VectorItemType >()

template<typename VectorItemType>
Arcane::ItemVectorT< VectorItemType >::operator ItemVectorViewT< VectorItemType > ( ) const
inline

Cast operator to ItemVectorView.

Definition at line 201 of file ItemVector.h.

◆ operator[]()

template<typename VectorItemType>
ItemType Arcane::ItemVectorT< VectorItemType >::operator[] ( Int32 index) const
inline

Entity at position index of the vector.

Definition at line 206 of file ItemVector.h.

◆ view()

template<typename VectorItemType>
ItemVectorViewT< ItemType > Arcane::ItemVectorT< VectorItemType >::view ( ) const
inline

View of the entire array.

Definition at line 218 of file ItemVector.h.

Referenced by Arcane::ItemVectorT< Cell >::operator ItemVectorViewT< Cell >().

Here is the caller graph for this function:

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