14#include "arcane/utils/TraceAccessor.h"
15#include "arcane/utils/FatalErrorException.h"
17#include "arcane/core/materials/MaterialVariableTypeInfo.h"
18#include "arcane/core/materials/IMeshMaterialVariableFactory.h"
19#include "arcane/core/materials/IMeshMaterialVariableFactoryMng.h"
20#include "arcane/core/materials/IMeshMaterialMng.h"
34class MeshMaterialVariableFactoryMng
41 ~MeshMaterialVariableFactoryMng()
override;
45 void build()
override;
53 std::map<String, Ref<IMeshMaterialVariableFactory>> m_factories;
59MeshMaterialVariableFactoryMng::
68MeshMaterialVariableFactoryMng::
69~MeshMaterialVariableFactoryMng()
79 auto x = m_factories.find(storage_type);
80 if (x == m_factories.end())
81 ARCANE_FATAL(
"Can not find mesh IMeshMaterialVariableFactory named={0}", storage_type);
83 return x->second->createVariable(build_info);
110 m_factories.insert(std::make_pair(t.
fullName(), factory));
#define ARCANE_FATAL(...)
Macro throwing a FatalErrorException.
Interface for the material and environment manager of a mesh.
Interface of the material variable factory manager.
Interface of a material variable on a mesh.
Information characterizing the type of a material variable.
String fullName() const
Full name of the variable type.
IMeshMaterialVariable * createVariable(const String &storage_type, const MaterialVariableBuildInfo &build_info) override
Creates a material variable.
ITraceMng * traceMng() const override
Associated trace manager.
void build() override
Builds the instance.
void registerFactory(Ref< IMeshMaterialVariableFactory > factory) override
Registers the factory factory.
Reference to an instance.
Unicode character string.
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
ITraceMng * traceMng() const
Trace manager.
Always enables tracing in Arcane parts concerning materials.