12#ifndef ARCANE_IMPL_DATASTORAGEFACTORY_H
13#define ARCANE_IMPL_DATASTORAGEFACTORY_H
17#include "arcane/utils/Ref.h"
18#include "arcane/utils/ITraceMng.h"
20#include "arcane/core/IDataStorageFactory.h"
21#include "arcane/core/IData.h"
22#include "arcane/core/IDataFactory.h"
23#include "arcane/core/IDataFactoryMng.h"
38class ARCANE_IMPL_EXPORT AbstractDataStorageFactory
44 : m_storage_type_info(dsti)
52 return m_storage_type_info;
67template <
typename DataType>
class DataStorageFactory
68:
public AbstractDataStorageFactory
73 : AbstractDataStorageFactory(dsti)
81 IData* d =
new DataType(dsbi);
88 using DataContainerType = DataType;
91 const bool print_info =
false;
92 if (print_info && trace)
93 trace->
info() <<
"TYPE=" << t.basicDataType()
94 <<
" nb_basic=" << t.nbBasicElement()
95 <<
" dimension=" << t.dimension()
96 <<
" multi_tag=" << t.multiTag()
97 <<
" full_name=" << t.fullName()
DataStorageTypeInfo storageTypeInfo() override
Information about the created container type.
Information to construct an instance of 'IData'.
static void registerDataFactory(IDataFactoryMng *dfm)
Registers a factory for the data DataType in dfm.
Ref< IData > createSimpleDataRef(const DataStorageBuildInfo &dsbi) override
Create simple data of a type.
Type information for a data container.
Interface of the data factory manager.
virtual ITraceMng * traceMng() const =0
Associated trace manager.
virtual void registerDataStorageFactory(Ref< IDataStorageFactory > factory)=0
Registers the factory factory.
Interface of a data container factory.
Interface of a data item.
virtual TraceMessage info()=0
Stream for an information message.
Reference to an instance.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
auto makeRef(InstanceType *t) -> Ref< InstanceType >
Creates a reference on a pointer.