57 : m_shared_info(shared_info)
58 , m_local_id_ptr(local_id_ptr)
59 , m_local_id_offset(local_id_offset)
62 : m_shared_info(shared_info)
63 , m_local_id_ptr(local_id_ptr)
70 : m_shared_info(v.m_shared_info)
71 , m_local_id_ptr(v.m_local_id_ptr)
72 , m_local_id_offset(v.m_local_id_offset)
78 typedef std::random_access_iterator_tag iterator_category;
95 Item operator*()
const {
return Item(m_local_id_offset + (*m_local_id_ptr), m_shared_info); }
97 ThatClass& operator++()
102 ThatClass& operator--()
111 return this->m_local_id_ptr - b.m_local_id_ptr;
115 const Int32* ptr = a.m_local_id_ptr - v;
116 return ThatClass(a.m_shared_info, ptr, a.m_local_id_offset);
120 const Int32* ptr = a.m_local_id_ptr + v;
121 return ThatClass(a.m_shared_info, ptr, a.m_local_id_offset);
123 friend bool operator<(
const ThatClass& lhs,
const ThatClass& rhs)
125 return lhs.m_local_id_ptr <= rhs.m_local_id_ptr;
130 return lhs.m_local_id_ptr == rhs.m_local_id_ptr;
132 friend bool operator!=(
const ThatClass& lhs,
const ThatClass& rhs)
134 return !(lhs == rhs);
137 ARCANE_DEPRECATED_REASON(
"Y2022: This method returns a temporary. Use 'operator*' instead")
138 Item operator->()
const {
return _itemInternal(); }
142 ItemSharedInfo* m_shared_info;
143 const Int32* m_local_id_ptr;
144 Int32 m_local_id_offset = 0;
148 inline ItemInternal* _itemInternal()
const
150 return m_shared_info->m_items_internal[m_local_id_offset + (*m_local_id_ptr)];
167 Int32 local_id_offset)
181 typedef ItemType value_type;
192 ItemType operator*()
const {
return ItemType(m_local_id_offset + (*m_local_id_ptr), m_shared_info); }
194 ThatClass& operator++() { ++m_local_id_ptr;
return (*
this); }
195 ThatClass& operator--() { --m_local_id_ptr;
return (*
this); }
198 return this->m_local_id_ptr - b.m_local_id_ptr;
202 const Int32* ptr = a.m_local_id_ptr - v;
203 return ThatClass(a.m_shared_info, ptr, a.m_local_id_offset);
207 const Int32* ptr = a.m_local_id_ptr + v;
208 return ThatClass(a.m_shared_info, ptr, a.m_local_id_offset);
213 ARCANE_DEPRECATED_REASON(
"Y2022: This method returns a temporary. Use 'operator*' instead")
214 ItemType operator->()
const {
return this->_itemInternal(); }
233 friend mesh::IndexedItemConnectivityAccessor;
238 using difference_type = std::ptrdiff_t;
247 ARCANE_DEPRECATED_REASON(
"Y2022: Use constructor with ItemInfoListView instead")
249 : m_index_view(local_ids)
254 ARCANE_DEPRECATED_REASON(
"Y2022: Use constructor with ItemInfoListView instead")
256 : m_index_view(indexes)
266 : m_index_view(view.
localIds(),view.m_local_id_offset,0)
267 , m_shared_info(view.m_shared_info)
271 : m_index_view(local_ids,0,0)
272 , m_shared_info(item_info_list_view.m_item_shared_info)
275 : m_index_view(indexes)
276 , m_shared_info(item_info_list_view.m_item_shared_info)
281 : m_index_view(view.constLocalIds(),view.m_local_id_offset,0)
282 , m_shared_info(view.m_shared_info)
287 : m_index_view(v.m_index_view)
288 , m_shared_info(v.m_shared_info)
294 : m_index_view(local_ids)
295 , m_shared_info(shared_info)
299 : m_index_view(local_ids,local_id_offset,0)
300 , m_shared_info(shared_info)
306 : m_index_view(local_ids)
314 : m_index_view(indexes)
331 Int32
size()
const {
return m_index_view.size(); }
334 ARCANE_DEPRECATED_REASON(
"Y2022: Do not use this method")
353 return ItemVectorView(m_shared_info, m_index_view.subView(abegin, asize)._localIds(), _localIdOffset());
355 const_iterator begin()
const
357 return const_iterator(m_shared_info, m_index_view._data(), _localIdOffset());
359 SentinelType end()
const
361 return endIterator();
363 const_iterator endIterator()
const
365 return const_iterator(m_shared_info, (m_index_view._data() + this->size()), _localIdOffset());
381 const Int32* _localIdsData()
const {
return m_index_view._data(); }
382 Int32 _localIdOffset()
const {
return m_index_view._localIdOffset(); }
386 void _init(ItemInternalArrayView items)
388 m_shared_info = (size() > 0 && !items.empty()) ? ItemInternalCompatibility::_getSharedInfo(items[0]) : ItemSharedInfo::nullInstance();
390 void _init2(IItemFamily* family);
395 void _internalSwigSet(ItemVectorViewPOD* vpod);
413 using difference_type = std::ptrdiff_t;
414 using value_type = ItemType;
416 using reference_type = ItemType&;
418 using const_reference_type =
const ItemType&;
420 using SentinelType = const_iterator;
424 ARCANE_DEPRECATED_REASON(
"Y2022: Use constructor with ItemInfoListView instead")
428 ARCANE_DEPRECATED_REASON(
"Y2022: Use constructor with ItemInfoListView instead")
462 ItemType operator[](Integer index)
const
464 return ItemType(m_index_view[index],m_shared_info);
473 inline const_iterator begin()
const
475 return const_iterator(m_shared_info, _localIdsData(), _localIdOffset());
477 inline SentinelType end()
const
479 return const_iterator(m_shared_info, _localIdsData() + this->
size(), _localIdOffset());
481 inline const_iterator endIterator()
const
483 return const_iterator(m_shared_info, _localIdsData() + this->
size(), _localIdOffset());