Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
CaseDatasetSource.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/* CaseDatasetSource.h (C) 2000-2025 */
9/* */
10/* Source of a case dataset. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_CASEDATASETSOURCE_H
13#define ARCANE_CORE_CASEDATASETSOURCE_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*!
29 * \brief Source of a case dataset.
30 *
31 * It is possible to set either the file name (setFileName()) or
32 * directly the content (setContent()).
33 *
34 * If content() is empty and fileName() is not null, the dataset
35 * will be read by %Arcane when the application starts.
36 */
37class ARCANE_CORE_EXPORT CaseDatasetSource
38{
39 class Impl;
40
41 public:
42
43 CaseDatasetSource();
44 CaseDatasetSource(const CaseDatasetSource& rhs);
45 CaseDatasetSource& operator=(const CaseDatasetSource& rhs);
46 ~CaseDatasetSource();
47
48 public:
49
50 //! Sets the file name of the dataset.
51 void setFileName(const String& name);
52 //! File name of the dataset
53 String fileName() const;
54 //! Sets the content of the dataset.
56 //! Sets the content of the dataset.
57 void setContent(Span<const Byte> bytes);
58 //! Content of the dataset.
59 ByteConstSpan content() const;
60
61 private:
62
63 Impl* m_p;
64};
65
66/*---------------------------------------------------------------------------*/
67/*---------------------------------------------------------------------------*/
68
69} // End namespace Arcane
70
71/*---------------------------------------------------------------------------*/
72/*---------------------------------------------------------------------------*/
73
74#endif
Declarations of Arcane's general types.
void setFileName(const String &name)
Sets the file name of the dataset.
String fileName() const
File name of the dataset.
void setContent(Span< const std::byte > bytes)
Sets the content of the dataset.
ByteConstSpan content() const
Content of the dataset.
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 --
Span< const std::byte > ByteConstSpan
Read-only view of a 1D array of characters.
Definition UtilsTypes.h:548