Class representing the set of parameters that can modify the dataset options. More...
#include <arcane/utils/internal/ParameterCaseOption.h>
Public Member Functions | |
| ParameterCaseOption (ParameterOptionElementsCollection *parameter_options, const String &lang) | |
| String | getParameterOrNull (const String &xpath_before_index, const String &xpath_after_index, Integer index) const |
| Method allowing retrieval of an option's value. | |
| String | getParameterOrNull (const String &xpath_before_index, Integer index, bool allow_elems_after_index) const |
| Method allowing retrieval of an option's value. | |
| String | getParameterOrNull (const String &full_xpath) const |
| Method allowing retrieval of an option's value. | |
| bool | exist (const String &full_xpath) const |
| Method allowing checking if an option is present. | |
| bool | existAnyIndex (const String &xpath_before_index, const String &xpath_after_index) const |
| Method allowing checking if an option is present. | |
| bool | existAnyIndex (const String &full_xpath) const |
| Method allowing checking if an option is present. | |
| void | indexesInParam (const String &xpath_before_index, const String &xpath_after_index, UniqueArray< Integer > &indexes) const |
| Method allowing retrieval of the index or indices of the option. | |
| void | indexesInParam (const String &xpath_before_index, UniqueArray< Integer > &indexes, bool allow_elems_after_index) const |
| Method allowing retrieval of the index or indices of the option. | |
| Integer | count (const String &xpath_before_index, const String &xpath_after_index) const |
| Method allowing knowing the number of indices of the option. | |
| Integer | count (const String &xpath_before_index) const |
| Method allowing knowing the number of indices of the option. | |
Private Member Functions | |
| StringView | _removeUselessPartInXpath (StringView xpath) const |
Private Attributes | |
| bool | m_is_fr = false |
| ParameterOptionElementsCollection * | m_lines = nullptr |
Class representing the set of parameters that can modify the dataset options.
Definition at line 38 of file ParameterCaseOption.h.
| Arcane::ParameterCaseOption::ParameterCaseOption | ( | ParameterOptionElementsCollection * | parameter_options, |
| const String & | lang ) |
Definition at line 35 of file ParameterCaseOption.cc.
|
inlineprivate |
Definition at line 191 of file ParameterCaseOption.cc.
Method allowing knowing the number of indices of the option.
The option address is formatted as follows: xpath_before_index[GET_INDEX]
xpath_before_index must be in the following format: //case/aaa/bbb[2]/ccc
The indices are XML indices and these indices start at 1. The GET_INDEX index is a special index designating the indices to be retrieved.
| xpath_before_index | The address before the index. |
Definition at line 176 of file ParameterCaseOption.cc.
References Arcane::String::view().
| Integer Arcane::ParameterCaseOption::count | ( | const String & | xpath_before_index, |
| const String & | xpath_after_index ) const |
Method allowing knowing the number of indices of the option.
The option address is formatted as follows: xpath_before_index[GET_INDEX]/xpath_after_index
xpath_before_index must be in the following format: //case/aaa/bbb[2]/ccc
xpath_after_index must be in the following format: ddd/eee
The indices are XML indices and these indices start at 1. The GET_INDEX index is a special index designating the indices to be retrieved.
| xpath_before_index | The address before the index. |
| xpath_after_index | The address after the index. |
Definition at line 163 of file ParameterCaseOption.cc.
References Arcane::ParameterOptionAddr::addAddrPart(), and Arcane::String::view().
| bool Arcane::ParameterCaseOption::exist | ( | const String & | full_xpath | ) | const |
Method allowing checking if an option is present.
The address must be in the following format: //case/aaa/bbb[2]/ccc
The indices are XML indices and these indices start at 1.
| full_xpath | The address to search for. |
Definition at line 99 of file ParameterCaseOption.cc.
References Arcane::String::view().
| bool Arcane::ParameterCaseOption::existAnyIndex | ( | const String & | full_xpath | ) | const |
Method allowing checking if an option is present.
The option address is formatted as follows: full_xpath[ANY_INDEX]
The address must be in the following format: //case/aaa/bbb[2]/ccc
The indices are XML indices and these indices start at 1. The ANY_INDEX index is a special index designating all indices.
| full_xpath | The address to search for. |
Definition at line 123 of file ParameterCaseOption.cc.
References Arcane::String::view().
| bool Arcane::ParameterCaseOption::existAnyIndex | ( | const String & | xpath_before_index, |
| const String & | xpath_after_index ) const |
Method allowing checking if an option is present.
The option address is formatted as follows: xpath_before_index[ANY_INDEX]/xpath_after_index
xpath_before_index must be in the following format: //case/aaa/bbb[2]/ccc
xpath_after_index must be in the following format: ddd/eee
The indices are XML indices and these indices start at 1. The ANY_INDEX index is a special index designating all indices.
| xpath_before_index | The address before the index. |
| xpath_after_index | The address after the index. |
Definition at line 109 of file ParameterCaseOption.cc.
References Arcane::ParameterOptionAddr::addAddrPart(), and Arcane::String::view().
Method allowing retrieval of an option's value.
The address must be in the following format: //case/aaa/bbb[2]/ccc
The indices are XML indices and these indices start at 1.
| full_xpath | The address to search for. |
Definition at line 85 of file ParameterCaseOption.cc.
References Arcane::String::view().
| String Arcane::ParameterCaseOption::getParameterOrNull | ( | const String & | xpath_before_index, |
| const String & | xpath_after_index, | ||
| Integer | index ) const |
Method allowing retrieval of an option's value.
The option address is formatted as follows: xpath_before_index[index]/xpath_after_index
xpath_before_index must be in the following format: //case/aaa/bbb[2]/ccc
xpath_after_index must be in the following format: ddd/eee
The indices are XML indices and these indices start at 1.
| xpath_before_index | The address before the index. |
| xpath_after_index | The address after the index. |
| index | The index to place between the two parts of the address. |
Definition at line 44 of file ParameterCaseOption.cc.
References Arcane::ParameterOptionAddr::addAddrPart(), ARCANE_FATAL, and Arcane::String::view().
Referenced by Arcane::CaseOptionMultiExtended::_search(), and Arcane::CaseOptionMultiSimpleT< T >::_search().
| String Arcane::ParameterCaseOption::getParameterOrNull | ( | const String & | xpath_before_index, |
| Integer | index, | ||
| bool | allow_elems_after_index ) const |
Method allowing retrieval of an option's value.
The option address is formatted as follows: xpath_before_index[index]
xpath_before_index must be in the following format: //case/aaa/bbb[2]/ccc
If the parameter allow_elems_after_index is enabled, addresses of the form: xpath_before_index[index]/aaa/bbb will also be searched.
The indices are XML indices and these indices start at 1.
| xpath_before_index | The address before the index. |
| index | The index to place after the address. |
| allow_elems_after_index | Should elements after the index be checked? |
Definition at line 64 of file ParameterCaseOption.cc.
References Arcane::ParameterOptionAddr::addAddrPart(), ARCANE_FATAL, and Arcane::String::view().
| void Arcane::ParameterCaseOption::indexesInParam | ( | const String & | xpath_before_index, |
| const String & | xpath_after_index, | ||
| UniqueArray< Integer > & | indexes ) const |
Method allowing retrieval of the index or indices of the option.
The option address is formatted as follows: xpath_before_index[GET_INDEX]/xpath_after_index
xpath_before_index must be in the following format: //case/aaa/bbb[2]/ccc
xpath_after_index must be in the following format: ddd/eee
The indices are XML indices and these indices start at 1. The GET_INDEX index is a special index designating the indices to be retrieved.
| xpath_before_index | The address before the index. |
| xpath_after_index | The address after the index. |
| indexes | The array that will contain the set of found indices (this array is not cleared before use). |
Definition at line 135 of file ParameterCaseOption.cc.
References Arcane::ParameterOptionAddr::addAddrPart(), and Arcane::String::view().
Referenced by Arcane::CaseOptionMultiExtended::_search(), and Arcane::CaseOptionMultiSimpleT< T >::_search().
| void Arcane::ParameterCaseOption::indexesInParam | ( | const String & | xpath_before_index, |
| UniqueArray< Integer > & | indexes, | ||
| bool | allow_elems_after_index ) const |
Method allowing retrieval of the index or indices of the option.
The option address is formatted as follows: xpath_before_index[GET_INDEX]
xpath_before_index must be in the following format: //case/aaa/bbb[2]/ccc
If the parameter allow_elems_after_index is enabled, addresses of the form: xpath_before_index[GET_INDEX]/aaa/bbb will also be searched.
The indices are XML indices and these indices start at 1. The GET_INDEX index is a special index designating the indices to be retrieved.
| xpath_before_index | The address before the index. |
| indexes | The array that will contain the set of found indices |
| allow_elems_after_index | Should elements after the index be checked? (this array is not cleared before use). |
Definition at line 148 of file ParameterCaseOption.cc.
References Arcane::ParameterOptionAddr::addAddrPart(), and Arcane::String::view().
|
private |
Definition at line 289 of file ParameterCaseOption.h.
|
private |
Definition at line 290 of file ParameterCaseOption.h.