12#ifndef ARCANE_CORE_ITEMINTERNALENUMERATOR_H
13#define ARCANE_CORE_ITEMINTERNALENUMERATOR_H
17#include "arcane/core/ItemInternalVectorView.h"
40class ItemInternalEnumerator
45 friend class ItemEnumerator;
49 ARCANE_DEPRECATED_REASON(
"Y2022: This class is deprecated. Use ItemEnumerator instead")
50 ItemInternalEnumerator(
const ItemInternalPtr* items,
const Int32* local_ids,
Integer n)
52 , m_local_ids(local_ids)
58 ARCANE_DEPRECATED_REASON(
"Y2022: This class is deprecated. Use ItemEnumerator instead")
60 : m_items(view._items().
data())
63 , m_count(view.
size())
66 ARCANE_DEPRECATED_REASON(
"Y2022: This class is deprecated. Use ItemEnumerator instead")
67 ItemInternalEnumerator(
const ItemInternalArrayView& items,
const Int32ConstArrayView& local_ids)
68 : m_items(items.data())
69 , m_local_ids(local_ids.data())
71 , m_count(local_ids.size())
76 ItemInternal* operator*()
const {
return m_items[m_local_ids[m_index]]; }
77 ItemInternal* operator->()
const {
return m_items[m_local_ids[m_index]]; }
78 inline void operator++() { ++m_index; }
79 inline bool operator()() {
return m_index < m_count; }
80 inline bool hasNext() {
return m_index < m_count; }
93 const ItemInternalPtr* m_items;
94 const Int32* ARCANE_RESTRICT m_local_ids;
constexpr const_pointer data() const noexcept
Pointer to the allocated memory.
Integer index() const
Current index of the enumerator.
Integer localId() const
localId() of the current entity.
Integer count() const
Number of elements in the enumerator.
Internal view on an array of entities.
Int32ConstArrayView localIds() const
Array of local entity IDs.
Integer size() const
Number of elements in the vector.
Internal structure of a mesh entity.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
std::int32_t Int32
Signed integer type of 32 bits.