Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IDataFactoryMng.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* IDataFactoryMng.h (C) 2000-2025 */
9/* */
10/* Interface of the data factory manager. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IDATAFACTORYMNG_H
13#define ARCANE_CORE_IDATAFACTORYMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25class IDataFactory;
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30/*!
31 * \internal
32 * \brief Interface of the data factory manager.
33 *
34 * \note This interface replaces 'IDataFactory'
35 *
36 * This interface allows registering factories to create 'IData'
37 * (via registerDataStorageFactory()) and to construct the correct IData instance
38 * by calling createSimpleDataRef().
39 */
41{
42 public:
43
44 virtual ~IDataFactoryMng() = default;
45
46 public:
47
48 //! Builds the instance
49 virtual void build() = 0;
50
51 //! Associated trace manager
52 virtual ITraceMng* traceMng() const = 0;
53
54 //! Registers the factory \a factory.
56
57 /*
58 * \brief Creates a data object.
59 *
60 * The factory used to create the data is derived from a DataStorageTypeInfo instance using
61 * the DataStorageTypeInfo::fullName() method.
62 */
63 virtual Ref<IData>
64 createSimpleDataRef(const String& storage_type, const DataStorageBuildInfo& build_info) = 0;
65
66 /*!
67 * \brief Creates an operation performing a reduction of type \a rt.
68 */
70
71 /*!
72 * \brief Creates serialized data.
73 *
74 * The arrays \a dimensions and \a values are not duplicated and must not
75 * be modified while the serialized object is in use.
76 *
77 * The \a data_type must be one of the types: \a DT_Byte, \a DT_Int16, \a DT_Int32,
78 * \a DT_Int64, or DT_Real.
79 *
80 * \deprecated Use arcaneCreateSerializedDataRef() instead
81 */
82 ARCCORE_DEPRECATED_2021("Use global method arcaneCreateSerializedDataRef() instead")
83 virtual Ref<ISerializedData>
84 createSerializedDataRef(eDataType data_type, Int64 memory_size,
85 Integer nb_dim, Int64 nb_element,
86 Int64 nb_base_element, bool is_multi_size,
87 Int64ConstArrayView dimensions) = 0;
88
89 /*!
90 * \brief Creates serialized data.
91 *
92 * The serialized data is empty. It can only be used after calling an
93 * ISerializedData::serialize() in ISerializer::ModePut mode.
94 *
95 * \deprecated Use arcaneCreateEmptySerializedDataRef() instead.
96 */
97 ARCCORE_DEPRECATED_2021("Use global method arcaneCreateEmptySerializedDataRef() instead")
99
100 //! Retrieves the old factory (obsolete)
101 ARCCORE_DEPRECATED_2021("Do not use deprecated interface 'IDataFactory'")
102 virtual IDataFactory* deprecatedOldFactory() const = 0;
103};
104
105/*---------------------------------------------------------------------------*/
106/*---------------------------------------------------------------------------*/
107
108} // End namespace Arcane
109
110/*---------------------------------------------------------------------------*/
111/*---------------------------------------------------------------------------*/
112
113#endif
Declarations of Arcane's general types.
File containing declarations concerning the message passing model.
Information to construct an instance of 'IData'.
virtual ITraceMng * traceMng() const =0
Associated trace manager.
virtual IDataFactory * deprecatedOldFactory() const =0
Retrieves the old factory (obsolete).
virtual IDataOperation * createDataOperation(Parallel::eReduceType rt)=0
Creates an operation performing a reduction of type rt.
virtual Ref< ISerializedData > createEmptySerializedDataRef()=0
Creates serialized data.
virtual void registerDataStorageFactory(Ref< IDataStorageFactory > factory)=0
Registers the factory factory.
virtual Ref< ISerializedData > createSerializedDataRef(eDataType data_type, Int64 memory_size, Integer nb_dim, Int64 nb_element, Int64 nb_base_element, bool is_multi_size, Int64ConstArrayView dimensions)=0
Creates serialized data.
virtual void build()=0
Builds the instance.
Reference to an instance.
eReduceType
Supported reduction types.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int64_t Int64
Signed integer type of 64 bits.
Int32 Integer
Type representing an integer.
ConstArrayView< Int64 > Int64ConstArrayView
C equivalent of a 1D array of 64-bit integers.
Definition UtilsTypes.h:480
eDataType
Data type.
Definition DataTypes.h:41