Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::ModuleFactory Class Reference

Public Member Functions

 ModuleFactory (Ref< IModuleFactory2 > factory, bool is_autoload)
 Constructs a factory for a module.
void addReference () override
void removeReference () override
Ref< IModulecreateModule (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 IServiceInfoserviceInfo () const override
 Information about the module that can be created by this factory.

Additional Inherited Members

Protected Member Functions inherited from Arcane::IModuleFactoryInfo
virtual ~IModuleFactoryInfo ()
 Releases resources.

Detailed Description

Definition at line 40 of file ModuleFactory.h.

Constructor & Destructor Documentation

◆ ModuleFactory()

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().

◆ ~ModuleFactory()

Arcane::ModuleFactory::~ModuleFactory ( )
override

Definition at line 53 of file ModuleFactory.cc.

Member Function Documentation

◆ addReference()

void Arcane::ModuleFactory::addReference ( )
overridevirtual

Implements Arcane::IModuleFactoryInfo.

Definition at line 99 of file ModuleFactory.cc.

◆ createModule()

Ref< IModule > Arcane::ModuleFactory::createModule ( ISubDomain * parent,
const MeshHandle & mesh_handle )
overridevirtual

Creates a module.

The implementation must call parent->moduleMng()->addModule() for the created module.

Parameters
parentParent of this module.
meshmesh associated with the module.
Returns
the created 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().

◆ initializeModuleFactory()

void Arcane::ModuleFactory::initializeModuleFactory ( ISubDomain * sub_domain)
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.

◆ isAutoload()

bool Arcane::ModuleFactory::isAutoload ( ) const
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.

◆ moduleName()

String Arcane::ModuleFactory::moduleName ( ) const
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().

◆ removeReference()

void Arcane::ModuleFactory::removeReference ( )
overridevirtual

Implements Arcane::IModuleFactoryInfo.

Definition at line 108 of file ModuleFactory.cc.

◆ serviceInfo()

const IServiceInfo * Arcane::ModuleFactory::serviceInfo ( ) const
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.


The documentation for this class was generated from the following files: