Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IIOMng.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/* IIOMng.h (C) 2000-2025 */
9/* */
10/* Interface of the input-output manager. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IIOMNG_H
13#define ARCANE_CORE_IIOMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/String.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
36class ARCANE_CORE_EXPORT IIOMng
37{
38 public:
39
40 virtual ~IIOMng() = default;
41
42 public:
43
53 virtual IXmlDocumentHolder*
54 parseXmlFile(const String& filename, const String& schemaname = String{}) = 0;
55
65 virtual IXmlDocumentHolder* parseXmlFile(const String& filename,
66 const String& schemaname,
67 ConstArrayView<Byte> schema_data) = 0;
68
78 virtual IXmlDocumentHolder* parseXmlBuffer(Span<const Byte> buffer, const String& name) = 0;
79
90
100 virtual IXmlDocumentHolder* parseXmlString(const String& str, const String& name) = 0;
101
106 virtual bool writeXmlFile(IXmlDocumentHolder* doc, const String& filename, const bool indented = false) = 0;
107
122 virtual bool collectiveRead(const String& filename, ByteArray& bytes) = 0;
123
139 virtual bool collectiveRead(const String& filename, ByteArray& bytes, bool is_binary) = 0;
140
154 virtual bool localRead(const String& filename, ByteArray& bytes) = 0;
155
169 virtual bool localRead(const String& filename, ByteArray& bytes, bool is_binary) = 0;
170};
171
172/*---------------------------------------------------------------------------*/
173/*---------------------------------------------------------------------------*/
174
175} // namespace Arcane
176
177/*---------------------------------------------------------------------------*/
178/*---------------------------------------------------------------------------*/
179
180#endif
Declarations of Arcane's general types.
Constant view of an array of type T.
Interface of the input/output manager.
Definition IIOMng.h:37
virtual ~IIOMng()=default
Frees resources.
virtual bool writeXmlFile(IXmlDocumentHolder *doc, const String &filename, const bool indented=false)=0
Writes the XML tree of the document doc to the file filename.
virtual bool localRead(const String &filename, ByteArray &bytes, bool is_binary)=0
Local reading of a file.
virtual IXmlDocumentHolder * parseXmlFile(const String &filename, const String &schemaname, ConstArrayView< Byte > schema_data)=0
Reads and parses the XML file filename.
virtual IXmlDocumentHolder * parseXmlBuffer(Span< const std::byte > buffer, const String &name)=0
Reads and parses the XML file contained in the buffer buffer.
virtual bool localRead(const String &filename, ByteArray &bytes)=0
Local reading of a file.
virtual IXmlDocumentHolder * parseXmlFile(const String &filename, const String &schemaname=String{})=0
Reads and parses the XML file filename.
virtual bool collectiveRead(const String &filename, ByteArray &bytes, bool is_binary)=0
Collective reading of a file.
virtual bool collectiveRead(const String &filename, ByteArray &bytes)=0
Collective reading of a file.
virtual IXmlDocumentHolder * parseXmlString(const String &str, const String &name)=0
Reads and parses the XML file contained in the string str.
virtual IXmlDocumentHolder * parseXmlBuffer(Span< const Byte > buffer, const String &name)=0
Reads and parses the XML file contained in the buffer buffer.
Manager of a DOM document.
View of an array of elements of type T.
Definition Span.h:635
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Array< Byte > ByteArray
Dynamic one-dimensional array of characters.
Definition UtilsTypes.h:121