Arcane  v3.16.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
core/materials/ComponentItemVector.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2025 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* ComponentItemVector.h (C) 2000-2025 */
9/* */
10/* Vecteur sur des entités constituants. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_MATERIALS_COMPONENTITEMVECTOR_H
13#define ARCANE_CORE_MATERIALS_COMPONENTITEMVECTOR_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/TraceAccessor.h"
18#include "arcane/utils/Ref.h"
20
21#include "arcane/core/ItemGroup.h"
22
23#include "arcane/core/materials/IMeshComponent.h"
24#include "arcane/core/materials/ComponentItemVectorView.h"
25#include "arcane/core/materials/ComponentPartItemVectorView.h"
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30namespace Arcane::Materials
31{
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
40{
41 friend class ComponentItemVector;
43
44 public:
45
46 virtual ~IConstituentItemVectorImpl() = default;
47
48 protected:
49
50 virtual ComponentItemVectorView _view() const = 0;
51 virtual ComponentPurePartItemVectorView _pureItems() const = 0;
52 virtual ComponentImpurePartItemVectorView _impureItems() const = 0;
53 virtual ConstArrayView<Int32> _localIds() const = 0;
54 virtual IMeshMaterialMng* _materialMng() const = 0;
55 virtual IMeshComponent* _component() const = 0;
56 virtual ConstArrayView<MatVarIndex> _matvarIndexes() const = 0;
57 virtual ConstituentItemLocalIdListView _constituentItemListView() const = 0;
58 virtual void _setItems(SmallSpan<const Int32> local_ids) = 0;
59};
60
61/*---------------------------------------------------------------------------*/
62/*---------------------------------------------------------------------------*/
87class ARCANE_CORE_EXPORT ComponentItemVector
88{
89 public:
90
93
96
97 protected:
98
103
104 public:
105
107 operator ComponentItemVectorView() const
108 {
109 return view();
110 }
111
113 ComponentItemVectorView view() const;
114
116 IMeshComponent* component() const { return _component(); }
117
120
121 public:
122
124 ComponentPurePartItemVectorView pureItems() const;
126 ComponentImpurePartItemVectorView impureItems() const;
127
128 protected:
129
130 ConstArrayView<MatVarIndex> _matvarIndexes() const;
131 ConstituentItemLocalIdListView _constituentItemListView() const;
132
133 protected:
134
135 void _setItems(SmallSpan<const Int32> local_ids);
136 ConstArrayView<Int32> _localIds() const;
137 IMeshMaterialMng* _materialMng() const;
138 IMeshComponent* _component() const;
139
140 private:
141
143};
144
145/*---------------------------------------------------------------------------*/
146/*---------------------------------------------------------------------------*/
147
148} // End namespace Arcane::Materials
149
150/*---------------------------------------------------------------------------*/
151/*---------------------------------------------------------------------------*/
152
153#endif
154
#define ARCCORE_DECLARE_REFERENCE_COUNTED_INCLASS_METHODS()
Macro pour déclarer les méthodes virtuelles gérant les compteurs de référence.
Vue constante d'un tableau de type T.
Vue sur un vecteur sur les entités d'un composant.
ComponentItemVectorView view() const
Vue sur ce vecteur.
IMeshComponent * component() const
Constituant associé
ComponentItemVector(const ComponentItemVector &rhs)=default
Constructeur de recopie. Cette instance fait ensuite référence à rhs.
ComponentItemVector clone() const
Clone ce vecteur.
ComponentItemVector & operator=(const ComponentItemVector &)=default
Opérateur de recopie.
Vue sur une instance de ConstituentItemLocalIdList.
Liste d'indices locaux pour les 'ComponentItemInternal'.
Interface pour l'implémentation de ComponentItemVector.
Interface d'un composant (matériau ou milieu) d'un maillage.
Interface du gestionnaire des matériaux et des milieux d'un maillage.
Référence à une instance.
Vue d'un tableau d'éléments de type T.
Definition Span.h:673
Active toujours les traces dans les parties Arcane concernant les matériaux.