Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ICheckpointWriter.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/* ICheckpointWriter.h (C) 2000-2025 */
9/* */
10/* Checkpoint/Recovery write service interface. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_ICHECKPOINTWRITER_H
13#define ARCANE_CORE_ICHECKPOINTWRITER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
49class ARCANE_CORE_EXPORT ICheckpointWriter
50{
51 public:
52
54 virtual ~ICheckpointWriter() = default;
55
56 public:
57
61 virtual IDataWriter* dataWriter() = 0;
62
64 virtual void notifyBeginWrite() = 0;
65
67 virtual void notifyEndWrite() = 0;
68
70 virtual void setFileName(const String& file_name) = 0;
71
73 virtual String fileName() const = 0;
74
76 virtual void setBaseDirectoryName(const String& dirname) = 0;
77
79 virtual String baseDirectoryName() const = 0;
80
85 virtual void setCheckpointTimes(RealConstArrayView times) = 0;
86
89
91 virtual void close() = 0;
92
94 virtual String readerServiceName() const = 0;
95
97 virtual String readerMetaData() const = 0;
98};
99
100/*---------------------------------------------------------------------------*/
101/*---------------------------------------------------------------------------*/
102
103} // namespace Arcane
104
105/*---------------------------------------------------------------------------*/
106/*---------------------------------------------------------------------------*/
107
108#endif
Declarations of Arcane's general types.
Constant view of an array of type T.
Interface of the checkpoint/recovery write service.
virtual ConstArrayView< Real > checkpointTimes() const =0
Checkpoint times.
virtual void setBaseDirectoryName(const String &dirname)=0
Sets the name of the checkpoint base directory.
virtual String readerServiceName() const =0
Name of the reader service associated with this writer.
virtual void close()=0
Closes the checkpoints.
virtual String readerMetaData() const =0
Metadata for the reader associated with this writer.
virtual void setCheckpointTimes(RealConstArrayView times)=0
Sets the checkpoint times.
virtual String baseDirectoryName() const =0
Name of the checkpoint base directory.
virtual String fileName() const =0
Name of the checkpoint file.
virtual void notifyEndWrite()=0
Notifies that a checkpoint has just been written.
virtual ~ICheckpointWriter()=default
Releases resources.
virtual void notifyBeginWrite()=0
Notifies that a checkpoint is going to be written with the current parameters.
virtual IDataWriter * dataWriter()=0
Returns the associated writer.
virtual void setFileName(const String &file_name)=0
Sets the name of the checkpoint file.
Interface for writing variable data.
Definition IDataWriter.h:45
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
ConstArrayView< Real > RealConstArrayView
C equivalent of a 1D array of reals.
Definition UtilsTypes.h:488