14#include "arcane/core/VariableRefArray.h"
16#include "arcane/utils/ITraceMng.h"
17#include "arcane/utils/FatalErrorException.h"
19#include "arcane/core/VariableArray.h"
20#include "arcane/core/VariableRefArrayLock.h"
21#include "arcane/core/VariableBuildInfo.h"
22#include "arcane/core/VariableInfo.h"
23#include "arcane/core/VariableDataTypeTraits.h"
24#include "arcane/core/ISubDomain.h"
25#include "arcane/core/VariableFactoryRegisterer.h"
26#include "arcane/core/internal/IDataInternal.h"
37template <
typename DataType>
45template <
typename DataType>
56template <
typename DataType>
63 return VariableInfo(vbi.name(), vbi.itemFamilyName(), vbi.itemGroupName(), vbi.meshName(), vti, sti);
69template <
typename DataType>
74 return new ThatClass(vb);
80template <
typename DataType>
84, m_private_part(PrivatePartType::getReference(vbi, _internalVariableInfo(vbi)))
92template <
class DataType>
97, m_private_part(rhs.m_private_part)
105template <
class DataType>
109, m_private_part(PrivatePartType::getReference(var))
117template <
class DataType>
122 m_private_part = rhs.m_private_part;
132template <
typename DataType>
141template <
typename DataType>
145 m_private_part->resize(s);
151template <
typename DataType>
155 m_private_part->resizeWithReserve(s, nb_additional);
161template <
typename DataType>
165 ArrayBase::setArray(m_private_part->valueView());
172template <
typename DataType>
173typename VariableRefArrayT<DataType>::LockType
177 return LockType(m_private_part->trueData()->_internal()->_internalDeprecatedValue(), m_private_part);
199 ARCANE_FATAL(
"variable '{0}': getting internal data container is only valid on private variable",
name());
200 return m_private_part->trueData()->_internal();
#define ARCANE_FATAL(...)
Macro throwing a FatalErrorException.
constexpr ArrayView() noexcept
Constructs an empty view.
Type information for a data container.
Interface for an array data of type T.
@ PPrivate
Indicates that the variable is private.
Parameters necessary for building a variable.
Variable factory registrar.
Information characterizing a variable.
IArrayDataInternalT< T > * _internalTrueData()
void updateFromInternal() override
Updates from the internal part.
ContainerType & internalContainer()
Returns the container of this variable's values.
VariableRefArrayT(const VariableBuildInfo &vb)
Constructs a reference to a 1D array variable specified in vb.
virtual void resizeWithReserve(Integer new_size, Integer nb_additional)
Resizes the array to contain new_size elements.
~VariableRefArrayT() override
Frees resources.
virtual void resize(Integer new_size)
Resizes the array to contain new_size elements.
Array< DataType > ContainerType
Type of the class managing the variable value.
void refersTo(const VariableRefArrayT< DataType > &rhs)
Positions the instance's reference to the variable rhs.
virtual void updateFromInternal()
Updates from the internal part.
VariableRef(const VariableBuildInfo &vbi)
Constructs a reference to a variable with the infos vbi.
VariableRef & operator=(const VariableRef &from)
Copy assignment operator.
virtual int property() const
Variable properties.
void _internalInit(IVariable *)
Internal initialization of the variable.
String name() const
Variable name.
Information characterizing the type of a variable.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
@ IK_Unknown
Unknown or uninitialized mesh entity.