Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
ICheckpointReader.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/* ICheckpointReader.h (C) 2000-2025 */
9/* */
10/* Interface for the protection/recovery reading service. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_ICHECKPOINTREADER_H
13#define ARCANE_CORE_ICHECKPOINTREADER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*!
29 * \ingroup StandardService
30 * \brief Interface for the protection/recovery reading service.
31 */
32class ARCANE_CORE_EXPORT ICheckpointReader
33{
34 public:
35
36 //! Frees resources
37 virtual ~ICheckpointReader() = default;
38
39 public:
40
41 //! Returns the associated reader
42 virtual IDataReader* dataReader() = 0;
43
44 //! Notifies that a protection will be read with current parameters
45 virtual void notifyBeginRead() = 0;
46
47 //! Notifies that a protection has just been read
48 virtual void notifyEndRead() = 0;
49
50 //! Sets the name of the protection file
51 virtual void setFileName(const String& file_name) = 0;
52
53 //! Name of the protection file
54 virtual String fileName() const = 0;
55
56 //! Sets the name of the protection base directory
57 virtual void setBaseDirectoryName(const String& dirname) = 0;
58
59 //! Name of the protection base directory
60 virtual String baseDirectoryName() const = 0;
61
62 //! Metadata associated with this reader.
63 virtual void setReaderMetaData(const String&) = 0;
64
65 //! Sets the time and index of the protection to read
66 virtual void setCurrentTimeAndIndex(Real current_time, Integer current_index) = 0;
67};
68
69/*---------------------------------------------------------------------------*/
70/*---------------------------------------------------------------------------*/
71/*!
72 * \ingroup StandardService
73 * \brief Interface for the protection/recovery reading service (V2)
74 */
75class ARCANE_CORE_EXPORT ICheckpointReader2
76{
77 public:
78
79 //! Frees resources
80 virtual ~ICheckpointReader2() = default;
81
82 public:
83
84 //! Returns the data reader associated with this protection reader
85 virtual IDataReader2* dataReader() = 0;
86
87 /*!
88 * \brief Notifies that a protection will be read with information
89 * from \a checkpoint_info.
90 */
91 virtual void notifyBeginRead(const CheckpointReadInfo& cri) = 0;
92
93 //! Notifies the end of reading a protection.
94 virtual void notifyEndRead() = 0;
95};
96
97/*---------------------------------------------------------------------------*/
98/*---------------------------------------------------------------------------*/
99
100} // namespace Arcane
101
102/*---------------------------------------------------------------------------*/
103/*---------------------------------------------------------------------------*/
104
105#endif
Declarations of Arcane's general types.
Checkpoint reading information.
Interface for the protection/recovery reading service (V2).
virtual void notifyEndRead()=0
Notifies the end of reading a protection.
virtual void notifyBeginRead(const CheckpointReadInfo &cri)=0
Notifies that a protection will be read with information from checkpoint_info.
virtual IDataReader2 * dataReader()=0
Returns the data reader associated with this protection reader.
virtual ~ICheckpointReader2()=default
Frees resources.
Interface for the protection/recovery reading service.
virtual String baseDirectoryName() const =0
Name of the protection base directory.
virtual void setFileName(const String &file_name)=0
Sets the name of the protection file.
virtual String fileName() const =0
Name of the protection file.
virtual void notifyBeginRead()=0
Notifies that a protection will be read with current parameters.
virtual ~ICheckpointReader()=default
Frees resources.
virtual void setCurrentTimeAndIndex(Real current_time, Integer current_index)=0
Sets the time and index of the protection to read.
virtual void setBaseDirectoryName(const String &dirname)=0
Sets the name of the protection base directory.
virtual void setReaderMetaData(const String &)=0
Metadata associated with this reader.
virtual void notifyEndRead()=0
Notifies that a protection has just been read.
virtual IDataReader * dataReader()=0
Returns the associated reader.
Interface for reading data of a variable (Version 2).
Interface for reading variable data.
Definition IDataReader.h:35
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
double Real
Type representing a real number.