Arcane  v3.15.0.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
IosFile.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/* IosFile.h (C) 2000-2024 */
9/* */
10/* Routines des Lecture/Ecriture d'un fichier. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_STD_INTERNAL_SERVICES_H
13#define ARCANE_STD_INTERNAL_SERVICES_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/Iostream.h"
18#include "arcane/utils/ArrayView.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
33{
34 public:
35
36 static const int IOS_BFR_SZE = 8192;
37
38 public:
39
40 IosFile(std::istream* stream)
41 : m_stream(stream)
42 {}
43 const char* getNextLine(const char*);
44 const char* getNextLine(void);
45 Real getReal(void);
46 Integer getInteger(void);
47 Int64 getInt64(void);
48 bool lookForString(const String& str);
49 void checkString(const String& current_value, const String& expected_value);
50 void checkString(const String& current_value, const String& expected_value1, const String& expected_value2);
51 static bool isEqualString(const String& current_value, const String& expected_value);
52 bool isEnd(void);
53 void readBytes(SmallSpan<std::byte> bytes);
54 void binaryRead(SmallSpan<Int32> values);
55 void binaryRead(SmallSpan<Int64> values);
56 void binaryRead(SmallSpan<Real3> values);
57 void binaryRead(SmallSpan<double> values);
58 void binaryRead(SmallSpan<Byte> values);
59
60 private:
61
62 std::istream* m_stream;
63 char m_buf[IOS_BFR_SZE];
64};
65
66/*---------------------------------------------------------------------------*/
67/*---------------------------------------------------------------------------*/
68
69} // namespace Arcane
70
71/*---------------------------------------------------------------------------*/
72/*---------------------------------------------------------------------------*/
73
74#endif
Routines des Lecture/Ecriture d'un fichier.
Definition IosFile.h:33
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:149
Chaîne de caractères unicode.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-