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

Arguments for the event notifying a variable synchronization. More...

#include <arcane/core/VariableSynchronizerEventArgs.h>

Collaboration diagram for Arcane::VariableSynchronizerEventArgs:

Public Types

enum class  State { BeginSynchronize , EndSynchronize }
 Enum to know if we are at the beginning or the end of the synchronization. More...
enum class  CompareStatus { Unknown , Same , Different }
 Comparison of phantom entity values before/after a synchronization. More...

Public Member Functions

 VariableSynchronizerEventArgs (VariableCollection vars, IVariableSynchronizer *vs, Real elapsed_time, State state=State::EndSynchronize)
 VariableSynchronizerEventArgs (IVariable *var, IVariableSynchronizer *vs, Real elapsed_time, State state=State::EndSynchronize)
 VariableSynchronizerEventArgs (VariableCollection vars, IVariableSynchronizer *vs)
 VariableSynchronizerEventArgs (IVariable *var, IVariableSynchronizer *vs)
 VariableSynchronizerEventArgs (IVariableSynchronizer *vs)
void initialize (const VariableCollection &vars)
void initialize (IVariable *var)
IVariableSynchronizersynchronizer () const
 Associated synchronizer.
ConstArrayView< IVariable * > variables () const
 List of synchronized variables.
ConstArrayView< CompareStatuscompareStatusList () const
 List of comparison status.
void setCompareStatus (Int32 i, CompareStatus v)
 Sets the comparison status of the i-th variable.
Real elapsedTime () const
 Time spent in synchronization.
void setElapsedTime (Real v)
State state () const
 Indicator of the event moment.
void setState (State v)

Private Member Functions

void _reset ()

Private Attributes

IVariableSynchronizerm_var_syncer = nullptr
UniqueArray< IVariable * > m_variables
UniqueArray< CompareStatusm_compare_status_list
Real m_elapsed_time = 0.0
State m_state = State::BeginSynchronize

Detailed Description

Arguments for the event notifying a variable synchronization.

Instances of this class can be used multiple times. You must call initialize() to initialize or reset the instance with default values.

Definition at line 39 of file VariableSynchronizerEventArgs.h.

Member Enumeration Documentation

◆ CompareStatus

Comparison of phantom entity values before/after a synchronization.

Enumerator
Unknown 

No comparison or unknown result.

Same 

Same values before and after synchronization.

Different 

Different values before and after synchronization.

Definition at line 51 of file VariableSynchronizerEventArgs.h.

◆ State

Enum to know if we are at the beginning or the end of the synchronization.

Definition at line 44 of file VariableSynchronizerEventArgs.h.

Constructor & Destructor Documentation

◆ VariableSynchronizerEventArgs() [1/5]

Arcane::VariableSynchronizerEventArgs::VariableSynchronizerEventArgs ( VariableCollection vars,
IVariableSynchronizer * vs,
Real elapsed_time,
State state = State::EndSynchronize )

Definition at line 39 of file VariableSynchronizerEventArgs.cc.

◆ VariableSynchronizerEventArgs() [2/5]

Arcane::VariableSynchronizerEventArgs::VariableSynchronizerEventArgs ( IVariable * var,
IVariableSynchronizer * vs,
Real elapsed_time,
State state = State::EndSynchronize )

Definition at line 26 of file VariableSynchronizerEventArgs.cc.

◆ VariableSynchronizerEventArgs() [3/5]

Arcane::VariableSynchronizerEventArgs::VariableSynchronizerEventArgs ( VariableCollection vars,
IVariableSynchronizer * vs )

Definition at line 62 of file VariableSynchronizerEventArgs.cc.

◆ VariableSynchronizerEventArgs() [4/5]

Arcane::VariableSynchronizerEventArgs::VariableSynchronizerEventArgs ( IVariable * var,
IVariableSynchronizer * vs )

Definition at line 52 of file VariableSynchronizerEventArgs.cc.

◆ VariableSynchronizerEventArgs() [5/5]

Arcane::VariableSynchronizerEventArgs::VariableSynchronizerEventArgs ( IVariableSynchronizer * vs)
inline

Definition at line 76 of file VariableSynchronizerEventArgs.h.

Member Function Documentation

◆ _reset()

void Arcane::VariableSynchronizerEventArgs::_reset ( )
private

Definition at line 108 of file VariableSynchronizerEventArgs.cc.

◆ compareStatusList()

ConstArrayView< CompareStatus > Arcane::VariableSynchronizerEventArgs::compareStatusList ( ) const
inline

List of comparison status.

The value of the i-th element of compareStatus() indicates the state of comparison for the i-th variable in variables().

This list is only valid for end synchronization events (state()==State::EndSynchronize).

Definition at line 100 of file VariableSynchronizerEventArgs.h.

◆ elapsedTime()

Real Arcane::VariableSynchronizerEventArgs::elapsedTime ( ) const
inline

Time spent in synchronization.

Definition at line 106 of file VariableSynchronizerEventArgs.h.

◆ initialize() [1/2]

void Arcane::VariableSynchronizerEventArgs::initialize ( const VariableCollection & vars)

Definition at line 82 of file VariableSynchronizerEventArgs.cc.

◆ initialize() [2/2]

void Arcane::VariableSynchronizerEventArgs::initialize ( IVariable * var)

Definition at line 97 of file VariableSynchronizerEventArgs.cc.

◆ setCompareStatus()

void Arcane::VariableSynchronizerEventArgs::setCompareStatus ( Int32 i,
CompareStatus v )
inline

Sets the comparison status of the i-th variable.

Definition at line 103 of file VariableSynchronizerEventArgs.h.

◆ setElapsedTime()

void Arcane::VariableSynchronizerEventArgs::setElapsedTime ( Real v)
inline

Definition at line 107 of file VariableSynchronizerEventArgs.h.

◆ setState()

void Arcane::VariableSynchronizerEventArgs::setState ( State v)
inline

Definition at line 111 of file VariableSynchronizerEventArgs.h.

◆ state()

State Arcane::VariableSynchronizerEventArgs::state ( ) const
inline

Indicator of the event moment.

Definition at line 110 of file VariableSynchronizerEventArgs.h.

◆ synchronizer()

IVariableSynchronizer * Arcane::VariableSynchronizerEventArgs::synchronizer ( ) const
inline

Associated synchronizer.

Definition at line 86 of file VariableSynchronizerEventArgs.h.

◆ variables()

ConstArrayView< IVariable * > Arcane::VariableSynchronizerEventArgs::variables ( ) const

List of synchronized variables.

Definition at line 73 of file VariableSynchronizerEventArgs.cc.

Member Data Documentation

◆ m_compare_status_list

UniqueArray<CompareStatus> Arcane::VariableSynchronizerEventArgs::m_compare_status_list
private

Definition at line 117 of file VariableSynchronizerEventArgs.h.

◆ m_elapsed_time

Real Arcane::VariableSynchronizerEventArgs::m_elapsed_time = 0.0
private

Definition at line 118 of file VariableSynchronizerEventArgs.h.

◆ m_state

State Arcane::VariableSynchronizerEventArgs::m_state = State::BeginSynchronize
private

Definition at line 119 of file VariableSynchronizerEventArgs.h.

◆ m_var_syncer

IVariableSynchronizer* Arcane::VariableSynchronizerEventArgs::m_var_syncer = nullptr
private

Definition at line 115 of file VariableSynchronizerEventArgs.h.

◆ m_variables

UniqueArray<IVariable*> Arcane::VariableSynchronizerEventArgs::m_variables
private

Definition at line 116 of file VariableSynchronizerEventArgs.h.


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