Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::CaseOptionBase Class Referenceabstract

Base class for a data set option. More...

#include <arcane/core/CaseOptionBase.h>

Public Member Functions

String trueName () const
 Returns the true name (untranslated) of the 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 search (bool is_phase1)
 Retrieves the value from the configuration file for the variable.
virtual void print (const String &lang, std::ostream &o) const =0
 Prints the option value in the language lang, to the stream o.
ICaseMngcaseMng () const
 Case manager.
ICaseOptionListparentOptionList () const
 Parent OptionList.
ITraceMngtraceMng () const
 Trace manager.
ISubDomainsubDomain () const
 Sub-domain manager.
ICaseDocumentcaseDocument () const
 Returns the document manager.
ICaseDocumentFragmentcaseDocumentFragment () const
 Returns the document associated with this option.
void setRootElement (const XmlNode &root_element)
 Positions the root element at root_element.
XmlNode rootElement () const
 Returns the root element of the DOM.
virtual ICaseFunctionfunction () const =0
 Returns the function linked to this option or nullptr if none exists.
Integer minOccurs () const
 Minimum number of occurrences (for a multiple option).
Integer maxOccurs () const
 Maximum number of occurrences (for a multiple option) (-1 == unbounded).
bool isOptional () const
 Allows knowing if an option is optional.
virtual void updateFromFunction (Real current_time, Integer current_iteration)=0
 Updates the option value from a function.
void addAlternativeNodeName (const String &lang, const String &name)
 Adds a translation for the option name.
void addDefaultValue (const String &category, const String &value)
 Adds the default value value to the category category.
virtual void visit (ICaseDocumentVisitor *visitor) const =0
 Applies the visitor to this option.
void checkIsInitialized () const
 Throws an exception if the option has not been initialized.

Protected Member Functions

 CaseOptionBase (const CaseOptionBuildInfo &cob)
String _defaultValue () const
 Returns the default value of the option or 0 if none exists.
void _setDefaultValue (const String &def_value)
virtual void _search (bool is_phase1)=0
void _setIsInitialized ()
bool _isInitialized () const
void _checkIsInitialized () const
void _checkMinMaxOccurs (Integer nb_occur)
String _xpathFullName () const

Detailed Description

Base class for a data set option.

Links the option with the name m_name to the corresponding DOM node.

Definition at line 50 of file CaseOptionBase.h.

Constructor & Destructor Documentation

◆ CaseOptionBase()

Arcane::CaseOptionBase::CaseOptionBase ( const CaseOptionBuildInfo & cob)
protected

Definition at line 94 of file CaseOptionBase.cc.

◆ ~CaseOptionBase()

Arcane::CaseOptionBase::~CaseOptionBase ( )
virtual

Definition at line 104 of file CaseOptionBase.cc.

Member Function Documentation

◆ _checkIsInitialized()

void Arcane::CaseOptionBase::_checkIsInitialized ( ) const
protected

Definition at line 348 of file CaseOptionBase.cc.

◆ _checkMinMaxOccurs()

void Arcane::CaseOptionBase::_checkMinMaxOccurs ( Integer nb_occur)
protected

Definition at line 359 of file CaseOptionBase.cc.

◆ _defaultValue()

String Arcane::CaseOptionBase::_defaultValue ( ) const
protected

◆ _isInitialized()

bool Arcane::CaseOptionBase::_isInitialized ( ) const
protected

Definition at line 339 of file CaseOptionBase.cc.

◆ _search()

◆ _setDefaultValue()

void Arcane::CaseOptionBase::_setDefaultValue ( const String & def_value)
protected

Definition at line 176 of file CaseOptionBase.cc.

◆ _setIsInitialized()

void Arcane::CaseOptionBase::_setIsInitialized ( )
protected

Definition at line 330 of file CaseOptionBase.cc.

◆ _xpathFullName()

String Arcane::CaseOptionBase::_xpathFullName ( ) const
protected

Definition at line 400 of file CaseOptionBase.cc.

◆ addAlternativeNodeName()

void Arcane::CaseOptionBase::addAlternativeNodeName ( const String & lang,
const String & name )

Adds a translation for the option name.

Adds the option name name corresponding to the language lang. If a translation already exists for this language, it is replaced by this one.

Definition at line 312 of file CaseOptionBase.cc.

References name().

Referenced by updateFromFunction().

◆ addDefaultValue()

void Arcane::CaseOptionBase::addDefaultValue ( const String & category,
const String & value )

Adds the default value value to the category category.

Definition at line 321 of file CaseOptionBase.cc.

Referenced by updateFromFunction().

◆ caseDocument()

ICaseDocument * Arcane::CaseOptionBase::caseDocument ( ) const

Returns the document manager.

Definition at line 149 of file CaseOptionBase.cc.

References Arcane::ICaseMng::caseDocument(), and caseMng().

Referenced by print().

◆ caseDocumentFragment()

ICaseDocumentFragment * Arcane::CaseOptionBase::caseDocumentFragment ( ) const

◆ caseMng()

◆ checkIsInitialized()

void Arcane::CaseOptionBase::checkIsInitialized ( ) const
inline

Throws an exception if the option has not been initialized.

Definition at line 140 of file CaseOptionBase.h.

References checkIsInitialized().

Referenced by checkIsInitialized().

◆ function()

virtual ICaseFunction * Arcane::CaseOptionBase::function ( ) const
pure virtual

Returns the function linked to this option or nullptr if none exists.

Implemented in Arcane::CaseOptionExtended, Arcane::CaseOptionMultiEnum, Arcane::CaseOptionMultiExtended, Arcane::CaseOptionMultiSimpleT< T >, and Arcane::CaseOptionSimple.

References function(), isOptional(), maxOccurs(), and minOccurs().

Referenced by function().

◆ isOptional()

bool Arcane::CaseOptionBase::isOptional ( ) const

Allows knowing if an option is optional.

Definition at line 233 of file CaseOptionBase.cc.

Referenced by Arcane::CaseOptionMultiExtended::_search(), Arcane::CaseOptionMultiSimpleT< T >::_search(), and function().

◆ maxOccurs()

Integer Arcane::CaseOptionBase::maxOccurs ( ) const

Maximum number of occurrences (for a multiple option) (-1 == unbounded).

Definition at line 224 of file CaseOptionBase.cc.

Referenced by Arcane::CaseOptionMultiExtended::_search(), Arcane::CaseOptionMultiSimpleT< T >::_search(), and function().

◆ minOccurs()

Integer Arcane::CaseOptionBase::minOccurs ( ) const

Minimum number of occurrences (for a multiple option).

Definition at line 215 of file CaseOptionBase.cc.

Referenced by Arcane::CaseOptionMultiExtended::_search(), Arcane::CaseOptionMultiSimpleT< T >::_search(), and function().

◆ name()

◆ parentOptionList()

ICaseOptionList * Arcane::CaseOptionBase::parentOptionList ( ) const

Parent OptionList.

Definition at line 122 of file CaseOptionBase.cc.

Referenced by Arcane::CaseOptionExtended::_search(), Arcane::CaseOptionMultiExtended::_search(), and print().

◆ print()

◆ rootElement()

◆ search()

void Arcane::CaseOptionBase::search ( bool is_phase1)

Retrieves the value from the configuration file for the variable.

Definition at line 186 of file CaseOptionBase.cc.

◆ setRootElement()

void Arcane::CaseOptionBase::setRootElement ( const XmlNode & root_element)

Positions the root element at root_element.

Definition at line 294 of file CaseOptionBase.cc.

Referenced by print().

◆ subDomain()

ISubDomain * Arcane::CaseOptionBase::subDomain ( ) const

Sub-domain manager.

Definition at line 140 of file CaseOptionBase.cc.

Referenced by print().

◆ traceMng()

ITraceMng * Arcane::CaseOptionBase::traceMng ( ) const

◆ translatedName()

String Arcane::CaseOptionBase::translatedName ( const String & lang) const

Name of the option in the language lang. Returns name() if no translation exists.

Definition at line 280 of file CaseOptionBase.cc.

References Arcane::String::null().

◆ trueName()

String Arcane::CaseOptionBase::trueName ( ) const

Returns the true name (untranslated) of the option.

Definition at line 197 of file CaseOptionBase.cc.

◆ updateFromFunction()

virtual void Arcane::CaseOptionBase::updateFromFunction ( Real current_time,
Integer current_iteration )
pure virtual

◆ visit()

virtual void Arcane::CaseOptionBase::visit ( ICaseDocumentVisitor * visitor) const
pure virtual

The documentation for this class was generated from the following files: