Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::CaseOptionServiceImpl Class Reference

Base class for implementing options using services. More...

#include <arcane/core/CaseOptionServiceImpl.h>

Inheritance diagram for Arcane::CaseOptionServiceImpl:
Collaboration diagram for Arcane::CaseOptionServiceImpl:

Public Member Functions

 CaseOptionServiceImpl (const CaseOptionBuildInfo &cob, bool allow_null, bool is_optional)
void read (eCaseOptionReadPhase phase) override
 Performs the reading of the read_phase phase of the options.
String serviceName () const
bool isOptional () const
virtual void getAvailableNames (StringArray &names) const
 Returns the valid implementation names for this service in names.
void visit (ICaseDocumentVisitor *visitor) const override
 Applies the visitor to this option.
void setDefaultValue (const String &def_value)
void addDefaultValue (const String &category, const String &value)
void setContainer (ICaseOptionServiceContainer *container)
 Positions the instance container.
void setMeshName (const String &mesh_name)
String meshName () const
Public Member Functions inherited from Arcane::CaseOptions
 CaseOptions (ICaseMng *cm, const String &name)
 Constructs an options set.
 CaseOptions (ICaseOptionList *, const String &name)
 Constructs an options set.
 CaseOptions (ICaseMng *cm, const String &name, const XmlNode &parent)
 Constructs an options set.
 CaseOptions (ICaseOptionList *, const String &name, const XmlNode &parent, bool is_optional=false, bool is_multi=false)
 Constructs an options set.
 ~CaseOptions () override
 Frees resources.
String rootTagTrueName () const override
 Returns the true name (non-translated) of the element.
String rootTagName () const override
 Returns the name of the element in the data set language.
String translatedName (const String &lang) const override
 Name in language lang of the option. Returns rootTagTrueName() if no translation exists.
virtual String trueName () const
 Returns the true name (non-translated) of the element.
virtual String name () const
 Returns the name of the element in the data set language.
void read (bool is_phase1) override
void addInvalidChildren (XmlNodeList &) override
 Adds unrecognized elements to nlist.
void printChildren (const String &lang, int indent) override
IServiceInfocaseServiceInfo () const override
 Returns the associated service or 0 if none exists.
IModulecaseModule () const override
 Returns the associated module or 0 if none exists.
void setCaseServiceInfo (IServiceInfo *m) override
 Associates service m with this data set.
void setCaseModule (IModule *m) override
 Associates module m with this data set.
void deepGetChildren (Array< CaseOptionBase * > &col) override
 Adds all child options to the list col.
ICaseOptionListconfigList () override
const ICaseOptionListconfigList () const override
ICaseFunctionactivateFunction () override
 Function indicating the activation status of the option.
bool isPresent () const override
 True if the option is present in the file, false if it is the default value.
void addAlternativeNodeName (const String &lang, const String &name) override
 Adds a translation for the option name. Adds the option name name corresponding to language lang. If a translation already exists for this language, it is replaced by this one.
ICaseMngcaseMng () const override
ITraceMngtraceMng () const override
ISubDomainsubDomain () const override
 Associated sub-domain.
IMeshmesh () const override
MeshHandle meshHandle () const override
ICaseDocumentcaseDocument () const override
ICaseDocumentFragmentcaseDocumentFragment () const override
void detach () override
String xpathFullName () const override
 Full name in XPath format corresponding to rootElement().
Ref< ICaseOptionstoReference () override

Protected Member Functions

virtual void print (const String &lang, std::ostream &o) const
String _defaultValue () const
Protected Member Functions inherited from Arcane::CaseOptions
 CaseOptions (ICaseMng *, const String &name, ICaseOptionList *parent)
 Constructs an options set.
 CaseOptions (ICaseOptionList *, const String &name, ICaseOptionList *parent)
 Constructs an options set.
void _setTranslatedName ()
bool _setMeshHandleAndCheckDisabled (const String &mesh_name)
 Positions the mesh associated with this option.

Private Member Functions

void _readPhase1 ()

Private Attributes

String m_name
String m_default_value
String m_service_name
String m_mesh_name
XmlNode m_element
 Option element.
bool m_allow_null
bool m_is_optional
bool m_is_override_default
StringDictionary m_default_values
 List of default values by category.
ICaseOptionServiceContainerm_container

Additional Inherited Members

Protected Attributes inherited from Arcane::CaseOptions
CaseOptionsPrivatem_p
 Implementation.

Detailed Description

Base class for implementing options using services.

This class is internal to Arcane. The class to use is 'CaseOptionService'.

Definition at line 67 of file CaseOptionServiceImpl.h.

Constructor & Destructor Documentation

◆ CaseOptionServiceImpl()

Arcane::CaseOptionServiceImpl::CaseOptionServiceImpl ( const CaseOptionBuildInfo & cob,
bool allow_null,
bool is_optional )

Definition at line 127 of file CaseOptionService.cc.

Member Function Documentation

◆ _defaultValue()

String Arcane::CaseOptionServiceImpl::_defaultValue ( ) const
inlineprotected

Definition at line 104 of file CaseOptionServiceImpl.h.

◆ _readPhase1()

void Arcane::CaseOptionServiceImpl::_readPhase1 ( )
private

Definition at line 173 of file CaseOptionService.cc.

◆ addDefaultValue()

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

Definition at line 315 of file CaseOptionService.cc.

◆ getAvailableNames()

void Arcane::CaseOptionServiceImpl::getAvailableNames ( StringArray & names) const
virtual

Returns the valid implementation names for this service in names.

Definition at line 324 of file CaseOptionService.cc.

◆ isOptional()

bool Arcane::CaseOptionServiceImpl::isOptional ( ) const
inline

Definition at line 78 of file CaseOptionServiceImpl.h.

◆ meshName()

String Arcane::CaseOptionServiceImpl::meshName ( ) const
inline

Definition at line 96 of file CaseOptionServiceImpl.h.

◆ print()

void Arcane::CaseOptionServiceImpl::print ( const String & lang,
std::ostream & o ) const
protectedvirtual

Definition at line 143 of file CaseOptionService.cc.

◆ read()

void Arcane::CaseOptionServiceImpl::read ( eCaseOptionReadPhase read_phase)
overridevirtual

Performs the reading of the read_phase phase of the options.

Reimplemented from Arcane::CaseOptions.

Definition at line 289 of file CaseOptionService.cc.

◆ serviceName()

String Arcane::CaseOptionServiceImpl::serviceName ( ) const
inline

Definition at line 77 of file CaseOptionServiceImpl.h.

◆ setContainer()

void Arcane::CaseOptionServiceImpl::setContainer ( ICaseOptionServiceContainer * container)

Positions the instance container.

container remains the property of the caller, who must manage its lifetime.

Definition at line 164 of file CaseOptionService.cc.

◆ setDefaultValue()

void Arcane::CaseOptionServiceImpl::setDefaultValue ( const String & def_value)

Definition at line 300 of file CaseOptionService.cc.

◆ setMeshName()

void Arcane::CaseOptionServiceImpl::setMeshName ( const String & mesh_name)
inline

Definition at line 95 of file CaseOptionServiceImpl.h.

◆ visit()

void Arcane::CaseOptionServiceImpl::visit ( ICaseDocumentVisitor * visitor) const
overridevirtual

Applies the visitor to this option.

Reimplemented from Arcane::CaseOptions.

Definition at line 153 of file CaseOptionService.cc.

References Arcane::CaseOptions::visit().

Here is the call graph for this function:

Member Data Documentation

◆ m_allow_null

bool Arcane::CaseOptionServiceImpl::m_allow_null
private

Definition at line 113 of file CaseOptionServiceImpl.h.

◆ m_container

ICaseOptionServiceContainer* Arcane::CaseOptionServiceImpl::m_container
private

Definition at line 118 of file CaseOptionServiceImpl.h.

◆ m_default_value

String Arcane::CaseOptionServiceImpl::m_default_value
private

Definition at line 109 of file CaseOptionServiceImpl.h.

◆ m_default_values

StringDictionary Arcane::CaseOptionServiceImpl::m_default_values
private

List of default values by category.

Definition at line 117 of file CaseOptionServiceImpl.h.

◆ m_element

XmlNode Arcane::CaseOptionServiceImpl::m_element
private

Option element.

Definition at line 112 of file CaseOptionServiceImpl.h.

◆ m_is_optional

bool Arcane::CaseOptionServiceImpl::m_is_optional
private

Definition at line 114 of file CaseOptionServiceImpl.h.

◆ m_is_override_default

bool Arcane::CaseOptionServiceImpl::m_is_override_default
private

Definition at line 115 of file CaseOptionServiceImpl.h.

◆ m_mesh_name

String Arcane::CaseOptionServiceImpl::m_mesh_name
private

Definition at line 111 of file CaseOptionServiceImpl.h.

◆ m_name

String Arcane::CaseOptionServiceImpl::m_name
private

Definition at line 108 of file CaseOptionServiceImpl.h.

◆ m_service_name

String Arcane::CaseOptionServiceImpl::m_service_name
private

Definition at line 110 of file CaseOptionServiceImpl.h.


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