12#ifndef ARCANE_CORE_IDATA_H
13#define ARCANE_CORE_IDATA_H
39 virtual ~IData() =
default;
53 ARCCORE_DEPRECATED_2020(
"Use cloneRef() instead")
57 ARCCORE_DEPRECATED_2020(
"Use cloneEmptyRef() instead")
243template <
class DataType>
257 virtual const DataType&
value()
const = 0;
260 ARCCORE_DEPRECATED_2020(
"Use cloneTrueRef() instead")
264 ARCCORE_DEPRECATED_2020(
"Use cloneTrueEmpty() instead")
297template <
class DataType>
308 ARCCORE_DEPRECATED_2021(
"Use view() instead.")
312 ARCCORE_DEPRECATED_2021(
"Use view() instead.")
324 ARCCORE_DEPRECATED_2020(
"Use cloneTrueRef() instead")
328 ARCCORE_DEPRECATED_2020(
"Use cloneTrueEmptyRef() instead")
371template <
class DataType>
380 ARCCORE_DEPRECATED_2021(
"Use view() instead.")
384 ARCCORE_DEPRECATED_2021(
"Use view() instead.")
396 ARCCORE_DEPRECATED_2020(
"Use cloneTrueRef() instead")
400 ARCCORE_DEPRECATED_2020(
"Use cloneTrueEmptyRef() instead")
421template <class DataType>
Declarations of Arcane's general types.
#define ARCCORE_DECLARE_REFERENCE_COUNTED_INCLASS_METHODS()
Macro to declare the virtual methods managing reference counters.
Mutable view for a 2D array.
Class representing a classic 2D array.
Modifiable view of an array of type T.
Base class for 1D data vectors.
View for a constant 2D array.
Constant view of an array of type T.
Information on data allocation.
Type information for a data container.
Interface for a two-dimensional array data of type T.
Interface of a bi-dimensional array data item of type T.
virtual Ref< ThatClass > cloneTrueRef()=0
virtual Array2< T > & value()=0
virtual IArray2DataInternalT< T > * _internal()=0
virtual ThatClass * cloneTrue()=0
virtual ConstArray2View< T > view() const=0
virtual Ref< ThatClass > cloneTrueEmptyRef()=0
virtual ThatClass * cloneTrueEmpty()=0
Interface of the visitor pattern for a 2D array data item.
Interface of a 2D array data item.
Interface for an array data of type T.
Interface of a 1D array data item of type T.
virtual IArrayDataInternalT< T > * _internal()=0
virtual ThatClass * cloneTrueEmpty()=0
virtual ThatClass * cloneTrue()=0
virtual Ref< ThatClass > cloneTrueRef()=0
virtual Ref< ThatClass > cloneTrueEmptyRef()=0
virtual ConstArrayView< T > view() const=0
virtual Array< T > & value()=0
Interface of the visitor pattern for an array data item.
Interface of a 1D array data item.
virtual void visit(IDataVisitor *visitor)=0
Applies the visitor to the data.
virtual void visit(IArrayDataVisitor *visitor)=0
Applies the visitor to the data.
Interface of an operation on a data.
Interface of the visitor pattern for a data item.
Interface of a data item.
virtual Ref< ISerializedData > createSerializedDataRef(bool use_basic_type) const =0
Serialize the data.
virtual void allocateBufferForSerializedData(ISerializedData *sdata)=0
Allocate memory to read the serialized values sdata.
virtual void copy(const IData *data)=0
Copy the data data into the current instance.
virtual DataAllocationInfo allocationInfo() const =0
Allocation information.
virtual void serialize(ISerializer *sbuf, IDataOperation *operation)=0
Serializes the data by applying the operation.
virtual IData * clone()=0
Clone the data. The created instance must be destroyed by the 'delete' operator.
virtual void swapValues(IData *data)=0
Swap the values of data with those of the instance.
virtual IData * cloneEmpty()=0
Clone the data but without elements. The created instance must be destroyed by the 'delete' operator.
virtual void computeHash(IHashAlgorithm *algo, ByteArray &output) const =0
Compute a hash key on this data.
virtual void visitArray2(IArray2DataVisitor *visitor)=0
Apply the visitor to the data.
virtual void setName(const String &name)=0
Sets the name of the data (internal).
virtual IDataInternal * _commonInternal()=0
virtual void visit(IDataVisitor *visitor)=0
Applies the visitor to the data.
virtual Integer dimension() const =0
Dimension. 0 for a scalar, 1 for a mono-dim array, 2 for a bi-dim array.
virtual void visitArray(IArrayDataVisitor *visitor)=0
Apply the visitor to the data.
virtual Integer multiTag() const =0
Multi-tag. 0 if not multiple, 1 if multiple, 2 if multiple for MultiArray variables (obsolete).
virtual void fillDefault()=0
Fills the data with its default value.
virtual void setAllocationInfo(const DataAllocationInfo &v)=0
Sets the allocation information.
virtual void visitMultiArray2(IMultiArray2DataVisitor *visitor)
Apply the visitor to the data.
virtual Ref< IData > cloneRef()=0
Clone the data.
virtual void visitScalar(IScalarDataVisitor *visitor)=0
Apply the visitor to the data.
virtual eDataType dataType() const =0
Data type.
virtual Ref< IData > cloneEmptyRef()=0
Clone the data but without elements.
virtual void resize(Integer new_size)=0
Resize the data.
virtual void setShape(const ArrayShape &new_shape)=0
Sets the array shape.
virtual void assignSerializedData(const ISerializedData *sdata)=0
Assign the serialized values sdata to the data.
virtual DataStorageTypeInfo storageTypeInfo() const =0
Information about the data container type.
virtual ArrayShape shape() const =0
Array shape for a 1D or 2D data item.
Interface of a hashing algorithm.
Interface of a multi-sized 2D array data item of type T.
virtual ThatClass * cloneTrue()=0
Clone the data.
virtual ThatClass * cloneTrueEmpty()=0
Clone the data but without elements.
virtual const MultiArray2< DataType > & value() const =0
Data value.
virtual MultiArray2< DataType > & value()=0
Data value.
Interface of the visitor pattern for a variable-sized 2D array data item.
Interface of a multi 2D array data item.
Interface of a scalar data item of type T.
virtual ThatClass * cloneTrue()=0
virtual DataType & value()=0
Data value.
virtual Ref< ThatClass > cloneTrueRef()=0
virtual ThatClass * cloneTrueEmpty()=0
virtual const DataType & value() const =0
Data value.
virtual Ref< ThatClass > cloneTrueEmptyRef()=0
Interface of the visitor pattern for a scalar data item.
Interface of a scalar data item.
virtual void visit(IDataVisitor *visitor)=0
Applies the visitor to the data.
virtual void visit(IScalarDataVisitor *visitor)=0
Applies the visitor to the data.
Interface of a serialized data.
Base class for multi-sized 2D arrays.
Reference to an instance.
Unicode character string.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
Array< Byte > ByteArray
Dynamic one-dimensional array of characters.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.