Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IDataReader.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/* IDataReader.h (C) 2000-2025 */
9/* */
10/* Interface for reading variable data. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IDATAREADER_H
13#define ARCANE_CORE_IDATAREADER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*!
29 * \ingroup IO
30 * \brief Interface for reading variable data.
31 *
32 * \sa IDataWriter
33 */
34class ARCANE_CORE_EXPORT IDataReader
35{
36 public:
37
38 //! Frees resources
39 virtual ~IDataReader() = default;
40
41 public:
42
43 virtual void beginRead(const VariableCollection& vars) = 0;
44 virtual void endRead() = 0;
45
46 public:
47
48 //! Metadata
49 virtual String metaData() = 0;
50
51 public:
52
53 //! Reads the data \a data of the variable \a var
54 virtual void read(IVariable* var, IData* data) = 0;
55};
56
57/*---------------------------------------------------------------------------*/
58/*---------------------------------------------------------------------------*/
59
60} // namespace Arcane
61
62/*---------------------------------------------------------------------------*/
63/*---------------------------------------------------------------------------*/
64
65#endif
Declarations of Arcane's general types.
Interface for reading variable data.
Definition IDataReader.h:35
virtual String metaData()=0
Metadata.
virtual ~IDataReader()=default
Frees resources.
virtual void read(IVariable *var, IData *data)=0
Reads the data data of the variable var.
Interface of a data item.
Definition IData.h:34
Interface of a variable.
Definition IVariable.h:40
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --