Variable manager interface. More...
#include <arcane/core/IVariableMng.h>
Public Member Functions | |
| virtual | ~IVariableMng ()=default |
| Frees resources. | |
| virtual ISubDomain * | subDomain ()=0 |
| Sub-domain manager. | |
| virtual IParallelMng * | parallelMng () const =0 |
| Associated parallelism manager. | |
| virtual ITraceMng * | traceMng ()=0 |
| Message manager. | |
| virtual IVariable * | checkVariable (const VariableInfo &infos)=0 |
| Checks a variable. | |
| virtual String | generateTemporaryVariableName ()=0 |
| Generates a name for a temporary variable. | |
| virtual void | dumpList (std::ostream &, IModule *)=0 |
| Displays the list of variables managed by a module. | |
| virtual void | dumpList (std::ostream &)=0 |
| Displays the list of all variables managed by the manager. | |
| virtual Real | exportSize (const VariableCollection &vars)=0 |
| Estimated size for exporting variables. | |
| virtual IObservable * | writeObservable ()=0 |
| Observable for variables being written. | |
| virtual IObservable * | readObservable ()=0 |
| Observable for variables being read. | |
| virtual void | writeVariables (IDataWriter *writer, IVariableFilter *filter=0)=0 |
| Writes the variables. | |
| virtual void | writeVariables (IDataWriter *writer, const VariableCollection &vars)=0 |
| Exports the variables. | |
| virtual void | writeCheckpoint (ICheckpointWriter *writer)=0 |
| virtual void | writePostProcessing (IPostProcessorWriter *writer)=0 |
| Writes variables for post-processing. | |
| virtual void | readVariables (IDataReader *reader, IVariableFilter *filter=0)=0 |
| Reads all variables. | |
| virtual void | readCheckpoint (ICheckpointReader *reader)=0 |
| virtual void | readCheckpoint (const CheckpointReadInfo &infos)=0 |
| virtual void | variables (VariableRefCollection v, IModule *i)=0 |
| Gets all variables of module i. | |
| virtual VariableCollection | variables ()=0 |
| List of variables. | |
| virtual VariableCollection | usedVariables ()=0 |
| List of used variables. | |
| virtual void | notifyUsedVariableChanged ()=0 |
| Notifies the manager that a variable's state has changed. | |
| virtual IVariable * | findVariable (const String &name)=0 |
| Returns the variable named name or 0 if no such name exists. | |
| virtual IVariable * | findMeshVariable (IMesh *mesh, const String &name)=0 |
| Returns the mesh variable named name or 0 if no such name exists. | |
| virtual IVariable * | findVariableFullyQualified (const String &name)=0 |
| Returns the fully qualified variable named name or 0 if no such name exists. | |
| virtual void | dumpStats (std::ostream &ostr, bool is_verbose)=0 |
| Writes statistics about variables to the stream ostr. | |
| virtual void | dumpStatsJSON (JSONWriter &writer)=0 |
| Writes statistics with the writer writer. | |
| virtual IVariableUtilities * | utilities () const =0 |
| Interface of associated utility functions. | |
| virtual IVariableSynchronizerMng * | synchronizerMng () const =0 |
| Interface of the variable synchronization manager. | |
Events | |
| virtual EventObservable< const VariableStatusChangedEventArgs & > & | onVariableAdded ()=0 |
| Event sent when a variable is created. | |
| virtual EventObservable< const VariableStatusChangedEventArgs & > & | onVariableRemoved ()=0 |
| Event sent when a variable is destroyed. | |
| virtual void | build ()=0 |
| Constructs the instance members. | |
| virtual void | initialize ()=0 |
| Initializes the instance. The instance is not usable until this method has been called. | |
| virtual void | removeAllVariables ()=0 |
| Removes and destroys the variables managed by this manager. | |
| virtual void | detachMeshVariables (IMesh *mesh)=0 |
| Detaches variables associated with the mesh mesh. | |
| virtual void | addVariableRef (VariableRef *var)=0 |
| Adds a reference to a variable. | |
| virtual void | removeVariableRef (VariableRef *var)=0 |
| Removes a reference to a variable. | |
| virtual void | addVariable (IVariable *var)=0 |
| Adds a variable. | |
| virtual void | removeVariable (IVariable *var)=0 |
| Removes a variable. | |
| virtual void | initializeVariables (bool is_continue)=0 |
| Initializes the variables. | |
| virtual ISubDomain * | _internalSubDomain () const =0 |
| virtual IVariableMngInternal * | _internalApi ()=0 |
| Internal Arcane API. | |
Variable manager interface.
This manager contains the list of variables declared in the associated sub-domain subDomain(). It maintains the list of variables and allows them to be read or written.
Definition at line 57 of file IVariableMng.h.
|
pure virtual |
Adds a variable.
Adds the variable var.
The validity of the variable is not checked (void checkVariable()).
References addVariable().
Referenced by addVariable().
|
pure virtual |
Adds a reference to a variable.
Adds the reference var to the manager.
References addVariableRef().
Referenced by addVariableRef().
|
pure virtual |
Constructs the instance members.
The instance is not usable until this method has been called. This method must be called before initialize().
References build().
Referenced by build().
|
pure virtual |
Checks a variable.
Checks that the variable named name characterized by infos is valid. This is true if and only if:
If the variable is not valid, an exception is thrown.
This operation is used when you want to create a new reference to a variable and ensure that it will be valid.
| ExBadVariableKindType | if the variable named infos.name() exists and its type and kind do not match those of infos. |
References checkVariable().
Referenced by checkVariable().
|
pure virtual |
Estimated size for exporting variables.
This operation estimates the number of megabytes that the exportation of variables vars will generate. If vars is empty, the estimation is based on all referenced variables.
The estimation only takes into account the memory used by the variables and not the writer used.
The estimation is local to the sub-domain. To obtain the total size of an export, you must determine the size per sub-domain and sum them up.
This method is collective
References exportSize().
Referenced by exportSize().
|
pure virtual |
Generates a name for a temporary variable.
To ensure the consistency of this name, all sub-domains must call this function.
References generateTemporaryVariableName().
Referenced by generateTemporaryVariableName().
|
pure virtual |
Initializes the instance. The instance is not usable until this method has been called.
References initialize().
Referenced by initialize().
|
pure virtual |
Initializes the variables.
Iterates through the list of variables and initializes them. Only variables of a used module are initialized.
| is_continue | true if resuming. |
References initializeVariables().
Referenced by initializeVariables().
|
pure virtual |
Observable for variables being read.
Observers registered in this observable are called after reading variables (operation readVariables() or readCheckpoint()).
References readObservable().
Referenced by readObservable().
|
pure virtual |
Reads all variables.
Iterates through all variables managed by the manager and applies the reader reader to them. If filter is not null, it is applied to each variable and a variable is read only if the filter is true for that variable. Variables that are not read are not modified by this operation.
This method is collective.
References readVariables().
Referenced by readVariables().
|
pure virtual |
Removes a variable.
Removes the variable var.
After calling this method, the variable must no longer be used.
References removeVariable().
Referenced by removeVariable().
|
pure virtual |
Removes a reference to a variable.
Removes the reference var from the manager.
If var is not referenced by the manager, nothing is done.
References removeVariableRef().
Referenced by removeVariableRef().
|
pure virtual |
Observable for variables being written.
Observers registered in this observable are called before writing variables (operation writeCheckpoint(), writeVariables() or writePostProcessing()).
References writeObservable().
Referenced by writeObservable().
|
pure virtual |
Writes variables for post-processing.
Uses the post-processing service writer to write the variables. The caller must have positioned the fields of writer before this call, notably the list of variables to be post-processed. This method calls IPostProcessorWriter::notifyBeginWrite() before writing and IPostProcessorWriter::notifyEndWriter() at the end.
This method is collective.
References writePostProcessing().
Referenced by writePostProcessing().
|
pure virtual |
Exports the variables.
Exports the variables in the list vars. If vars is empty, it exports all variables in the base that are used.
References writeVariables().
|
pure virtual |
Writes the variables.
Iterates through all variables managed by the manager and applies the writer writer to them. If filter is not null, it is applied to each variable and a variable is written only if the filter is true for that variable.
This method is collective
References writeVariables().
Referenced by writeVariables(), and writeVariables().