Arcane
v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
BasicReaderWriterDatabase.h
1
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2
//-----------------------------------------------------------------------------
3
// Copyright 2000-2023 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
/* BasicReaderWriterDatabase.h (C) 2000-2023 */
9
/* */
10
/* Base de donnée pour le service 'BasicReaderWriter'. */
11
/*---------------------------------------------------------------------------*/
12
#ifndef ARCANE_STD_BASICREADERWRITERDATABASE_H
13
#define ARCANE_STD_BASICREADERWRITERDATABASE_H
14
/*---------------------------------------------------------------------------*/
15
/*---------------------------------------------------------------------------*/
16
17
#include "
arcane/utils/UtilsTypes.h
"
18
#include "arcane/utils/String.h"
19
#include "arcane/utils/TraceAccessor.h"
20
21
/*---------------------------------------------------------------------------*/
22
/*---------------------------------------------------------------------------*/
23
24
// TODO: Lorsqu'on sera certain que ce fichier n'est pas utilisé en dehors
25
// de Arcane on pourra fusionner ces classes avec leur implémentation
26
27
namespace
Arcane
28
{
29
class
IDataCompressor;
30
class
IHashAlgorithm;
31
}
32
33
namespace
Arcane::impl
34
{
35
36
/*---------------------------------------------------------------------------*/
37
/*---------------------------------------------------------------------------*/
48
class
KeyValueTextWriter
49
:
public
TraceAccessor
50
{
51
class
Impl
;
52
53
public
:
54
55
KeyValueTextWriter
(
ITraceMng
*
tm
,
const
String
& filename, Int32 version);
56
KeyValueTextWriter
(
const
KeyValueTextWriter
&
rhs
) =
delete
;
57
~KeyValueTextWriter
();
58
KeyValueTextWriter
& operator=(
const
KeyValueTextWriter
&
rhs
) =
delete
;
59
60
public
:
61
62
void
setExtents(
const
String
&
key_name
,
SmallSpan<const Int64>
extents);
63
void
write(
const
String
& key,
Span<const std::byte>
values);
64
Int64 fileOffset();
65
66
public
:
67
68
String
fileName()
const
;
69
void
setDataCompressor(
Ref<IDataCompressor>
dc
);
70
Ref<IDataCompressor>
dataCompressor()
const
;
71
void
setHashAlgorithm(
Ref<IHashAlgorithm>
v);
72
Ref<IHashAlgorithm>
hashAlgorithm()
const
;
73
74
private
:
75
76
Impl
* m_p;
77
};
78
79
/*---------------------------------------------------------------------------*/
80
/*---------------------------------------------------------------------------*/
85
class
KeyValueTextReader
86
:
public
TraceAccessor
87
{
88
class
Impl
;
89
90
public
:
91
92
KeyValueTextReader
(
ITraceMng
*
tm
,
const
String
& filename, Int32 version);
93
KeyValueTextReader
(
const
KeyValueTextReader
&
rhs
) =
delete
;
94
~KeyValueTextReader
();
95
KeyValueTextReader
& operator=(
const
KeyValueTextReader
&
rhs
) =
delete
;
96
97
public
:
98
99
void
setFileOffset(Int64 v);
100
void
getExtents(
const
String
&
key_name
,
SmallSpan<Int64>
extents);
101
void
readIntegers(
const
String
& key,
Span<Integer>
values);
102
void
read(
const
String
& key,
Span<std::byte>
values);
103
104
public
:
105
106
String
fileName()
const
;
107
void
setDataCompressor(
Ref<IDataCompressor>
ds
);
108
Ref<IDataCompressor>
dataCompressor()
const
;
109
void
setHashAlgorithm(
Ref<IHashAlgorithm>
v);
110
Ref<IHashAlgorithm>
hashAlgorithm()
const
;
111
112
private
:
113
114
Impl
* m_p;
115
};
116
117
/*---------------------------------------------------------------------------*/
118
/*---------------------------------------------------------------------------*/
119
120
}
// End namespace Arcane::impl
121
122
/*---------------------------------------------------------------------------*/
123
/*---------------------------------------------------------------------------*/
124
125
#endif
UtilsTypes.h
Déclarations des types utilisés dans Arcane.
Arcane::LimaWrapper
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition
Lima.cc:120
Arcane::impl::KeyValueTextReader::Impl
Definition
BasicReaderWriterDatabase.cc:614
Arcane::impl::KeyValueTextReader
Classe d'écriture d'un fichier texte pour les protections/reprises.
Definition
BasicReaderWriterDatabase.h:87
Arcane::impl::KeyValueTextWriter::Impl
Definition
BasicReaderWriterDatabase.cc:302
Arcane::impl::KeyValueTextWriter
Definition
BasicReaderWriterDatabase.h:50
Arccore::ITraceMng
Interface du gestionnaire de traces.
Definition
arccore/src/trace/arccore/trace/ITraceMng.h:156
Arccore::String
Chaîne de caractères unicode.
Definition
arccore/src/base/arccore/base/String.h:70
Arccore::TraceAccessor
Classe d'accès aux traces.
Definition
arccore/src/trace/arccore/trace/TraceAccessor.h:39
Arcane
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Definition
AcceleratorGlobal.h:36
arcane
std
internal
BasicReaderWriterDatabase.h
Généré le Lundi 18 Novembre 2024 03:01:42 pour Arcane par
1.9.8