Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
VariableStatusChangedEventArgs.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* VariableStatusChangedEventArgs.h (C) 2000-2025 */
9/* */
10/* Arguments of events generated by IVariableMng. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13#ifndef ARCANE_CORE_VARIABLESTATUSCHANGEDEVENTARGS_H
14#define ARCANE_CORE_VARIABLESTATUSCHANGEDEVENTARGS_H
15/*---------------------------------------------------------------------------*/
16/*---------------------------------------------------------------------------*/
17
19#include "arcane/utils/Array.h"
20
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
26namespace Arcane
27{
28
29/*---------------------------------------------------------------------------*/
30/*---------------------------------------------------------------------------*/
31
36class ARCANE_CORE_EXPORT VariableStatusChangedEventArgs
37{
38 public:
39
40 enum class Status
41 {
43 Added,
45 Removed
46 };
47
48 public:
49
51 : m_variable(var)
52 , m_status(s)
53 {}
54 VariableStatusChangedEventArgs(const VariableStatusChangedEventArgs& rhs) = default;
55 VariableStatusChangedEventArgs& operator=(const VariableStatusChangedEventArgs& rhs) = default;
56
57 public:
58
60 IVariable* variable() const { return m_variable; }
62 Status status() const { return m_status; }
63
64 private:
65
66 IVariable* m_variable = nullptr;
67 Status m_status = Status::Added;
68};
69
70/*---------------------------------------------------------------------------*/
71/*---------------------------------------------------------------------------*/
72
73} // namespace Arcane
74
75/*---------------------------------------------------------------------------*/
76/*---------------------------------------------------------------------------*/
77
78#endif
Declarations of Arcane's general types.
Declarations of types used in Arcane.
Interface of a variable.
Definition IVariable.h:40
Arguments of the event notifying a change in the state of a variable.
IVariable * variable() const
Variable whose state changes.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --