12#ifndef ARCANE_CARTESIANMESH_CARTESIANMESPATCHLISTVIEW_H
13#define ARCANE_CARTESIANMESH_CARTESIANMESPATCHLISTVIEW_H
17#include "arcane/utils/ArrayView.h"
21#include "arcane/cartesianmesh/CartesianPatch.h"
42class ARCANE_CARTESIANMESH_EXPORT CartesianMeshPatchListView
44 friend CartesianMeshImpl;
45 friend CartesianPatchGroup;
56 friend CartesianMeshPatchListView;
60 typedef std::forward_iterator_tag iterator_category;
62 typedef Int32 size_type;
71 Iterator& operator++()
76 friend bool operator==(
const Iterator& a,
const Iterator& b)
78 return (a.m_patches.data() + a.m_index) == (b.m_patches.data() + b.m_index);
80 friend bool operator!=(
const Iterator& a,
const Iterator& b)
82 return !(operator==(a, b));
84 friend bool operator==(
const Iterator& a,
const Sentinel&)
86 return a.m_patches.size() != a.m_index;
88 friend bool operator!=(
const Iterator& a,
const Sentinel& b)
90 return !(operator==(a, b));
108 CartesianMeshPatchListView() =
default;
120 Sentinel end()
const {
return {}; }
121 Iterator endIterator()
const {
return Iterator(m_patches, m_patches.size()); }
122 Int32 size()
const {
return m_patches.size(); }
126 ConstArrayView<ICartesianMeshPatch*> m_patches;
Declarations of Arcane's general types.
Sentinel for iteration over a list of patches.
AMR Patch of a Cartesian mesh.
Constant view of an array of type T.
Interface of an AMR patch of a Cartesian mesh.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int32_t Int32
Signed integer type of 32 bits.