Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
DataFactoryMng.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/* DataFactoryMng.h (C) 2000-2021 */
9/* */
10/* Data factory manager. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_IMPL_DATAFACTORYMNG_H
13#define ARCANE_IMPL_DATAFACTORYMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/TraceAccessor.h"
18
19#include "arcane/core/IDataFactoryMng.h"
20
21#include <map>
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
26namespace Arcane
27{
28
29class DataFactory;
30
31/*---------------------------------------------------------------------------*/
32/*---------------------------------------------------------------------------*/
33
43class DataFactoryMng
44: public TraceAccessor
45, public IDataFactoryMng
46{
47 public:
48
49 DataFactoryMng(IApplication* sm);
50 ~DataFactoryMng() override;
51
52 public:
53
54 void build() override;
55 IApplication* application() { return m_application; }
56 ITraceMng* traceMng() const override;
58 Ref<IData> createSimpleDataRef(const String& storage_type, const DataStorageBuildInfo& build_info) override;
61 createSerializedDataRef(eDataType data_type, Int64 memory_size,
62 Integer nb_dim, Int64 nb_element,
63 Int64 nb_base_element, bool is_multi_size,
64 Int64ConstArrayView extents) override;
65
67 IDataFactory* deprecatedOldFactory() const override { return m_old_factory; }
68
69 private:
70
71 IApplication* m_application;
72 IDataFactory* m_old_factory;
73 std::map<String, Ref<IDataStorageFactory>> m_factories;
74};
75
76/*---------------------------------------------------------------------------*/
77/*---------------------------------------------------------------------------*/
78
79} // End namespace Arcane
80
81/*---------------------------------------------------------------------------*/
82/*---------------------------------------------------------------------------*/
83
84#endif
Ref< ISerializedData > createEmptySerializedDataRef() override
Creates serialized data.
void registerDataStorageFactory(Ref< IDataStorageFactory > factory) override
Registers the factory factory.
IDataFactory * deprecatedOldFactory() const override
Retrieves the old factory (obsolete).
Ref< ISerializedData > createSerializedDataRef(eDataType data_type, Int64 memory_size, Integer nb_dim, Int64 nb_element, Int64 nb_base_element, bool is_multi_size, Int64ConstArrayView extents) override
Creates serialized data.
void build() override
Builds the instance.
IDataOperation * createDataOperation(Parallel::eReduceType rt) override
Creates an operation performing a reduction of type rt.
ITraceMng * traceMng() const override
Associated trace manager.
Interface of a data factory.
Definition DataFactory.h:33
Information to construct an instance of 'IData'.
Application interface.
Interface of the data factory manager.
Interface of a data factory.
Interface of an operation on a data.
Reference to an instance.
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
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