Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
VariableDependInfo.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/* VariableDependInfo.h (C) 2000-2025 */
9/* */
10/* Information about a variable dependency. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_VARIABLEDEPENDINFO_H
13#define ARCANE_CORE_VARIABLEDEPENDINFO_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/TraceInfo.h"
18
19#include "arcane/core/IVariable.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30/*!
31 * \brief Information about a variable dependency.
32 */
33class ARCANE_CORE_EXPORT VariableDependInfo
34{
35 public:
36
37 VariableDependInfo(IVariable* var, IVariable::eDependType depend_type,
38 const TraceInfo& trace_info);
39
40 public:
41
42 //! Variable
43 IVariable* variable() const { return m_variable; }
44
45 //! Dependency type.
46 IVariable::eDependType dependType() const { return m_depend_type; }
47
48 /*!
49 * Info (if available) about the location in the source code where the dependency
50 * was added.
51 */
52 const TraceInfo& traceInfo() const { return m_trace_info; }
53
54 private:
55
56 IVariable* m_variable = nullptr;
57 IVariable::eDependType m_depend_type = IVariable::DPT_CurrentTime;
58 TraceInfo m_trace_info;
59};
60
61/*---------------------------------------------------------------------------*/
62/*---------------------------------------------------------------------------*/
63
64} // namespace Arcane
65
66/*---------------------------------------------------------------------------*/
67/*---------------------------------------------------------------------------*/
68
69#endif
Interface of a variable.
Definition IVariable.h:40
eDependType
Dependency Type.
Definition IVariable.h:45
IVariable::eDependType dependType() const
Dependency type.
const TraceInfo & traceInfo() const
IVariable * variable() const
Variable.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --