Module factory. More...
#include <arcane/core/ModuleFactory.h>
Public Member Functions | |
| ModuleFactory (Ref< IModuleFactory2 > factory, bool is_autoload) | |
| Constructs a factory for a module. | |
| void | addReference () override |
| void | removeReference () override |
| Ref< IModule > | createModule (ISubDomain *parent, const MeshHandle &mesh_handle) override |
| Creates a module. | |
| bool | isAutoload () const override |
| Indicates if the module should be loaded automatically. | |
| void | initializeModuleFactory (ISubDomain *sub_domain) override |
| If the factory is a one-to-one module, initializes it on the sub-domain sub_domain. | |
| String | moduleName () const override |
| Name of the module created by this factory. | |
| const IServiceInfo * | serviceInfo () const override |
| Information about the module that can be created by this factory. | |
Private Attributes | |
| Ref< IModuleFactory2 > | m_factory |
| bool | m_is_autoload |
| String | m_name |
| std::atomic< Int32 > | m_nb_ref |
Additional Inherited Members | |
| Protected Member Functions inherited from Arcane::IModuleFactoryInfo | |
| virtual | ~IModuleFactoryInfo () |
| Releases resources. | |
Module factory.
Definition at line 40 of file ModuleFactory.h.
| Arcane::ModuleFactory::ModuleFactory | ( | Ref< IModuleFactory2 > | factory, |
| bool | is_autoload ) |
Constructs a factory for a module.
This constructor is used by the ARCANE_REGISTER_MODULE and ARCANE_REGISTER_AXL_MODULE macros.
This instance becomes the owner of factory and will destroy it in the destructor.
Definition at line 38 of file ModuleFactory.cc.
References moduleName().
|
override |
Definition at line 53 of file ModuleFactory.cc.
|
overridevirtual |
Implements Arcane::IModuleFactoryInfo.
Definition at line 99 of file ModuleFactory.cc.
|
overridevirtual |
Creates a module.
The implementation must call parent->moduleMng()->addModule() for the created module.
| parent | Parent of this module. |
| mesh | mesh associated with the module. |
Implements Arcane::IModuleFactoryInfo.
Definition at line 61 of file ModuleFactory.cc.
References Arcane::IModuleMng::addModule(), ARCANE_FATAL, Arcane::ISubDomain::checkId(), Arcane::ISubDomain::moduleMng(), and moduleName().
|
overridevirtual |
If the factory is a one-to-one module, initializes it on the sub-domain sub_domain.
This method is called when the sub-domain is created, to perform specific module initializations before it is manufactured. For example, to add time loops specific to the module.
Implements Arcane::IModuleFactoryInfo.
Definition at line 81 of file ModuleFactory.cc.
|
inlineoverridevirtual |
Indicates if the module should be loaded automatically.
If this property is true, the module will always be loaded even if it does not appear in the time loop.
Implements Arcane::IModuleFactoryInfo.
Definition at line 62 of file ModuleFactory.h.
|
inlineoverridevirtual |
Name of the module created by this factory.
Implements Arcane::IModuleFactoryInfo.
Definition at line 64 of file ModuleFactory.h.
Referenced by createModule(), and ModuleFactory().
|
overridevirtual |
Implements Arcane::IModuleFactoryInfo.
Definition at line 108 of file ModuleFactory.cc.
|
overridevirtual |
Information about the module that can be created by this factory.
The returned instance remains the property of the application that created it and must neither be modified nor destroyed.
Implements Arcane::IModuleFactoryInfo.
Definition at line 90 of file ModuleFactory.cc.
|
private |
Definition at line 69 of file ModuleFactory.h.
|
private |
Definition at line 70 of file ModuleFactory.h.
|
private |
Definition at line 71 of file ModuleFactory.h.
|
private |
Definition at line 72 of file ModuleFactory.h.