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

List of configuration options for a service or module. More...

Inheritance diagram for Arcane::CaseOptionList:
Collaboration diagram for Arcane::CaseOptionList:

Classes

class  InternalApi

Public Types

typedef std::pair< CaseOptionBase *, XmlNodeCaseOptionBasePair
typedef std::vector< CaseOptionBasePair > CaseOptionBasePairList

Public Member Functions

 CaseOptionList (ICaseMng *m, ICaseOptions *ref_opt, XmlNode parent_element)
 CaseOptionList (ICaseOptionList *parent, ICaseOptions *ref_opt, XmlNode parent_element)
XmlNode rootElement () const override
 Returns the element associated with this options list.
XmlNode parentElement () const override
 Returns the parent element.
ICaseMngcaseMng () const override
 Returns the case manager.
void addConfig (CaseOptionBase *cbi, XmlNode parent) override
 Adds option o with parent parent.
void addChild (ICaseOptions *c) override
 Adds the list co to the list of children.
void removeChild (ICaseOptions *c) override
 Removes co from the list of children.
void readChildren (bool is_phase1) override
 Reads the option values from the DOM elements.
void printChildren (const String &lang, int indent) override
 Displays the list of child options in language lang and their value.
void visit (ICaseDocumentVisitor *visitor) override
 Applies the visitor visitor.
void addInvalidChildren (XmlNodeList &nlist) override
 Adds child elements that do not correspond to options in nlist.
void deepGetChildren (Array< CaseOptionBase * > &col) override
 Adds all child options to the list col.
String rootTagName () const override
 Returns the name of the element of this list.
bool isOptional () const override
 Indicates if the option is optional.
void setOptional (bool v)
Integer minOccurs () const override
 Minimum number of occurrences.
Integer maxOccurs () const override
 Maximum number of occurrences.
void setRootElementWithParent (XmlNode parent_element) override
 Positions the root element of the list, with parent_element as parent. If already positioned, does nothing.
void setRootElement (XmlNode root_element) override
 Positions the root element of the list. If already positioned, throws an exception.
bool isPresent () const override
 Indicates if the option is present in the data set.
void setIsMulti (bool v)
 Indicates if the option can be present multiple times.
String xpathFullName () const override
 Full name in XPath format corresponding to rootElement().
MeshHandle meshHandle () const override
 Handle of the associated mesh.
ICaseDocumentFragmentcaseDocumentFragment () const override
 Associated document.
void disable () override
 Disables the option as if it were absent.
virtual ICaseOptionListInternal_internalApi () override
 Internal Arcane API.
Public Member Functions inherited from Arcane::TraceAccessor
 TraceAccessor (ITraceMng *m)
 Constructs an accessor via the trace manager m.
 TraceAccessor (const TraceAccessor &rhs)
 Copy constructor.
TraceAccessoroperator= (const TraceAccessor &rhs)
 Copy assignment operator.
virtual ~TraceAccessor ()
 Frees resources.
ITraceMngtraceMng () const
 Trace manager.
TraceMessage info () const
 Flow for an information message.
TraceMessage pinfo () const
 Flow for a parallel information message.
TraceMessage info (char category) const
 Flow for an information message of a given category.
TraceMessage pinfo (char category) const
 Flow for a parallel information message of a given category.
TraceMessage info (bool v) const
 Flow for an information message.
TraceMessage warning () const
 Flow for a warning message.
TraceMessage pwarning () const
TraceMessage error () const
 Flow for an error message.
TraceMessage perror () const
TraceMessage log () const
 Flow for a log message.
TraceMessage plog () const
 Flow for a log message.
TraceMessage logdate () const
 Flow for a log message preceded by the date.
TraceMessage fatal () const
 Flow for a fatal error message.
TraceMessage pfatal () const
 Flow for a parallel fatal error message.
TraceMessageDbg debug (Trace::eDebugLevel=Trace::Medium) const
 Flow for a debug message.
Trace::eDebugLevel configDbgLevel () const
 Debug level of the configuration file.
TraceMessage info (Int32 verbose_level) const
 Flow for an information message of a given level.
TraceMessage linfo () const
 Flow for an information message with the local information level of this instance.
TraceMessage linfo (Int32 relative_level) const
 Flow for an information message with the local information level of this instance.
void fatalMessage (const StandaloneTraceMessage &o) const
Public Member Functions inherited from Arcane::ReferenceCounterImpl
void addReference ()
void removeReference ()
void _internalAddReference ()
bool _internalRemoveReference ()

Protected Member Functions

void _addInvalidChildren (XmlNode parent, XmlNodeList &nlist)
void _searchChildren (bool is_phase1)
void _setRootElement (bool force_init, XmlNode parent_element)
void _strIndent (char *buf, int indent, int max_indent)
void _printOption (const String &lang, int indent, CaseOptionBase *co, std::ostream &o)
bool _isValidChildTagName (const String &name)
Protected Member Functions inherited from Arcane::TraceAccessor
void _setLocalVerboseLevel (Int32 v)
Int32 _localVerboseLevel () const

Protected Attributes

ICaseMngm_case_mng
XmlNode m_root_element
 Root element for this option list.
ICaseOptionListm_parent
ICaseOptionsm_ref_opt
CaseOptionBasePairList m_config_list
 List of configuration values.
std::vector< ICaseOptions * > m_case_options
XmlNode m_parent_element
 Parent element.
bool m_is_present
bool m_is_multi
bool m_is_optional
bool m_is_disabled = false
InternalApi m_internal_api

Private Member Functions

 ARCCORE_DEFINE_REFERENCE_COUNTED_INCLASS_METHODS ()

Detailed Description

List of configuration options for a service or module.

Definition at line 108 of file CaseOptionList.cc.

Member Typedef Documentation

◆ CaseOptionBasePair

typedef std::pair<CaseOptionBase*, XmlNode> Arcane::CaseOptionList::CaseOptionBasePair

Definition at line 153 of file CaseOptionList.cc.

◆ CaseOptionBasePairList

typedef std::vector<CaseOptionBasePair> Arcane::CaseOptionList::CaseOptionBasePairList

Definition at line 154 of file CaseOptionList.cc.

Constructor & Destructor Documentation

◆ CaseOptionList() [1/2]

Arcane::CaseOptionList::CaseOptionList ( ICaseMng * m,
ICaseOptions * ref_opt,
XmlNode parent_element )
inline

Definition at line 156 of file CaseOptionList.cc.

◆ CaseOptionList() [2/2]

Arcane::CaseOptionList::CaseOptionList ( ICaseOptionList * parent,
ICaseOptions * ref_opt,
XmlNode parent_element )
inline

Definition at line 168 of file CaseOptionList.cc.

◆ ~CaseOptionList()

Arcane::CaseOptionList::~CaseOptionList ( )
inline

Definition at line 181 of file CaseOptionList.cc.

Member Function Documentation

◆ _addInvalidChildren()

void Arcane::CaseOptionList::_addInvalidChildren ( XmlNode parent,
XmlNodeList & nlist )
protected

Definition at line 540 of file CaseOptionList.cc.

◆ _internalApi()

virtual ICaseOptionListInternal * Arcane::CaseOptionList::_internalApi ( )
inlineoverridevirtual

Internal Arcane API.

Implements Arcane::ICaseOptionList.

Definition at line 293 of file CaseOptionList.cc.

◆ _isValidChildTagName()

bool Arcane::CaseOptionList::_isValidChildTagName ( const String & name)
protected

Definition at line 521 of file CaseOptionList.cc.

◆ _printOption()

void Arcane::CaseOptionList::_printOption ( const String & lang,
int indent,
CaseOptionBase * co,
std::ostream & o )
protected

Definition at line 501 of file CaseOptionList.cc.

◆ _searchChildren()

void Arcane::CaseOptionList::_searchChildren ( bool is_phase1)
protected

Definition at line 425 of file CaseOptionList.cc.

◆ _setRootElement()

void Arcane::CaseOptionList::_setRootElement ( bool force_init,
XmlNode parent_element )
protected

Definition at line 441 of file CaseOptionList.cc.

◆ _strIndent()

void Arcane::CaseOptionList::_strIndent ( char * buf,
int indent,
int max_indent )
protected

Definition at line 485 of file CaseOptionList.cc.

◆ addChild()

void Arcane::CaseOptionList::addChild ( ICaseOptions * co)
inlineoverridevirtual

Adds the list co to the list of children.

Implements Arcane::ICaseOptionList.

Definition at line 201 of file CaseOptionList.cc.

References Arcane::TraceAccessor::info(), and Arcane::ICaseOptions::rootTagName().

Here is the call graph for this function:

◆ addConfig()

void Arcane::CaseOptionList::addConfig ( CaseOptionBase * o,
XmlNode parent )
inlineoverridevirtual

Adds option o with parent parent.

Implements Arcane::ICaseOptionList.

Definition at line 196 of file CaseOptionList.cc.

References m_config_list.

◆ addInvalidChildren()

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

Adds child elements that do not correspond to options in nlist.

Implements Arcane::ICaseOptionList.

Reimplemented in Arcane::CaseOptionListMulti.

Definition at line 405 of file CaseOptionList.cc.

References Arcane::TraceAccessor::info(), m_parent_element, and m_root_element.

Here is the call graph for this function:

◆ caseDocumentFragment()

ICaseDocumentFragment * Arcane::CaseOptionList::caseDocumentFragment ( ) const
inlineoverridevirtual

Associated document.

Implements Arcane::ICaseOptionList.

Definition at line 276 of file CaseOptionList.cc.

Referenced by readChildren().

Here is the caller graph for this function:

◆ caseMng()

ICaseMng * Arcane::CaseOptionList::caseMng ( ) const
inlineoverridevirtual

Returns the case manager.

Implements Arcane::ICaseOptionList.

Definition at line 195 of file CaseOptionList.cc.

◆ deepGetChildren()

void Arcane::CaseOptionList::deepGetChildren ( Array< CaseOptionBase * > & col)
inlineoverridevirtual

Adds all child options to the list col.

Implements Arcane::ICaseOptionList.

Reimplemented in Arcane::CaseOptionListMulti.

Definition at line 223 of file CaseOptionList.cc.

References Arcane::Array< T >::add(), and m_config_list.

Here is the call graph for this function:

◆ disable()

void Arcane::CaseOptionList::disable ( )
inlineoverridevirtual

Disables the option as if it were absent.

This is used, for example, if the option is associated with a mesh that is not defined.

Implements Arcane::ICaseOptionList.

Definition at line 283 of file CaseOptionList.cc.

References Arcane::TraceAccessor::info(), and m_root_element.

Here is the call graph for this function:

◆ isOptional()

bool Arcane::CaseOptionList::isOptional ( ) const
inlineoverridevirtual

Indicates if the option is optional.

Implements Arcane::ICaseOptionList.

Reimplemented in Arcane::CaseOptionListMulti.

Definition at line 233 of file CaseOptionList.cc.

Referenced by printChildren(), and visit().

Here is the caller graph for this function:

◆ isPresent()

bool Arcane::CaseOptionList::isPresent ( ) const
inlineoverridevirtual

Indicates if the option is present in the data set.

Implements Arcane::ICaseOptionList.

Definition at line 252 of file CaseOptionList.cc.

◆ maxOccurs()

Integer Arcane::CaseOptionList::maxOccurs ( ) const
inlineoverridevirtual

Maximum number of occurrences.

Implements Arcane::ICaseOptionList.

Reimplemented in Arcane::CaseOptionListMulti.

Definition at line 237 of file CaseOptionList.cc.

◆ meshHandle()

MeshHandle Arcane::CaseOptionList::meshHandle ( ) const
inlineoverridevirtual

Handle of the associated mesh.

Implements Arcane::ICaseOptionList.

Definition at line 272 of file CaseOptionList.cc.

◆ minOccurs()

Integer Arcane::CaseOptionList::minOccurs ( ) const
inlineoverridevirtual

Minimum number of occurrences.

Implements Arcane::ICaseOptionList.

Reimplemented in Arcane::CaseOptionListMulti.

Definition at line 236 of file CaseOptionList.cc.

◆ parentElement()

XmlNode Arcane::CaseOptionList::parentElement ( ) const
inlineoverridevirtual

Returns the parent element.

Implements Arcane::ICaseOptionList.

Definition at line 194 of file CaseOptionList.cc.

References m_parent_element.

◆ printChildren()

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

Displays the list of child options in language lang and their value.

Implements Arcane::ICaseOptionList.

Reimplemented in Arcane::CaseOptionListMulti.

Definition at line 355 of file CaseOptionList.cc.

References Arcane::TraceAccessor::info(), isOptional(), Arcane::IServiceInfo::localName(), m_config_list, and rootTagName().

Here is the call graph for this function:

◆ readChildren()

void Arcane::CaseOptionList::readChildren ( bool is_phase1)
overridevirtual

Reads the option values from the DOM elements.

Implements Arcane::ICaseOptionList.

Reimplemented in Arcane::CaseOptionListMulti.

Definition at line 326 of file CaseOptionList.cc.

References Arcane::CaseOptionError::addWarning(), caseDocumentFragment(), Arcane::TraceAccessor::info(), m_config_list, m_parent_element, m_root_element, and rootTagName().

Here is the call graph for this function:

◆ removeChild()

void Arcane::CaseOptionList::removeChild ( ICaseOptions * co)
inlineoverridevirtual

Removes co from the list of children.

Implements Arcane::ICaseOptionList.

Definition at line 207 of file CaseOptionList.cc.

References ARCANE_FATAL, Arcane::TraceAccessor::info(), and Arcane::ICaseOptions::rootTagName().

Here is the call graph for this function:

◆ rootElement()

XmlNode Arcane::CaseOptionList::rootElement ( ) const
inlineoverridevirtual

Returns the element associated with this options list.

If there are none, returns a null XmlNode. If there are multiple, returns the first one.

Implements Arcane::ICaseOptionList.

Definition at line 193 of file CaseOptionList.cc.

References m_root_element.

◆ rootTagName()

String Arcane::CaseOptionList::rootTagName ( ) const
inlineoverridevirtual

Returns the name of the element of this list.

Implements Arcane::ICaseOptionList.

Definition at line 231 of file CaseOptionList.cc.

Referenced by printChildren(), readChildren(), and Arcane::CaseOptionListMulti::readChildren().

Here is the caller graph for this function:

◆ setIsMulti()

void Arcane::CaseOptionList::setIsMulti ( bool v)
inline

Indicates if the option can be present multiple times.

This is used to verify that the corresponding option element is present only once if v is false. If v is true, the verification takes place elsewhere. This function must be called before readChildren() to be taken into account.

Definition at line 265 of file CaseOptionList.cc.

◆ setOptional()

void Arcane::CaseOptionList::setOptional ( bool v)
inline

Definition at line 234 of file CaseOptionList.cc.

◆ setRootElement()

void Arcane::CaseOptionList::setRootElement ( XmlNode root_element)
inlineoverridevirtual

Positions the root element of the list. If already positioned, throws an exception.

Implements Arcane::ICaseOptionList.

Definition at line 244 of file CaseOptionList.cc.

References m_root_element.

◆ setRootElementWithParent()

void Arcane::CaseOptionList::setRootElementWithParent ( XmlNode parent_element)
inlineoverridevirtual

Positions the root element of the list, with parent_element as parent. If already positioned, does nothing.

Implements Arcane::ICaseOptionList.

Definition at line 239 of file CaseOptionList.cc.

◆ visit()

void Arcane::CaseOptionList::visit ( ICaseDocumentVisitor * visitor)
overridevirtual

Applies the visitor visitor.

Implements Arcane::ICaseOptionList.

Reimplemented in Arcane::CaseOptionListMulti.

Definition at line 386 of file CaseOptionList.cc.

References isOptional(), and m_config_list.

Here is the call graph for this function:

◆ xpathFullName()

String Arcane::CaseOptionList::xpathFullName ( ) const
inlineoverridevirtual

Full name in XPath format corresponding to rootElement().

Implements Arcane::ICaseOptionList.

Definition at line 270 of file CaseOptionList.cc.

References m_root_element.

Member Data Documentation

◆ m_case_mng

ICaseMng* Arcane::CaseOptionList::m_case_mng
protected

Definition at line 306 of file CaseOptionList.cc.

◆ m_case_options

std::vector<ICaseOptions*> Arcane::CaseOptionList::m_case_options
protected

Definition at line 311 of file CaseOptionList.cc.

◆ m_config_list

CaseOptionBasePairList Arcane::CaseOptionList::m_config_list
protected

◆ m_internal_api

InternalApi Arcane::CaseOptionList::m_internal_api
protected

Definition at line 317 of file CaseOptionList.cc.

◆ m_is_disabled

bool Arcane::CaseOptionList::m_is_disabled = false
protected

Definition at line 316 of file CaseOptionList.cc.

◆ m_is_multi

bool Arcane::CaseOptionList::m_is_multi
protected

Definition at line 314 of file CaseOptionList.cc.

◆ m_is_optional

bool Arcane::CaseOptionList::m_is_optional
protected

Definition at line 315 of file CaseOptionList.cc.

◆ m_is_present

bool Arcane::CaseOptionList::m_is_present
protected

Definition at line 313 of file CaseOptionList.cc.

◆ m_parent

ICaseOptionList* Arcane::CaseOptionList::m_parent
protected

Definition at line 308 of file CaseOptionList.cc.

◆ m_parent_element

XmlNode Arcane::CaseOptionList::m_parent_element
protected

◆ m_ref_opt

ICaseOptions* Arcane::CaseOptionList::m_ref_opt
protected

Definition at line 309 of file CaseOptionList.cc.

◆ m_root_element

XmlNode Arcane::CaseOptionList::m_root_element
protected

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