Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
TextReader.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2024 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/* TextReader.h (C) 2000-2024 */
9/* */
10/* Ecrivain de données. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_STD_TEXTREADER_H
13#define ARCANE_STD_TEXTREADER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18#include "arcane/utils/String.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25class IDataCompressor;
26}
27
28namespace Arcane::impl
29{
30
31/*---------------------------------------------------------------------------*/
32/*---------------------------------------------------------------------------*/
39{
40 class Impl;
41
42 public:
43
44 ARCANE_DEPRECATED_REASON("Y2024: This class is deprecated")
45 explicit TextReader(const String& filename);
46
47 TextReader(const TextReader& rhs) = delete;
49 TextReader& operator=(const TextReader& rhs) = delete;
50
51 public:
52
53 void read(Span<std::byte> values);
54 void readIntegers(Span<Integer> values);
55
56 public:
57
58 String fileName() const;
59 void setFileOffset(Int64 v);
60 void setDataCompressor(Ref<IDataCompressor> ds);
61 Ref<IDataCompressor> dataCompressor() const;
62 std::ifstream& stream();
63 Int64 fileLength() const;
64
65 public:
66
67 ARCANE_DEPRECATED_REASON("Y2023: Use read(Span<const std::byte>) instead")
68 void read(Span<Int16> values);
69 ARCANE_DEPRECATED_REASON("Y2023: Use read(Span<const std::byte>) instead")
70 void read(Span<Int32> values);
71 ARCANE_DEPRECATED_REASON("Y2023: Use read(Span<const std::byte>) instead")
72 void read(Span<Int64> values);
73 ARCANE_DEPRECATED_REASON("Y2023: Use read(Span<const std::byte>) instead")
74 void read(Span<Real> values);
75 ARCANE_DEPRECATED_REASON("Y2023: Use read(Span<const std::byte>) instead")
76 void read(Span<Byte> values);
77
78 private:
79
80 Impl* m_p;
81
82 private:
83
84 void _binaryRead(void* bytes, Int64 len);
85 void _checkStream(const char* type, Int64 nb_read_value);
86};
87
88/*---------------------------------------------------------------------------*/
89/*---------------------------------------------------------------------------*/
90
91} // End namespace Arcane::impl
92
93/*---------------------------------------------------------------------------*/
94/*---------------------------------------------------------------------------*/
95
96#endif
Déclarations des types utilisés dans Arcane.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Classe d'écriture d'un fichier texte pour les protections/reprises.
Definition TextReader.h:39
Chaîne de caractères unicode.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-