Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::CaseOptions Class Reference

Public Member Functions

 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 read (eCaseOptionReadPhase phase) override
 Performs the reading of the read_phase phase of the options.
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
void visit (ICaseDocumentVisitor *visitor) const override
 Applies the visitor to this option.
String xpathFullName () const override
 Full name in XPath format corresponding to rootElement().
Ref< ICaseOptionstoReference () override

Protected Member Functions

 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.

Protected Attributes

CaseOptionsPrivatem_p
 Implementation.

Friends

class ServiceBuilderWithOptionsBase
class CaseOptionMultiServiceImpl

Detailed Description

Definition at line 55 of file CaseOptions.h.

Constructor & Destructor Documentation

◆ CaseOptions() [1/6]

Arcane::CaseOptions::CaseOptions ( ICaseMng * cm,
const String & name )

Constructs an options set.

Definition at line 108 of file CaseOptions.cc.

References m_p, name(), and Arcane::ICaseMng::registerOptions().

◆ CaseOptions() [2/6]

Arcane::CaseOptions::CaseOptions ( ICaseOptionList * parent,
const String & name )

Constructs an options set.

Definition at line 120 of file CaseOptions.cc.

References m_p.

◆ CaseOptions() [3/6]

Arcane::CaseOptions::CaseOptions ( ICaseMng * cm,
const String & name,
const XmlNode & parent )

Constructs an options set.

Definition at line 131 of file CaseOptions.cc.

References m_p, and Arcane::ICaseMng::registerOptions().

◆ CaseOptions() [4/6]

Arcane::CaseOptions::CaseOptions ( ICaseOptionList * parent,
const String & name,
const XmlNode & parent,
bool is_optional = false,
bool is_multi = false )

Constructs an options set.

Definition at line 143 of file CaseOptions.cc.

References m_p.

◆ CaseOptions() [5/6]

Arcane::CaseOptions::CaseOptions ( ICaseMng * cm,
const String & name,
ICaseOptionList * parent )
protected

Constructs an options set.

Definition at line 158 of file CaseOptions.cc.

References m_p, and Arcane::ICaseMng::registerOptions().

◆ CaseOptions() [6/6]

Arcane::CaseOptions::CaseOptions ( ICaseOptionList * parent,
const String & name,
ICaseOptionList * parent )
protected

Constructs an options set.

Definition at line 170 of file CaseOptions.cc.

References m_p.

◆ ~CaseOptions()

Arcane::CaseOptions::~CaseOptions ( )
override

Frees resources.

Definition at line 199 of file CaseOptions.cc.

References m_p.

Member Function Documentation

◆ _setMeshHandleAndCheckDisabled()

bool Arcane::CaseOptions::_setMeshHandleAndCheckDisabled ( const String & mesh_name)
protected

Positions the mesh associated with this option.

If mesh_name is null or empty, the mesh associated with this option is that of the parent option. If the option has no parent, it is the default mesh.

If mesh_name is not null, there are two possibilities:

  • if the specified mesh exists, the option will be associated with that mesh
  • if it does not exist, the option is disabled and any potential child options will not be read. This latter case occurs, for example, if a service is associated with an additional mesh but that mesh is optional. In this case, the option must not be read.
Return values
trueif the option is disabled following this call.

Definition at line 433 of file CaseOptions.cc.

References Arcane::String::empty(), Arcane::IMeshMng::findMeshHandle(), m_p, and Arcane::MeshHandle::meshMng().

◆ _setTranslatedName()

void Arcane::CaseOptions::_setTranslatedName ( )
protected

Definition at line 459 of file CaseOptions.cc.

◆ activateFunction()

ICaseFunction * Arcane::CaseOptions::activateFunction ( )
overridevirtual

Function indicating the activation status of the option.

Implements Arcane::ICaseOptions.

Definition at line 493 of file CaseOptions.cc.

References m_p.

◆ addAlternativeNodeName()

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

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.

Implements Arcane::ICaseOptions.

Definition at line 262 of file CaseOptions.cc.

References m_p, and name().

◆ addInvalidChildren()

void Arcane::CaseOptions::addInvalidChildren ( XmlNodeList & nlist)
overridevirtual

Adds unrecognized elements to nlist.

Implements Arcane::ICaseOptions.

Definition at line 562 of file CaseOptions.cc.

References m_p.

◆ caseDocument()

ICaseDocument * Arcane::CaseOptions::caseDocument ( ) const
overridevirtual

Implements Arcane::ICaseOptions.

Definition at line 376 of file CaseOptions.cc.

◆ caseDocumentFragment()

ICaseDocumentFragment * Arcane::CaseOptions::caseDocumentFragment ( ) const
overridevirtual

Implements Arcane::ICaseOptions.

Definition at line 385 of file CaseOptions.cc.

◆ caseMng()

ICaseMng * Arcane::CaseOptions::caseMng ( ) const
overridevirtual

Implements Arcane::ICaseOptions.

Definition at line 331 of file CaseOptions.cc.

◆ caseModule()

IModule * Arcane::CaseOptions::caseModule ( ) const
overridevirtual

Returns the associated module or 0 if none exists.

Implements Arcane::ICaseOptions.

Definition at line 304 of file CaseOptions.cc.

References m_p.

◆ caseServiceInfo()

IServiceInfo * Arcane::CaseOptions::caseServiceInfo ( ) const
overridevirtual

Returns the associated service or 0 if none exists.

Implements Arcane::ICaseOptions.

Definition at line 295 of file CaseOptions.cc.

References m_p.

◆ configList() [1/2]

const ICaseOptionList * Arcane::CaseOptions::configList ( ) const
overridevirtual

Implements Arcane::ICaseOptions.

Definition at line 286 of file CaseOptions.cc.

◆ configList() [2/2]

ICaseOptionList * Arcane::CaseOptions::configList ( )
overridevirtual

Implements Arcane::ICaseOptions.

Definition at line 277 of file CaseOptions.cc.

◆ deepGetChildren()

void Arcane::CaseOptions::deepGetChildren ( Array< CaseOptionBase * > & col)
overridevirtual

Adds all child options to the list col.

Implements Arcane::ICaseOptions.

Definition at line 589 of file CaseOptions.cc.

References m_p.

◆ detach()

void Arcane::CaseOptions::detach ( )
overridevirtual

Implements Arcane::ICaseOptions.

Definition at line 214 of file CaseOptions.cc.

◆ isPresent()

bool Arcane::CaseOptions::isPresent ( ) const
overridevirtual

True if the option is present in the file, false if it is the default value.

Implements Arcane::ICaseOptions.

Definition at line 244 of file CaseOptions.cc.

References m_p.

◆ mesh()

IMesh * Arcane::CaseOptions::mesh ( ) const
overridevirtual

Implements Arcane::ICaseOptions.

Definition at line 367 of file CaseOptions.cc.

◆ meshHandle()

MeshHandle Arcane::CaseOptions::meshHandle ( ) const
overridevirtual

Implements Arcane::ICaseOptions.

Definition at line 358 of file CaseOptions.cc.

◆ name()

virtual String Arcane::CaseOptions::name ( ) const
inlinevirtual

Returns the name of the element in the data set language.

Definition at line 122 of file CaseOptions.h.

References rootTagName().

Referenced by addAlternativeNodeName(), and CaseOptions().

◆ printChildren()

void Arcane::CaseOptions::printChildren ( const String & lang,
int indent )
overridevirtual

Implements Arcane::ICaseOptions.

Definition at line 571 of file CaseOptions.cc.

◆ read() [1/2]

void Arcane::CaseOptions::read ( bool is_phase1)
inlineoverridevirtual

Implements Arcane::ICaseOptions.

Definition at line 124 of file CaseOptions.h.

◆ read() [2/2]

◆ rootTagName()

String Arcane::CaseOptions::rootTagName ( ) const
overridevirtual

Returns the name of the element in the data set language.

Implements Arcane::ICaseOptions.

Definition at line 235 of file CaseOptions.cc.

References m_p.

Referenced by name().

◆ rootTagTrueName()

String Arcane::CaseOptions::rootTagTrueName ( ) const
overridevirtual

Returns the true name (non-translated) of the element.

Implements Arcane::ICaseOptions.

Definition at line 226 of file CaseOptions.cc.

References m_p.

Referenced by trueName().

◆ setCaseModule()

void Arcane::CaseOptions::setCaseModule ( IModule * m)
overridevirtual

Associates module m with this data set.

Implements Arcane::ICaseOptions.

Definition at line 322 of file CaseOptions.cc.

References m_p.

◆ setCaseServiceInfo()

void Arcane::CaseOptions::setCaseServiceInfo ( IServiceInfo * m)
overridevirtual

Associates service m with this data set.

Implements Arcane::ICaseOptions.

Definition at line 313 of file CaseOptions.cc.

References m_p.

◆ subDomain()

ISubDomain * Arcane::CaseOptions::subDomain ( ) const
overridevirtual

Associated sub-domain.

Deprecated
Do not use this method because eventually an option may exist without a sub-domain.

Implements Arcane::ICaseOptions.

Definition at line 349 of file CaseOptions.cc.

References m_p.

◆ toReference()

Ref< ICaseOptions > Arcane::CaseOptions::toReference ( )
overridevirtual

Implements Arcane::ICaseOptions.

Definition at line 613 of file CaseOptions.cc.

◆ traceMng()

ITraceMng * Arcane::CaseOptions::traceMng ( ) const
overridevirtual

Implements Arcane::ICaseOptions.

Definition at line 340 of file CaseOptions.cc.

◆ translatedName()

String Arcane::CaseOptions::translatedName ( const String & lang) const
overridevirtual

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

Implements Arcane::ICaseOptions.

Definition at line 479 of file CaseOptions.cc.

References m_p, and Arcane::String::null().

◆ trueName()

virtual String Arcane::CaseOptions::trueName ( ) const
inlinevirtual

Returns the true name (non-translated) of the element.

Definition at line 119 of file CaseOptions.h.

References rootTagTrueName().

◆ visit()

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

Applies the visitor to this option.

Implements Arcane::ICaseOptions.

Reimplemented in Arcane::CaseOptionServiceImpl.

Definition at line 580 of file CaseOptions.cc.

References m_p.

Referenced by Arcane::CaseOptionServiceImpl::visit().

◆ xpathFullName()

String Arcane::CaseOptions::xpathFullName ( ) const
overridevirtual

Full name in XPath format corresponding to rootElement().

Implements Arcane::ICaseOptions.

Definition at line 253 of file CaseOptions.cc.

References m_p.

◆ CaseOptionMultiServiceImpl

friend class CaseOptionMultiServiceImpl
friend

Definition at line 190 of file CaseOptions.h.

◆ ServiceBuilderWithOptionsBase

friend class ServiceBuilderWithOptionsBase
friend

Definition at line 89 of file CaseOptions.h.

Member Data Documentation

◆ m_p


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