12#ifndef ARCANE_CASEOPTIONBASE_H
13#define ARCANE_CASEOPTIONBASE_H
17#include "arcane/utils/String.h"
19#include "arcane/core/XmlNode.h"
50class ARCANE_CORE_EXPORT CaseOptionBase
58 virtual ~CaseOptionBase();
72 void search(
bool is_phase1);
75 virtual void print(
const String& lang, std::ostream& o)
const = 0;
87 ARCCORE_DEPRECATED_2019(
"Do not use subDomain(). Try to get subDomain from an other way.")
91 ARCANE_DEPRECATED_REASON(
"Y2023: use caseMng()->caseDocument() instead.")
145 String _defaultValue()
const;
147 void _setDefaultValue(
const String& def_value);
151 virtual void _search(
bool is_phase1) = 0;
152 void _setIsInitialized();
153 bool _isInitialized()
const;
154 void _checkIsInitialized()
const;
155 void _checkMinMaxOccurs(
Integer nb_occur);
156 String _xpathFullName()
const;
164 void _setTranslatedName();
165 void _setCategoryDefaultValue();
173 CaseOptionBase&
operator=(
const CaseOptionBase& from) =
delete;
Implementation of the base class for a data set option.
String name() const
Returns the option name corresponding to the data set language.
String translatedName(const String &lang) const
Name of the option in the language lang. Returns name() if no translation exists.
void addDefaultValue(const String &category, const String &value)
Adds the default value value to the category category.
CaseOptionBase(const CaseOptionBase &from)=delete
Copy constructor.
ICaseDocument * caseDocument() const
Returns the document manager.
virtual void visit(ICaseDocumentVisitor *visitor) const =0
Applies the visitor to this option.
void search(bool is_phase1)
Retrieves the value from the configuration file for the variable.
void checkIsInitialized() const
Throws an exception if the option has not been initialized.
ICaseMng * caseMng() const
Case manager.
ICaseDocumentFragment * caseDocumentFragment() const
Returns the document associated with this option.
void addAlternativeNodeName(const String &lang, const String &name)
Adds a translation for the option name.
void setRootElement(const XmlNode &root_element)
Positions the root element at root_element.
bool isOptional() const
Allows knowing if an option is optional.
Integer maxOccurs() const
Maximum number of occurrences (for a multiple option) (-1 == unbounded).
XmlNode rootElement() const
Returns the root element of the DOM.
virtual ICaseFunction * function() const =0
Returns the function linked to this option or nullptr if none exists.
virtual void updateFromFunction(Real current_time, Integer current_iteration)=0
Updates the option value from a function.
ITraceMng * traceMng() const
Trace manager.
CaseOptionBasePrivate * m_p
Implementation.
ISubDomain * subDomain() const
Sub-domain manager.
String trueName() const
Returns the true name (untranslated) of the option.
ICaseOptionList * parentOptionList() const
Parent OptionList.
Integer minOccurs() const
Minimum number of occurrences (for a multiple option).
virtual void print(const String &lang, std::ostream &o) const =0
Prints the option value in the language lang, to the stream o.
CaseOptionBase & operator=(const CaseOptionBase &from)=delete
Copy assignment operator.
Information for building a dataset option.
Interface of a part of a dataset.
Visitor interface for a dataset option.
Interface of a class managing an XML document of the dataset.
Interface of a dataset function.
Interface for a data set options list.
Interface of the subdomain manager.
Unicode character string.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
double Real
Type representing a real number.