Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::CaseOptionMultiEnum Class Referenceabstract

Multi-enumeration data set option. More...

#include <arcane/core/CaseOptionEnum.h>

Inheritance diagram for Arcane::CaseOptionMultiEnum:
Collaboration diagram for Arcane::CaseOptionMultiEnum:

Public Member Functions

 CaseOptionMultiEnum (const CaseOptionBuildInfo &cob, const String &type_name)
virtual void print (const String &lang, std::ostream &o) const
 Prints the option value in the language lang, to the stream o.
virtual ICaseFunctionfunction () const
 Returns the function linked to this option or nullptr if none exists.
virtual void updateFromFunction (Real, Integer)
 Updates the option value from a function.
void addEnumValue (CaseOptionEnumValue *value, bool do_clone)
CaseOptionEnumValuesenumValues () const
virtual void visit (ICaseDocumentVisitor *visitor) const
 Applies the visitor to this option.
Public Member Functions inherited from Arcane::CaseOptionBase
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.
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.
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.
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.
void checkIsInitialized () const
 Throws an exception if the option has not been initialized.

Protected Member Functions

virtual void _search (bool is_phase1)
virtual bool _allowPhysicalUnit ()
virtual void _allocate (Integer size)=0
 Allocates an array for size elements.
virtual Integer _nbElem () const =0
 Returns the number of elements in the array.
virtual void _setOptionValue (Integer index, int v)=0
virtual int _optionValue (Integer index) const =0
 Returns the enumeration value for index index.
Protected Member Functions inherited from Arcane::CaseOptionBase
 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)
void _setIsInitialized ()
bool _isInitialized () const
void _checkIsInitialized () const
void _checkMinMaxOccurs (Integer nb_occur)
String _xpathFullName () const

Private Attributes

String m_type_name
 Enumeration name.
CaseOptionEnumValuesm_enum_values

Detailed Description

Multi-enumeration data set option.

Definition at line 287 of file CaseOptionEnum.h.

Constructor & Destructor Documentation

◆ CaseOptionMultiEnum()

Arcane::CaseOptionMultiEnum::CaseOptionMultiEnum ( const CaseOptionBuildInfo & cob,
const String & type_name )

Definition at line 356 of file CaseOptionEnum.cc.

◆ ~CaseOptionMultiEnum()

Arcane::CaseOptionMultiEnum::~CaseOptionMultiEnum ( )

Definition at line 367 of file CaseOptionEnum.cc.

Member Function Documentation

◆ _allocate()

virtual void Arcane::CaseOptionMultiEnum::_allocate ( Integer size)
protectedpure virtual

Allocates an array for size elements.

Implemented in Arcane::CaseOptionMultiEnumT< T >.

◆ _allowPhysicalUnit()

virtual bool Arcane::CaseOptionMultiEnum::_allowPhysicalUnit ( )
inlineprotectedvirtual

Definition at line 314 of file CaseOptionEnum.h.

◆ _nbElem()

virtual Integer Arcane::CaseOptionMultiEnum::_nbElem ( ) const
protectedpure virtual

Returns the number of elements in the array.

Implemented in Arcane::CaseOptionMultiEnumT< T >.

Referenced by print().

Here is the caller graph for this function:

◆ _optionValue()

virtual int Arcane::CaseOptionMultiEnum::_optionValue ( Integer index) const
protectedpure virtual

Returns the enumeration value for index index.

Implemented in Arcane::CaseOptionMultiEnumT< T >.

Referenced by print().

Here is the caller graph for this function:

◆ _search()

void Arcane::CaseOptionMultiEnum::_search ( bool is_phase1)
protectedvirtual

Implements Arcane::CaseOptionBase.

Definition at line 376 of file CaseOptionEnum.cc.

◆ _setOptionValue()

virtual void Arcane::CaseOptionMultiEnum::_setOptionValue ( Integer index,
int v )
protectedpure virtual

Sets the option value to the value v. v is directly converted to the enumeration value.

Implemented in Arcane::CaseOptionMultiEnumT< T >.

◆ addEnumValue()

void Arcane::CaseOptionMultiEnum::addEnumValue ( CaseOptionEnumValue * value,
bool do_clone )
inline

Definition at line 302 of file CaseOptionEnum.h.

◆ enumValues()

CaseOptionEnumValues * Arcane::CaseOptionMultiEnum::enumValues ( ) const
inline

Definition at line 307 of file CaseOptionEnum.h.

◆ function()

virtual ICaseFunction * Arcane::CaseOptionMultiEnum::function ( ) const
inlinevirtual

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

Implements Arcane::CaseOptionBase.

Definition at line 299 of file CaseOptionEnum.h.

◆ print()

void Arcane::CaseOptionMultiEnum::print ( const String & lang,
std::ostream & o ) const
virtual

Prints the option value in the language lang, to the stream o.

Implements Arcane::CaseOptionBase.

Definition at line 422 of file CaseOptionEnum.cc.

References _nbElem(), and _optionValue().

Here is the call graph for this function:

◆ updateFromFunction()

virtual void Arcane::CaseOptionMultiEnum::updateFromFunction ( Real current_time,
Integer current_iteration )
inlinevirtual

Updates the option value from a function.

If the option is not linked to a workflow table, it does nothing. Otherwise, it uses current_time or current_iteration depending on the function parameter type to calculate the new option value. This value will then be normally accessible via the operator() method.

Implements Arcane::CaseOptionBase.

Definition at line 300 of file CaseOptionEnum.h.

◆ visit()

void Arcane::CaseOptionMultiEnum::visit ( ICaseDocumentVisitor * visitor) const
virtual

Applies the visitor to this option.

Implements Arcane::CaseOptionBase.

Definition at line 434 of file CaseOptionEnum.cc.

Member Data Documentation

◆ m_enum_values

CaseOptionEnumValues* Arcane::CaseOptionMultiEnum::m_enum_values
private

Definition at line 330 of file CaseOptionEnum.h.

◆ m_type_name

String Arcane::CaseOptionMultiEnum::m_type_name
private

Enumeration name.

Definition at line 329 of file CaseOptionEnum.h.


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