Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ICaseMng.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/* ICaseMng.h (C) 2000-2025 */
9/* */
10/* Interface for the class managing the dataset. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_ICASEMNG_H
13#define ARCANE_CORE_ICASEMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
45
46/*---------------------------------------------------------------------------*/
47/*---------------------------------------------------------------------------*/
48
57{
59
60 public:
61
62 // TODO: make private (start 2024)
63 virtual ~ICaseMng() = default;
64
65 public:
66
68 virtual IApplication* application() = 0;
69
71 virtual ITraceMng* traceMng() = 0;
72
74 virtual IMeshMng* meshMng() const = 0;
75
77 virtual ISubDomain* subDomain() = 0;
78
81
84
87
89 virtual ICaseDocument* readCaseDocument(const String& filename, ByteConstArrayView bytes) = 0;
90
92 virtual void readOptions(bool is_phase1) = 0;
93
95 virtual void printOptions() = 0;
96
98 virtual void readFunctions() = 0;
99
100 public:
101
103 virtual void registerOptions(ICaseOptions*) = 0;
104
106 virtual void unregisterOptions(ICaseOptions*) = 0;
107
109 virtual CaseOptionsCollection blocks() const = 0;
110
111 public:
112
114 virtual ICaseFunction* findFunction(const String& name) const = 0;
115
121 virtual CaseFunctionCollection functions() = 0;
122
130 ARCCORE_DEPRECATED_2019("Use removeFunction(ICaseFunction*) instead.")
131 virtual void removeFunction(ICaseFunction* func, bool dofree) = 0;
132
139 virtual void removeFunction(ICaseFunction* func) = 0;
140
147 ARCCORE_DEPRECATED_2019("Use addFunction(Ref<ICaseFunction>) instead.")
148 virtual void addFunction(ICaseFunction* func) = 0;
149
155 virtual void addFunction(Ref<ICaseFunction> func) = 0;
156
170 virtual void updateOptions(Real current_time, Real current_deltat, Integer current_iteration) = 0;
171
176 virtual void setTreatWarningAsError(bool v) = 0;
177
182 virtual bool isTreatWarningAsError() const = 0;
183
185 virtual void setAllowUnkownRootElelement(bool v) = 0;
186
188 virtual bool isAllowUnkownRootElelement() const = 0;
189
196
197 public:
198
199 virtual Ref<ICaseMng> toReference() = 0;
200
201 public:
202
205};
206
207/*---------------------------------------------------------------------------*/
208/*---------------------------------------------------------------------------*/
209
210} // End namespace Arcane
211
212/*---------------------------------------------------------------------------*/
213/*---------------------------------------------------------------------------*/
214
215#endif
Declarations of Arcane's general types.
#define ARCCORE_DECLARE_REFERENCE_COUNTED_INCLASS_METHODS()
Macro to declare the virtual methods managing reference counters.
Application interface.
Interface of a part of a dataset.
Interface of a class managing an XML document of the dataset.
Interface of a dataset function.
Internal part of ICaseMng.
Case manager interface.
Definition ICaseMng.h:57
virtual void addFunction(ICaseFunction *func)=0
Adds the function func.
virtual IPhysicalUnitSystem * physicalUnitSystem() const =0
Associated unit system.
virtual ~ICaseMng()=default
Frees resources.
virtual ICaseMngInternal * _internalImpl()=0
Internal implementation.
virtual IMeshMng * meshMng() const =0
Associated mesh manager.
virtual ITraceMng * traceMng()=0
Trace manager.
virtual void setTreatWarningAsError(bool v)=0
Sets the way warnings are treated.
virtual bool isTreatWarningAsError() const =0
Indicates whether warnings in the dataset should be treated as errors and cause the code to stop.
virtual void printOptions()=0
Prints the option values.
virtual void removeFunction(ICaseFunction *func, bool dofree)=0
Deletes a function.
virtual void readFunctions()=0
Reads the dataset tables.
virtual ISubDomain * subDomain()=0
Sub-domain manager.
virtual ICaseDocument * readCaseDocument(const String &filename, ByteConstArrayView bytes)=0
Reads the XML document of the dataset.
virtual IApplication * application()=0
Associated application.
virtual IObservable * observable(eCaseMngEventType type)=0
Observable on the instance.
virtual CaseOptionsCollection blocks() const =0
Collection of option blocks.
virtual ICaseDocumentFragment * caseDocumentFragment()=0
Fragment of the XML Document associated with the dataset (can be null if no dataset).
virtual void readOptions(bool is_phase1)=0
Reads the dataset options corresponding to the used modules.
virtual void unregisterOptions(ICaseOptions *)=0
Unregisters a list of dataset options.
virtual CaseFunctionCollection functions()=0
Returns the list of tables.
virtual void setAllowUnkownRootElelement(bool v)=0
Sets the permission for unknown elements at the document root.
virtual void updateOptions(Real current_time, Real current_deltat, Integer current_iteration)=0
Updates the options based on a time-marching table.
virtual bool isAllowUnkownRootElelement() const =0
Indicates whether unknown elements at the document root are allowed.
virtual ICaseDocument * caseDocument()=0
XML document of the dataset (can be null if no dataset).
virtual ICaseFunction * findFunction(const String &name) const =0
Returns the function by name name or nullptr if none exists.
virtual void registerOptions(ICaseOptions *)=0
Registers a list of dataset options.
Interface for a list of data set options.
Mesh manager interface.
Definition IMeshMng.h:41
Interface of a unit system.
Interface of the subdomain manager.
Definition ISubDomain.h:75
Reference to an instance.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
eCaseMngEventType
Types of events supported by ICaseMng.
Definition ICaseMng.h:39
@ BeginReadOptionsPhase2
Event generated before reading options in phase 2.
Definition ICaseMng.h:43
@ BeginReadOptionsPhase1
Event generated before reading options in phase 1.
Definition ICaseMng.h:41
Int32 Integer
Type representing an integer.
Collection< ICaseOptions * > CaseOptionsCollection
Collection of dataset options.
double Real
Type representing a real number.
ConstArrayView< Byte > ByteConstArrayView
C equivalent of a 1D array of characters.
Definition UtilsTypes.h:476