Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::VariableFactoryRegisterer Class Reference

Variable factory registrar. More...

#include <arcane/core/VariableFactoryRegisterer.h>

Collaboration diagram for Arcane::VariableFactoryRegisterer:

Public Types

using VariableFactoryFunc = VariableFactoryVariableRefCreateFunc

Public Member Functions

 VariableFactoryRegisterer (VariableFactoryFunc func, const VariableTypeInfo &var_type_info)
IVariableFactorycreateFactory ()
 Creates a factory for this variable type.
VariableFactoryRegistererpreviousVariableFactory () const
 Previous VariableFactory (0 if the first).
VariableFactoryRegisterernextVariableFactory () const
 Next VariableFactory (0 if the last).
eItemKind itemKind () const
 Kind of data variables of the variable created by this factory.
eDataType dataType () const
 Data type of the variable created by this factory.
Integer dimension () const
 Dimension of the variable created by this factory.
Integer multiTag () const
 Tag indicating the multiple type (0 if not multiple, 1 if multiple, 2 if multiple deprecated).
bool isPartial () const
 Indicates if the factory is for a partial variable.
const VariableTypeInfovariableTypeInfo () const
 Information about the variable type.
void setPreviousVariableFactory (VariableFactoryRegisterer *s)
 Positions the previous VariableFactory.
void setNextVariableFactory (VariableFactoryRegisterer *s)
 Positions the next VariableFactory.

Static Public Member Functions

static VariableFactoryRegistererfirstVariableFactory ()

Private Attributes

VariableFactoryFunc m_function
 Creation function for IVariableFactoryFactory.
VariableTypeInfo m_variable_type_info
 Information about the variable type.
VariableFactoryRegistererm_previous
 Previous VariableFactory.
VariableFactoryRegistererm_next
 Next VariableFactory.

Detailed Description

Variable factory registrar.

Each instance of this type must be a global variable that references a variable creation function of a given type. Since each instance is global, its creation happens before entering main(). Therefore, no operations using external objects or even dynamic allocations should be performed because the already created objects are unknown.

The class is designed so that all its instances are linked by a linked list. The first link is retrievable via firstVariableFactory();

Definition at line 41 of file VariableFactoryRegisterer.h.

Member Typedef Documentation

◆ VariableFactoryFunc

using Arcane::VariableFactoryRegisterer::VariableFactoryFunc = VariableFactoryVariableRefCreateFunc

Definition at line 45 of file VariableFactoryRegisterer.h.

Constructor & Destructor Documentation

◆ VariableFactoryRegisterer()

Arcane::VariableFactoryRegisterer::VariableFactoryRegisterer ( IVariableFactory::VariableFactoryFunc func,
const VariableTypeInfo & var_type_info )

Creates a registrar for a VariableFactory for the type var_type_info and for the creation function func

Definition at line 33 of file VariableFactoryRegisterer.cc.

References m_function, m_next, m_previous, m_variable_type_info, setNextVariableFactory(), setPreviousVariableFactory(), and VariableFactoryRegisterer().

Referenced by nextVariableFactory(), previousVariableFactory(), setNextVariableFactory(), setPreviousVariableFactory(), and VariableFactoryRegisterer().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ createFactory()

IVariableFactory * Arcane::VariableFactoryRegisterer::createFactory ( )

Creates a factory for this variable type.

The factory must be destroyed by the delete operator when it is no longer used.

Definition at line 56 of file VariableFactoryRegisterer.cc.

References m_function, and m_variable_type_info.

Referenced by Arcane::VariableMng::initialize().

Here is the caller graph for this function:

◆ dataType()

eDataType Arcane::VariableFactoryRegisterer::dataType ( ) const
inline

Data type of the variable created by this factory.

Definition at line 73 of file VariableFactoryRegisterer.h.

References m_variable_type_info.

Referenced by Arcane::VariableMng::initialize().

Here is the caller graph for this function:

◆ dimension()

Integer Arcane::VariableFactoryRegisterer::dimension ( ) const
inline

Dimension of the variable created by this factory.

Definition at line 76 of file VariableFactoryRegisterer.h.

References m_variable_type_info.

Referenced by Arcane::VariableMng::initialize().

Here is the caller graph for this function:

◆ firstVariableFactory()

VariableFactoryRegisterer * Arcane::VariableFactoryRegisterer::firstVariableFactory ( )
static

Definition at line 65 of file VariableFactoryRegisterer.cc.

◆ isPartial()

bool Arcane::VariableFactoryRegisterer::isPartial ( ) const
inline

Indicates if the factory is for a partial variable.

Definition at line 82 of file VariableFactoryRegisterer.h.

References m_variable_type_info.

◆ itemKind()

eItemKind Arcane::VariableFactoryRegisterer::itemKind ( ) const
inline

Kind of data variables of the variable created by this factory.

Definition at line 70 of file VariableFactoryRegisterer.h.

References m_variable_type_info.

Referenced by Arcane::VariableMng::initialize().

Here is the caller graph for this function:

◆ multiTag()

Integer Arcane::VariableFactoryRegisterer::multiTag ( ) const
inline

Tag indicating the multiple type (0 if not multiple, 1 if multiple, 2 if multiple deprecated).

Definition at line 79 of file VariableFactoryRegisterer.h.

References m_variable_type_info.

Referenced by Arcane::VariableMng::initialize().

Here is the caller graph for this function:

◆ nextVariableFactory()

VariableFactoryRegisterer * Arcane::VariableFactoryRegisterer::nextVariableFactory ( ) const
inline

Next VariableFactory (0 if the last).

Definition at line 67 of file VariableFactoryRegisterer.h.

References m_next, and VariableFactoryRegisterer().

Referenced by Arcane::VariableMng::initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ previousVariableFactory()

VariableFactoryRegisterer * Arcane::VariableFactoryRegisterer::previousVariableFactory ( ) const
inline

Previous VariableFactory (0 if the first).

Definition at line 64 of file VariableFactoryRegisterer.h.

References m_previous, and VariableFactoryRegisterer().

Here is the call graph for this function:

◆ setNextVariableFactory()

void Arcane::VariableFactoryRegisterer::setNextVariableFactory ( VariableFactoryRegisterer * s)
inline

Positions the next VariableFactory.

This method is automatically called by IVariableFactoryRegistry.

Definition at line 99 of file VariableFactoryRegisterer.h.

References m_next, and VariableFactoryRegisterer().

Referenced by VariableFactoryRegisterer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPreviousVariableFactory()

void Arcane::VariableFactoryRegisterer::setPreviousVariableFactory ( VariableFactoryRegisterer * s)
inline

Positions the previous VariableFactory.

This method is automatically called by IVariableFactoryRegistry.

Definition at line 92 of file VariableFactoryRegisterer.h.

References m_previous, and VariableFactoryRegisterer().

Referenced by VariableFactoryRegisterer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ variableTypeInfo()

const VariableTypeInfo & Arcane::VariableFactoryRegisterer::variableTypeInfo ( ) const
inline

Information about the variable type.

Definition at line 85 of file VariableFactoryRegisterer.h.

References m_variable_type_info.

Member Data Documentation

◆ m_function

VariableFactoryFunc Arcane::VariableFactoryRegisterer::m_function
private

Creation function for IVariableFactoryFactory.

Definition at line 108 of file VariableFactoryRegisterer.h.

Referenced by createFactory(), and VariableFactoryRegisterer().

◆ m_next

VariableFactoryRegisterer* Arcane::VariableFactoryRegisterer::m_next
private

◆ m_previous

VariableFactoryRegisterer* Arcane::VariableFactoryRegisterer::m_previous
private

◆ m_variable_type_info

VariableTypeInfo Arcane::VariableFactoryRegisterer::m_variable_type_info
private

Information about the variable type.

Definition at line 111 of file VariableFactoryRegisterer.h.

Referenced by createFactory(), dataType(), dimension(), isPartial(), itemKind(), multiTag(), VariableFactoryRegisterer(), and variableTypeInfo().


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