12#ifndef ARCANE_CORE_ISERIALIZEDDATA_H
13#define ARCANE_CORE_ISERIALIZEDDATA_H
169 ARCCORE_DEPRECATED_2021(
"Use method 'writableBytes()' or 'constBytes()' instead")
179 ARCCORE_DEPRECATED_2021(
"Use method 'setWritableBytes()' instead")
189 ARCCORE_DEPRECATED_2021(
"Use method 'setConstBytes()' instead")
198 ARCCORE_DEPRECATED_2021(
"Use method 'setWritableBytes()' instead")
207 ARCCORE_DEPRECATED_2021(
"Use method 'setConstBytes()' instead")
216 ARCCORE_DEPRECATED_2021(
"Use method 'writableBytes()' or 'constBytes()' instead")
232extern
"C++" ARCANE_CORE_EXPORT
250extern
"C++" ARCANE_CORE_EXPORT
266extern
"C++" ARCANE_CORE_EXPORT
Declarations of Arcane's general types.
#define ARCCORE_DECLARE_REFERENCE_COUNTED_INCLASS_METHODS()
Macro to declare the virtual methods managing reference counters.
Interface of a hashing algorithm.
Interface of a serialized data.
virtual eDataType baseDataType() const =0
Data type.
virtual ArrayShape shape() const =0
Shape of the array associated with the data.
virtual Integer nbDimension() const =0
Dimension. 0 for a scalar, 1 for a 1D array, ...
virtual Int64 memorySize() const =0
Indicates the number of bytes that must be allocated to store or read the data.
virtual void allocateMemory(Int64 size)=0
Allocates an array to hold the serialized elements.
virtual void setWritableBytes(Span< Byte > bytes)=0
Positions the serialized values.
virtual void setConstBytes(Span< const Byte > bytes)=0
Positions the serialized values for reading.
virtual void serialize(ISerializer *buffer) const =0
Serialize the data for reading.
virtual void serialize(ISerializer *buffer)=0
Serialize the data for reading or writing.
ARCANE_DEPRECATED_2018_R("Use method 'writableBytes()' or 'constBytes()' instead") virtual ByteConstArrayView buffer() const =0
Serialized values.
virtual void computeHash(IHashAlgorithm *algo, ByteArray &output) const =0
Compute a hash key on this data.
virtual Span< Byte > writableBytes()=0
View of the serialized values.
virtual ~ISerializedData()=default
Frees resources.
virtual Span< const Byte > bytes() const =0
Serialized values.
virtual Int64 nbBaseElement() const =0
Number of base elements.
virtual Int64ConstArrayView extents() const =0
Array containing the number of elements for each dimension.
virtual Int64 nbElement() const =0
Number of elements.
virtual void setBytes(Span< Byte > bytes)=0
Positions the serialized values.
virtual void setBuffer(ByteArrayView buffer)=0
Positions the serialized values.
virtual Span< const Byte > constBytes() const =0
Serialized values.
virtual bool isMultiSize() const =0
Indicates if it is a multi-size array. (only relevant if nbDimension()>1).
Reference to an instance.
View of an array of elements of type T.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Ref< ISerializedData > arcaneCreateSerializedDataRef(eDataType data_type, Int64 memory_size, Integer nb_dim, Int64 nb_element, Int64 nb_base_element, bool is_multi_size, Int64ConstArrayView dimensions)
Creates serialized data.
ArrayView< Byte > ByteArrayView
C equivalent of a 1D array of characters.
std::int64_t Int64
Signed integer type of 64 bits.
Int32 Integer
Type representing an integer.
Array< Byte > ByteArray
Dynamic one-dimensional array of characters.
ConstArrayView< Int64 > Int64ConstArrayView
C equivalent of a 1D array of 64-bit integers.
Ref< ISerializedData > arcaneCreateEmptySerializedDataRef()
Creates serialized data.
ConstArrayView< Byte > ByteConstArrayView
C equivalent of a 1D array of characters.
unsigned char Byte
Type of a byte.