Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::ItemIndexArrayView Class Reference

View over an index array (localIds()) of entities. More...

#include <arcane/core/ItemIndexArrayView.h>

Collaboration diagram for Arcane::ItemIndexArrayView:

Public Types

enum  { F_Contiguous = 1 << 1 , F_Contigous = F_Contiguous }

Public Member Functions

 ItemIndexArrayView ()=default
 Constructs an empty view.
 ItemIndexArrayView (const Int32ConstArrayView local_ids)
 Constructs a view from the local IDs local_ids.
 ItemIndexArrayView (const impl::ItemLocalIdListContainerView &view)
Int32 operator[] (Integer index) const
 Accesses the i-th element of the vector.
Int32 size () const
 Number of elements in the vector.
void fillLocalIds (Array< Int32 > &ids) const
 Adds the list of the vector's localIds() to ids.
ItemIndexArrayView subView (Integer abegin, Integer asize) const
 Sub-view starting from element abegin and containing asize elements.
Int32 flags () const
bool isContigous () const
bool isContiguous () const
 True if the localIds() are contiguous.
Int32ConstArrayView localIds () const
 Array of local IDs of entities.
 operator Int32ConstArrayView () const

Protected Attributes

impl::ItemLocalIdListContainerView m_view
Int32 m_flags = 0

Private Member Functions

const Int32unguardedBasePointer () const
const Int32data () const
 ItemIndexArrayView (SmallSpan< const Int32 > local_ids, Int32 local_id_offset, Int32 aflags)
const Int32_data () const
Int32ConstArrayView _localIds () const
Int32 _localIdOffset () const

Private Attributes

friend ItemVectorView
friend ItemGroup

Friends

template<int Extent>
class ItemConnectedListView
template<typename ItemType, int Extent>
class ItemConnectedListViewT
template<typename ItemType>
class ItemVectorViewT
std::ostream & operator<< (std::ostream &o, const ItemIndexArrayView &a)

Detailed Description

View over an index array (localIds()) of entities.

Warning
The view is only valid as long as the associated array is not modified. Instances of this class are generally temporary and should not be retained.

In addition to the list of entities, this class allows for additional information, such as whether the list is contiguous.

Definition at line 40 of file ItemIndexArrayView.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
F_Contiguous 

The local IDs are contiguous.

Definition at line 54 of file ItemIndexArrayView.h.

Constructor & Destructor Documentation

◆ ItemIndexArrayView() [1/3]

Arcane::ItemIndexArrayView::ItemIndexArrayView ( const Int32ConstArrayView local_ids)
inlineexplicit

Constructs a view from the local IDs local_ids.

Definition at line 67 of file ItemIndexArrayView.h.

◆ ItemIndexArrayView() [2/3]

Arcane::ItemIndexArrayView::ItemIndexArrayView ( const impl::ItemLocalIdListContainerView & view)
inlineexplicit

Definition at line 71 of file ItemIndexArrayView.h.

◆ ItemIndexArrayView() [3/3]

Arcane::ItemIndexArrayView::ItemIndexArrayView ( SmallSpan< const Int32 > local_ids,
Int32 local_id_offset,
Int32 aflags )
inlineprivate

Definition at line 156 of file ItemIndexArrayView.h.

Member Function Documentation

◆ _data()

const Int32 * Arcane::ItemIndexArrayView::_data ( ) const
inlineprivate

Definition at line 161 of file ItemIndexArrayView.h.

◆ _localIdOffset()

Int32 Arcane::ItemIndexArrayView::_localIdOffset ( ) const
inlineprivate

Definition at line 170 of file ItemIndexArrayView.h.

◆ _localIds()

Int32ConstArrayView Arcane::ItemIndexArrayView::_localIds ( ) const
inlineprivate

Definition at line 166 of file ItemIndexArrayView.h.

◆ data()

const Int32 * Arcane::ItemIndexArrayView::data ( ) const
inlineprivate

Definition at line 144 of file ItemIndexArrayView.h.

◆ fillLocalIds()

void Arcane::ItemIndexArrayView::fillLocalIds ( Array< Int32 > & ids) const

Adds the list of the vector's localIds() to ids.

Definition at line 70 of file ItemVectorView.cc.

◆ flags()

Int32 Arcane::ItemIndexArrayView::flags ( ) const
inline

Definition at line 101 of file ItemIndexArrayView.h.

◆ isContigous()

bool Arcane::ItemIndexArrayView::isContigous ( ) const
inline

Definition at line 106 of file ItemIndexArrayView.h.

◆ isContiguous()

bool Arcane::ItemIndexArrayView::isContiguous ( ) const
inline

True if the localIds() are contiguous.

Definition at line 109 of file ItemIndexArrayView.h.

◆ localIds()

Int32ConstArrayView Arcane::ItemIndexArrayView::localIds ( ) const
inline

Array of local IDs of entities.

Definition at line 124 of file ItemIndexArrayView.h.

◆ operator Int32ConstArrayView()

Arcane::ItemIndexArrayView::operator Int32ConstArrayView ( ) const
inline

Definition at line 130 of file ItemIndexArrayView.h.

◆ operator[]()

Int32 Arcane::ItemIndexArrayView::operator[] ( Integer index) const
inline

Accesses the i-th element of the vector.

Definition at line 79 of file ItemIndexArrayView.h.

◆ size()

Int32 Arcane::ItemIndexArrayView::size ( ) const
inline

Number of elements in the vector.

Definition at line 85 of file ItemIndexArrayView.h.

◆ subView()

ItemIndexArrayView Arcane::ItemIndexArrayView::subView ( Integer abegin,
Integer asize ) const
inline

Sub-view starting from element abegin and containing asize elements.

Definition at line 94 of file ItemIndexArrayView.h.

References ItemIndexArrayView().

Here is the call graph for this function:

◆ unguardedBasePointer()

const Int32 * Arcane::ItemIndexArrayView::unguardedBasePointer ( ) const
inlineprivate

Definition at line 138 of file ItemIndexArrayView.h.

◆ ItemConnectedListView

template<int Extent>
friend class ItemConnectedListView
friend

Definition at line 46 of file ItemIndexArrayView.h.

◆ ItemConnectedListViewT

template<typename ItemType, int Extent>
friend class ItemConnectedListViewT
friend

Definition at line 47 of file ItemIndexArrayView.h.

◆ ItemVectorViewT

template<typename ItemType>
friend class ItemVectorViewT
friend

Definition at line 48 of file ItemIndexArrayView.h.

◆ operator<<

std::ostream & operator<< ( std::ostream & o,
const ItemIndexArrayView & a )
friend

Definition at line 114 of file ItemIndexArrayView.h.

Member Data Documentation

◆ ItemGroup

friend Arcane::ItemIndexArrayView::ItemGroup
private

Definition at line 45 of file ItemIndexArrayView.h.

◆ ItemVectorView

friend Arcane::ItemIndexArrayView::ItemVectorView
private

Definition at line 44 of file ItemIndexArrayView.h.

◆ m_flags

Int32 Arcane::ItemIndexArrayView::m_flags = 0
protected

Definition at line 152 of file ItemIndexArrayView.h.

◆ m_view

impl::ItemLocalIdListContainerView Arcane::ItemIndexArrayView::m_view
protected

Definition at line 151 of file ItemIndexArrayView.h.


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