24
24
namespace Arcane ::Materials
25
25
{
26
26
27
-
28
27
/* ---------------------------------------------------------------------------*/
29
28
/* ---------------------------------------------------------------------------*/
30
29
/* !
@@ -47,12 +46,22 @@ class ARCANE_CORE_EXPORT ComponentItemInternalLocalId
47
46
48
47
/* ---------------------------------------------------------------------------*/
49
48
/* ---------------------------------------------------------------------------*/
50
-
49
+ /* !
50
+ * \internal
51
+ * \brief Informations partagées sur les 'ComponentItemInternal'.
52
+ *
53
+ * Il y a 3 instances de cette classe : une pour les AllEnvCell, une pour les
54
+ * EnvCell et une pour les MatCell. Ces instances sont gérées par la classe
55
+ * ComponentItemInternalData. Il est possible de conserver un pointeur sur
56
+ * les intances de cette classe car ils sont valides durant toute la vie
57
+ * d'un MeshMaterialMng.
58
+ */
51
59
class ARCANE_CORE_EXPORT ComponentItemSharedInfo
52
60
{
53
61
friend class ComponentItemInternal ;
54
62
friend class ComponentItemInternalData ;
55
63
friend class CellComponentCellEnumerator ;
64
+ friend class ConstituentItemLocalIdList ;
56
65
57
66
private:
58
67
@@ -61,6 +70,10 @@ class ARCANE_CORE_EXPORT ComponentItemSharedInfo
61
70
static ComponentItemSharedInfo* null_shared_info_pointer;
62
71
static ComponentItemSharedInfo* _nullInstance () { return null_shared_info_pointer; }
63
72
73
+ private:
74
+
75
+ inline ComponentItemInternal* _itemInternal (ComponentItemInternalLocalId id);
76
+
64
77
private:
65
78
66
79
// NOTE : Cette classe est partagée avec le wrapper C#
@@ -76,45 +89,74 @@ class ARCANE_CORE_EXPORT ComponentItemSharedInfo
76
89
/* ---------------------------------------------------------------------------*/
77
90
/* ---------------------------------------------------------------------------*/
78
91
79
- namespace matimpl
92
+ }
93
+
94
+ namespace Arcane ::Materials::matimpl
95
+ {
96
+
97
+ /* ---------------------------------------------------------------------------*/
98
+ /* ---------------------------------------------------------------------------*/
99
+ /* !
100
+ * \internal
101
+ */
102
+ class ARCANE_CORE_EXPORT ComponentItemInternalLocalIdListView
103
+ {
104
+ private:
105
+
106
+ ComponentItemSharedInfo* m_component_shared_info = nullptr ;
107
+ ArrayView<ComponentItemInternalLocalId> m_ids;
108
+ };
109
+
110
+ /* ---------------------------------------------------------------------------*/
111
+ /* ---------------------------------------------------------------------------*/
112
+
113
+ class ARCANE_CORE_EXPORT ConstituentItemBase
80
114
{
81
- class ARCANE_CORE_EXPORT ConstituentItemBase
115
+ friend Arcane::Materials::ComponentCell;
116
+ friend Arcane::Materials::AllEnvCell;
117
+ friend Arcane::Materials::EnvCell;
118
+ friend Arcane::Materials::MatCell;
119
+
120
+ public:
121
+
122
+ ARCCORE_HOST_DEVICE constexpr ConstituentItemBase (ComponentItemInternal* component_item)
123
+ : m_component_item(component_item)
82
124
{
83
- friend Arcane::Materials::ComponentCell;
84
- friend Arcane::Materials::AllEnvCell;
85
- friend Arcane::Materials::EnvCell;
86
- friend Arcane::Materials::MatCell;
125
+ }
87
126
88
- public:
127
+ public:
89
128
90
- ARCCORE_HOST_DEVICE constexpr ConstituentItemBase (ComponentItemInternal* component_item)
91
- : m_component_item(component_item)
92
- {
93
- }
129
+ ARCCORE_HOST_DEVICE constexpr friend bool
130
+ operator ==(const ConstituentItemBase& a, const ConstituentItemBase& b)
131
+ {
132
+ return a.m_component_item == b.m_component_item ;
133
+ }
134
+ ARCCORE_HOST_DEVICE constexpr friend bool
135
+ operator !=(const ConstituentItemBase& a, const ConstituentItemBase& b)
136
+ {
137
+ return a.m_component_item != b.m_component_item ;
138
+ }
94
139
95
- public :
140
+ private :
96
141
97
- ARCCORE_HOST_DEVICE constexpr friend bool
98
- operator ==(const ConstituentItemBase& a, const ConstituentItemBase& b)
99
- {
100
- return a.m_component_item == b.m_component_item ;
101
- }
102
- ARCCORE_HOST_DEVICE constexpr friend bool
103
- operator !=(const ConstituentItemBase& a, const ConstituentItemBase& b)
104
- {
105
- return a.m_component_item != b.m_component_item ;
106
- }
142
+ ARCCORE_HOST_DEVICE constexpr ComponentItemInternal* _internal () const { return m_component_item; }
107
143
108
- private:
144
+ private:
109
145
110
- ARCCORE_HOST_DEVICE constexpr ComponentItemInternal* _internal () const { return m_component_item; }
146
+ ComponentItemInternal* m_component_item = nullptr ;
147
+ };
111
148
112
- private:
149
+ /* ---------------------------------------------------------------------------*/
150
+ /* ---------------------------------------------------------------------------*/
113
151
114
- ComponentItemInternal* m_component_item = nullptr ;
115
- };
116
152
} // namespace matimpl
117
153
154
+ /* ---------------------------------------------------------------------------*/
155
+ /* ---------------------------------------------------------------------------*/
156
+
157
+ namespace Arcane ::Materials
158
+ {
159
+
118
160
/* ---------------------------------------------------------------------------*/
119
161
/* ---------------------------------------------------------------------------*/
120
162
/* !
@@ -310,6 +352,15 @@ class ARCANE_CORE_EXPORT ComponentItemInternal
310
352
/* ---------------------------------------------------------------------------*/
311
353
/* ---------------------------------------------------------------------------*/
312
354
355
+ inline ComponentItemInternal* ComponentItemSharedInfo::
356
+ _itemInternal (ComponentItemInternalLocalId id)
357
+ {
358
+ return m_component_item_internal_view.ptrAt (id.localId ());
359
+ }
360
+
361
+ /* ---------------------------------------------------------------------------*/
362
+ /* ---------------------------------------------------------------------------*/
363
+
313
364
} // End namespace Arcane::Materials
314
365
315
366
/* ---------------------------------------------------------------------------*/
0 commit comments