Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IBackwardMng.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/* IBackwardMng.h (C) 2000-2025 */
9/* */
10/* Interface managing backward strategies. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IBACKWARDMNG_H
13#define ARCANE_CORE_IBACKWARDMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
53class ARCANE_CORE_EXPORT IBackwardMng
54{
55 public:
56
57 // Actions to perform
59 {
64 };
65
66 public:
67
68 virtual ~IBackwardMng() = default;
69
70 public:
71
73 virtual void init() = 0;
74
76 virtual void beginAction() = 0;
77
82 virtual bool checkAndApplyRestore() = 0;
83
89 virtual bool checkAndApplySave(bool is_forced) = 0;
90
92 virtual void endAction() = 0;
93
94 // Save period
95 virtual void setSavePeriod(Integer n) = 0;
96
97 // Retrieves the save period
98 virtual Integer savePeriod() const = 0;
99
112 virtual void goBackward() = 0;
113
122 virtual bool isLocked() const = 0;
123
128 virtual bool isBackwardEnabled() const = 0;
129
138 virtual void clear() = 0;
139};
140
141/*---------------------------------------------------------------------------*/
142/*---------------------------------------------------------------------------*/
143
144} // namespace Arcane
145
146/*---------------------------------------------------------------------------*/
147/*---------------------------------------------------------------------------*/
148
149#endif
Declarations of Arcane's general types.
Interface managing backward strategies.
virtual void init()=0
Initialization of the backward manager.
virtual void clear()=0
Deletes resources associated with the backward rollback.
virtual bool checkAndApplySave(bool is_forced)=0
Checks and applies variable saving if necessary. If is_forced is true, forces the save.
virtual void endAction()=0
Indicates that the save/restore actions are finished.
virtual void goBackward()=0
Signals that a backward rollback is desired.
virtual bool isLocked() const =0
Indicates if the backward rollback saves are locked.
virtual bool isBackwardEnabled() const =0
Indicates if a backward rollback is scheduled.
virtual void beginAction()=0
Indicates that the save/restore actions have started.
virtual bool checkAndApplyRestore()=0
Checks and applies restoration if necessary.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.