Variable factory registrar. More...
#include <arcane/core/VariableFactoryRegisterer.h>
Public Types | |
| using | VariableFactoryFunc = VariableFactoryVariableRefCreateFunc |
Public Member Functions | |
| VariableFactoryRegisterer (VariableFactoryFunc func, const VariableTypeInfo &var_type_info) | |
| IVariableFactory * | createFactory () |
| Creates a factory for this variable type. | |
| VariableFactoryRegisterer * | previousVariableFactory () const |
| Previous VariableFactory (0 if the first). | |
| VariableFactoryRegisterer * | nextVariableFactory () 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 VariableTypeInfo & | variableTypeInfo () 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 VariableFactoryRegisterer * | firstVariableFactory () |
Private Attributes | |
| VariableFactoryFunc | m_function |
| Creation function for IVariableFactoryFactory. | |
| VariableTypeInfo | m_variable_type_info |
| Information about the variable type. | |
| VariableFactoryRegisterer * | m_previous |
| Previous VariableFactory. | |
| VariableFactoryRegisterer * | m_next |
| Next VariableFactory. | |
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.
| using Arcane::VariableFactoryRegisterer::VariableFactoryFunc = VariableFactoryVariableRefCreateFunc |
Definition at line 45 of file VariableFactoryRegisterer.h.
| 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().
| 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().
|
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().
|
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().
|
static |
Definition at line 65 of file VariableFactoryRegisterer.cc.
|
inline |
Indicates if the factory is for a partial variable.
Definition at line 82 of file VariableFactoryRegisterer.h.
References m_variable_type_info.
|
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().
|
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().
|
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().
|
inline |
Previous VariableFactory (0 if the first).
Definition at line 64 of file VariableFactoryRegisterer.h.
References m_previous, and VariableFactoryRegisterer().
|
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().
|
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().
|
inline |
Information about the variable type.
Definition at line 85 of file VariableFactoryRegisterer.h.
References m_variable_type_info.
|
private |
Creation function for IVariableFactoryFactory.
Definition at line 108 of file VariableFactoryRegisterer.h.
Referenced by createFactory(), and VariableFactoryRegisterer().
|
private |
Next VariableFactory.
Definition at line 117 of file VariableFactoryRegisterer.h.
Referenced by nextVariableFactory(), setNextVariableFactory(), and VariableFactoryRegisterer().
|
private |
Previous VariableFactory.
Definition at line 114 of file VariableFactoryRegisterer.h.
Referenced by previousVariableFactory(), setPreviousVariableFactory(), and VariableFactoryRegisterer().
|
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().