Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ICaseDocument.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/* ICaseDocument.h (C) 2000-2025 */
9/* */
10/* Interface of a class managing an XML document of the dataset. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_ICASEDOCUMENT_H
13#define ARCANE_CORE_ICASEDOCUMENT_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/core/XmlNodeList.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28class CaseNodeNames;
29class XmlNode;
31class CaseOptionError;
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
35
41{
42 public:
43
44 virtual ~ICaseDocumentFragment() = default;
45
46 public:
47
54
56 virtual XmlNode documentNode() = 0;
57
59 virtual XmlNode rootElement() = 0;
60
62 virtual String language() const = 0;
63
65 virtual String defaultCategory() const = 0;
66
69
70 public:
71
73 virtual void addError(const CaseOptionError& case_error) = 0;
74
76 virtual void addWarning(const CaseOptionError& case_error) = 0;
77
78 // Indicates if the dataset contains errors.
79 virtual bool hasError() const = 0;
80
81 // Indicates if the dataset contains warnings.
82 virtual bool hasWarnings() const = 0;
83
85 virtual void printErrors(std::ostream& o) = 0;
86
88 virtual void printWarnings(std::ostream& o) = 0;
89
91 virtual void clearErrorsAndWarnings() = 0;
92};
93
94/*---------------------------------------------------------------------------*/
95/*---------------------------------------------------------------------------*/
96
104{
105 public:
106
108 virtual void build() = 0;
109
111 virtual ICaseDocument* clone() = 0;
112
113 public:
114
117
119 virtual XmlNode arcaneElement() = 0;
120
123
127 virtual XmlNode titleElement() = 0;
131 virtual XmlNode modulesElement() = 0;
134
137
139 virtual const XmlNodeList& meshElements() = 0;
140
142 virtual XmlNode meshesElement() = 0;
143
145 virtual String userClass() const = 0;
147 virtual void setUserClass(const String& value) = 0;
148
150 virtual String codeName() const = 0;
152 virtual void setCodeName(const String& value) = 0;
153
155 virtual String codeVersion() const = 0;
157 virtual void setCodeVersion(const String& value) = 0;
158
160 virtual String codeUnitSystem() const = 0;
162 virtual void setCodeUnitSystem(const String& value) = 0;
163
165 virtual void setDefaultCategory(const String& v) = 0;
166
169};
170
171/*---------------------------------------------------------------------------*/
172/*---------------------------------------------------------------------------*/
173
174} // End namespace Arcane
175
176/*---------------------------------------------------------------------------*/
177/*---------------------------------------------------------------------------*/
178
179#endif
XML node names of an Arcane dataset.
Error in the dataset.
Interface of a part of a dataset.
virtual IXmlDocumentHolder * documentHolder()=0
Returns the XML document of the dataset. This pointer remains the property of this class and is destr...
virtual String defaultCategory() const =0
Category used for default values.
virtual CaseNodeNames * caseNodeNames()=0
Returns the instance containing the names of XML nodes by language.
virtual XmlNode rootElement()=0
Returns the root element.
virtual XmlNode documentNode()=0
Returns the document node.
virtual String language() const =0
Language used in the dataset.
virtual void printWarnings(std::ostream &o)=0
Writes the warnings to the stream o.
virtual void addError(const CaseOptionError &case_error)=0
Adds an error to the dataset.
virtual void clearErrorsAndWarnings()=0
Clears the recorded error and warning messages.
virtual void addWarning(const CaseOptionError &case_error)=0
Adds a warning to the dataset.
virtual void printErrors(std::ostream &o)=0
Writes the errors to the stream o.
Interface of a class managing an XML document of the dataset.
virtual XmlNode configurationElement()=0
Returns the configuration information element.
virtual ICaseDocument * clone()=0
Clones the document.
virtual XmlNode timeloopElement()=0
Returns the element containing the time loop choice.
virtual XmlNode meshesElement()=0
Element containing the list of meshes (new mechanism) (can be null).
virtual String codeUnitSystem() const =0
Name of the document's unit system.
virtual void setCodeVersion(const String &value)=0
Sets the version number of the code.
virtual XmlNode functionsElement()=0
Returns the root element of the functions.
virtual XmlNode titleElement()=0
Returns the element containing the case title.
virtual String codeName() const =0
Name of the case code.
virtual String codeVersion() const =0
Version number of the code corresponding to the case.
virtual XmlNode servicesElement()=0
Returns the element containing the service descriptions.
virtual const XmlNodeList & meshElements()=0
Returns the root element of the mesh information.
virtual void setUserClass(const String &value)=0
Sets the name of the case usage class.
virtual void setCodeName(const String &value)=0
Sets the name of the case code.
virtual String userClass() const =0
Name of the case usage class.
virtual XmlNode descriptionElement()=0
Returns the element containing the case description.
virtual void setDefaultCategory(const String &v)=0
Sets the category used for default values.
virtual XmlNode arcaneElement()=0
Returns the information element for Arcane.
virtual void setCodeUnitSystem(const String &value)=0
Sets the name of the document's unit system.
virtual ICaseDocumentFragment * fragment()=0
Fragment corresponding to this document.
virtual void build()=0
Constructs the instance.
virtual XmlNode modulesElement()=0
Returns the element containing the module descriptions.
virtual CaseNodeNames * caseNodeNames()=0
Returns the instance containing the names of XML nodes by language.
Manager of a DOM document.
List of nodes of a DOM tree.
Definition XmlNodeList.h:36
Node of a DOM tree.
Definition XmlNode.h:51
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --