42 typedef ItemTypeT ItemType;
43 typedef DataTypeT DataType;
44 typedef DataTypeT & DataTypeReturnReference;
50 : m_true_variable(
nullptr)
52 , m_parent_family(NULL)
53 , m_direct_access(
false)
73 , m_direct_access(
false)
76 IItemFamily * variable_family = v.itemGroup().itemFamily();
81 if (variable_family == m_family)
82 m_direct_access =
true;
83 else if (m_parent_family == variable_family)
90 : m_true_variable(v.m_true_variable)
91 , m_family(v.m_family)
92 , m_parent_family(v.m_parent_family)
93 , m_direct_access(v.m_direct_access)
94 , m_family_depth(v.m_family_depth)
104 DataTypeReturnReference operator[](
const ItemType & i)
106 ARCANE_ASSERT((m_family!=m_parent_family || i.itemBase()==i.itemBase().parentBase(m_family_depth)),(
"Confusion: item parent differs from item"));
107 return m_true_variable.asArray()[(m_direct_access)?i.localId():i.itemBase().parentId(m_family_depth)];
110 DataType operator[](
const ItemType & i)
const
112 ARCANE_ASSERT((m_family!=m_parent_family || i.itemBase()==i.itemBase().parentBase(m_family_depth)),(
"Confusion: item parent differs from item"));
113 return m_true_variable.asArray()[(m_direct_access)?i.localId():i.itemBase().parentId(m_family_depth)];
119 ARCANE_ASSERT((m_family!=m_parent_family || (*i).itemBase()==i->parent(m_family_depth)),(
"Confusion: item parent differs from item"));
120 return m_true_variable.asArray()[(m_direct_access)?i.
localId():i->itemBase().parentId(m_family_depth)];
125 ARCANE_ASSERT((m_family!=m_parent_family || (*i).internal()==i->parent(m_family_depth)),(
"Confusion: item parent differs from item"));
126 return m_true_variable.asArray()[(m_direct_access)?i.
localId():i->internal()->parentId(m_family_depth)];
129 TrueVariable & trueVariable()
131 return m_true_variable;
134 const TrueVariable & trueVariable()
const
136 return m_true_variable;
140 ARCANE_DEPRECATED_240
void operator=(
const ThisVariable & v)
142 m_true_variable.refersTo(v.m_true_variable);
143 m_family = v.m_family;
144 m_parent_family = v.m_parent_family;
145 m_direct_access = v.m_direct_access;
146 m_family_depth = v.m_family_depth;
150 TrueVariable m_true_variable;
153 bool m_direct_access;
154 Integer m_family_depth;
163 typedef DataTypeT DataType;
164 typedef DataTypeT & DataTypeReturnReference;
183 , m_direct_access(
false)
186 IItemFamily * variable_family = v.itemGroup().itemFamily();
191 if (variable_family == m_family)
192 m_direct_access =
true;
193 else if (m_parent_family == variable_family)
200 : m_true_variable(v.m_true_variable)
201 , m_family(v.m_family)
202 , m_parent_family(v.m_parent_family)
203 , m_direct_access(v.m_direct_access)
204 , m_family_depth(v.m_family_depth)
214 DataTypeReturnReference operator[](
const Item & i)
216 ARCANE_ASSERT((m_family!=m_parent_family || i.
itemBase()==i.
itemBase().parentBase(m_family_depth)),(
"Confusion: item parent differs from item"));
217 return m_true_variable.asArray()[(m_direct_access)?i.
localId():i.
itemBase().parentId(m_family_depth)];
220 DataType operator[](
const Item & i)
const
222 ARCANE_ASSERT((m_family!=m_parent_family || i.
itemBase()==i.
itemBase().parentBase(m_family_depth)),(
"Confusion: item parent differs from item"));
223 return m_true_variable.asArray()[(m_direct_access)?i.
localId():i.
itemBase().parentId(m_family_depth)];
229 ARCANE_ASSERT((m_family!=m_parent_family || (*i).itemBase()==i->parent(m_family_depth)),(
"Confusion: item parent differs from item"));
230 return m_true_variable.asArray()[(m_direct_access)?i.
localId():i->itemBase().parentId(m_family_depth)];
235 ARCANE_ASSERT((m_family!=m_parent_family || (*i).itemBase()==i->parent(m_family_depth)),(
"Confusion: item parent differs from item"));
236 return m_true_variable.asArray()[(m_direct_access)?i.
localId():i->itemBase().parentId(m_family_depth)];
239 TrueVariable & trueVariable()
241 return m_true_variable;
244 const TrueVariable & trueVariable()
const
246 return m_true_variable;
250 ARCANE_DEPRECATED_240
void operator=(
const ThisVariable & v)
252 m_true_variable.refersTo(v.m_true_variable);
253 m_family = v.m_family;
254 m_parent_family = v.m_parent_family;
255 m_direct_access = v.m_direct_access;
256 m_family_depth = v.m_family_depth;
259 TrueVariable m_true_variable;
262 bool m_direct_access;
263 Integer m_family_depth;