Data set option of simple type list (real, integer, boolean, ...). More...
#include <arcane/core/CaseOptionSimple.h>
Public Types | |
| using | Type = typename CaseOptionTraitsT<T>::ContainerType |
| Type of the option value. | |
| using | ReferenceType = typename CaseOptionTraitsT<T>::ReferenceType |
| using | ConstReferenceType = typename CaseOptionTraitsT<T>::ConstReferenceType |
| using | ArrayViewType = typename CaseOptionTraitsT<T>::ArrayViewType |
| Type of the view on the option values. | |
| using | ConstArrayViewType = typename CaseOptionTraitsT<T>::ConstArrayViewType |
| Type of the constant view on the option values. | |
| Public Types inherited from Arcane::ArrayView< T > | |
| using | ThatClass = ArrayView<T> |
| typedef T | value_type |
| Type of the array elements. | |
| typedef value_type * | pointer |
| Pointer type of an array element. | |
| typedef const value_type * | const_pointer |
| Constant pointer type of an array element. | |
| typedef ArrayIterator< pointer > | iterator |
| Type of the iterator over an array element. | |
| typedef ArrayIterator< const_pointer > | const_iterator |
| Type of the constant iterator over an array element. | |
| typedef value_type & | reference |
| Reference type of an array element. | |
| typedef const value_type & | const_reference |
| Constant reference type of an array element. | |
| typedef Integer | size_type |
| Type indexing the array. | |
| typedef std::ptrdiff_t | difference_type |
| Type of a distance between array iterator elements. | |
| typedef IterT< ArrayView< T > > | iter |
| Type of an iterator over the entire array. | |
| typedef ConstIterT< ArrayView< T > > | const_iter |
| Type of a constant iterator over the entire array. | |
| typedef std::reverse_iterator< iterator > | reverse_iterator |
| typedef std::reverse_iterator< const_iterator > | const_reverse_iterator |
Public Member Functions | |
| CaseOptionMultiSimpleT (const CaseOptionBuildInfo &cob) | |
| CaseOptionMultiSimpleT (const CaseOptionBuildInfo &cob, const String &physical_unit) | |
| ArrayView< T > | operator() () |
| const ArrayView< T > | operator() () const |
| operator ArrayView< T > () | |
| Conversion to the constant view. | |
| operator ConstArrayView< T > () const | |
| Conversion to the constant view. | |
| ConstArrayViewType | view () const |
| Constant view on the option elements. | |
| ArrayViewType | view () |
| View on the option elements. | |
| ConstReferenceType | operator[] (Integer i) const |
| ReferenceType | operator[] (Integer i) |
| void | print (const String &lang, std::ostream &o) const override |
| Prints the option value in the language lang, to the stream o. | |
| ICaseFunction * | function () const override |
| Returns the function linked to this option or nullptr if none exists. | |
| void | updateFromFunction (Real, Integer) override |
| Updates the option value from a function. | |
| ConstArrayView< T > | values () const |
| const T & | value (Integer index) const |
| Integer | size () const |
| void | visit (ICaseDocumentVisitor *visitor) const override |
| Applies the visitor to this option. | |
| bool | isPresent () const |
| Public Member Functions inherited from Arcane::CaseOptionMultiSimple | |
| CaseOptionMultiSimple (const CaseOptionBuildInfo &cob) | |
| 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. | |
| ICaseMng * | caseMng () const |
| Case manager. | |
| ICaseOptionList * | parentOptionList () const |
| Parent OptionList. | |
| ITraceMng * | traceMng () const |
| Trace manager. | |
| ISubDomain * | subDomain () const |
| Sub-domain manager. | |
| ICaseDocument * | caseDocument () const |
| Returns the document manager. | |
| ICaseDocumentFragment * | caseDocumentFragment () 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. | |
| Public Member Functions inherited from Arcane::ArrayView< T > | |
| constexpr | ArrayView () noexcept |
| Constructs an empty view. | |
| ArrayView (const ArrayView< T > &from)=default | |
| Copy constructor from another view. | |
| constexpr | ArrayView (Integer asize, pointer ptr) noexcept |
| Constructs a view over a memory region starting at ptr and. | |
| template<std::size_t N> | |
| constexpr | ArrayView (std::array< T, N > &v) |
| ArrayView< T > & | operator= (const ArrayView< T > &from)=default |
| Copy assignment operator. | |
| template<std::size_t N> | |
| constexpr ArrayView< T > & | operator= (std::array< T, N > &from) |
| constexpr reference | operator[] (Integer i) |
| i-th element of the array. | |
| constexpr const_reference | operator[] (Integer i) const |
| i-th element of the array. | |
| constexpr reference | operator() (Integer i) |
| i-th element of the array. | |
| constexpr const_reference | operator() (Integer i) const |
| i-th element of the array. | |
| constexpr const_reference | item (Integer i) const |
| i-th element of the array. | |
| constexpr void | setItem (Integer i, const_reference v) |
| Sets the i-th element of the array. | |
| constexpr Integer | size () const noexcept |
| Returns the size of the array. | |
| constexpr Integer | length () const noexcept |
| Number of elements in the array. | |
| constexpr iterator | begin () noexcept |
| Iterator to the first element of the array. | |
| constexpr iterator | end () noexcept |
| Iterator to the first element after the end of the array. | |
| constexpr const_iterator | begin () const noexcept |
| Constant iterator to the first element of the array. | |
| constexpr const_iterator | end () const noexcept |
| Constant iterator to the first element after the end of the array. | |
| constexpr reverse_iterator | rbegin () noexcept |
| Reverse iterator to the first element of the array. | |
| constexpr const_reverse_iterator | rbegin () const noexcept |
| Reverse iterator to the first element of the array. | |
| constexpr reverse_iterator | rend () noexcept |
| Reverse iterator to the first element after the end of the array. | |
| constexpr const_reverse_iterator | rend () const noexcept |
| Reverse iterator to the first element after the end of the array. | |
| ArrayRange< pointer > | range () |
| Iteration range from the first to the last element. | |
| ArrayRange< const_pointer > | range () const |
| Iteration range from the first to the last element. | |
| constexpr pointer | ptrAt (Integer index) |
| Address of the index-th element. | |
| constexpr const_pointer | ptrAt (Integer index) const |
| Address of the index-th element. | |
| constexpr const_reference | at (Integer i) const |
| void | setAt (Integer i, const_reference value) |
| void | fill (const T &o) noexcept |
| Fills the array with the value o. | |
| constexpr ConstArrayView< T > | constView () const noexcept |
| Constant view of this view. | |
| constexpr ArrayView< T > | subView (Integer abegin, Integer asize) noexcept |
| Sub-view starting from element abegin and containing asize elements. | |
| constexpr ThatClass | subPart (Integer abegin, Integer asize) noexcept |
| Sub-view starting from element abegin and containing asize elements. | |
| constexpr ConstArrayView< T > | subConstView (Integer abegin, Integer asize) const noexcept |
| Constant sub-view starting from element abegin and containing asize elements. | |
| constexpr ArrayView< T > | subViewInterval (Integer index, Integer nb_interval) |
| Sub-view corresponding to the interval index over nb_interval. | |
| constexpr ThatClass | subPartInterval (Integer index, Integer nb_interval) |
| Sub-view corresponding to the interval index over nb_interval. | |
| template<class U> | |
| void | copy (const U ©_array) |
| Copies the array copy_array into the instance. | |
| constexpr bool | empty () const noexcept |
| Returns true if the array is empty (zero dimension). | |
| bool | contains (const_reference v) const |
| true if the array contains the element with value v | |
| void | setArray (const ArrayView< T > &v) noexcept |
| constexpr pointer | unguardedBasePointer () noexcept |
| Pointer to the beginning of the view. | |
| constexpr const_pointer | unguardedBasePointer () const noexcept |
| Constant pointer to the start of the view. | |
| constexpr const_pointer | data () const noexcept |
| Pointer to the start of the view. | |
| constexpr pointer | data () noexcept |
| Constant pointer to the start of the view. | |
Protected Member Functions | |
| void | _search (bool is_phase1) override |
| Searches for the option value in the dataset. | |
| virtual bool | _allowPhysicalUnit () |
| 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 |
| Protected Member Functions inherited from Arcane::ArrayView< T > | |
| constexpr pointer | _ptr () noexcept |
| Returns a pointer to the array. | |
| constexpr const_pointer | _ptr () const noexcept |
| Returns a pointer to the array. | |
| void | _setArray (pointer v, Integer s) noexcept |
| Modifies the pointer and size of the array. | |
| void | _setPtr (pointer v) noexcept |
| Modifies the pointer to the start of the array. | |
| void | _setSize (Integer s) noexcept |
| Modifies the size of the array. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from Arcane::ArrayView< T > | |
| static constexpr ThatClass | create (pointer ptr, Integer asize) noexcept |
| Constructs a view over a memory region starting at ptr and. | |
Data set option of simple type list (real, integer, boolean, ...).
Definition at line 330 of file CaseOptionSimple.h.
| using Arcane::CaseOptionMultiSimpleT< T >::ArrayViewType = typename CaseOptionTraitsT<T>::ArrayViewType |
Type of the view on the option values.
Definition at line 345 of file CaseOptionSimple.h.
| using Arcane::CaseOptionMultiSimpleT< T >::ConstArrayViewType = typename CaseOptionTraitsT<T>::ConstArrayViewType |
Type of the constant view on the option values.
Definition at line 347 of file CaseOptionSimple.h.
| using Arcane::CaseOptionMultiSimpleT< T >::ConstReferenceType = typename CaseOptionTraitsT<T>::ConstReferenceType |
Definition at line 343 of file CaseOptionSimple.h.
| using Arcane::CaseOptionMultiSimpleT< T >::ReferenceType = typename CaseOptionTraitsT<T>::ReferenceType |
Definition at line 342 of file CaseOptionSimple.h.
| using Arcane::CaseOptionMultiSimpleT< T >::Type = typename CaseOptionTraitsT<T>::ContainerType |
Type of the option value.
Definition at line 341 of file CaseOptionSimple.h.
| Arcane::CaseOptionMultiSimpleT< T >::CaseOptionMultiSimpleT | ( | const CaseOptionBuildInfo & | cob | ) |
Definition at line 660 of file CaseOptionSimple.cc.
| Arcane::CaseOptionMultiSimpleT< T >::CaseOptionMultiSimpleT | ( | const CaseOptionBuildInfo & | cob, |
| const String & | physical_unit ) |
Definition at line 669 of file CaseOptionSimple.cc.
| Arcane::CaseOptionMultiSimpleT< T >::~CaseOptionMultiSimpleT | ( | ) |
Definition at line 679 of file CaseOptionSimple.cc.
|
protectedvirtual |
Definition at line 689 of file CaseOptionSimple.cc.
|
overrideprotectedvirtual |
Searches for the option value in the dataset.
The found value is stored in m_value.
If the value is not present in the dataset, it checks if there is a default value and uses it.
Implements Arcane::CaseOptionBase.
Definition at line 708 of file CaseOptionSimple.cc.
References Arcane::CaseOptionBase::_defaultValue(), Arcane::ArrayView< T >::_setArray(), Arcane::CaseOptionError::addInvalidTypeError(), Arcane::CaseOptionError::addOptionNotFoundError(), Arcane::CaseOptionBase::caseDocumentFragment(), Arcane::CaseOptionBase::caseMng(), Arcane::AbstractArray< T >::contains(), Arcane::AbstractArray< T >::empty(), Arcane::CaseOptionBase::isOptional(), Arcane::CaseOptionBase::maxOccurs(), Arcane::CaseOptionBase::minOccurs(), Arcane::CaseOptionBase::name(), Arcane::String::null(), Arcane::XmlNode::null(), Arcane::CaseOptionBase::rootElement(), Arcane::StringBuilder::toString(), and Arcane::XmlNode::value().
|
inlineoverridevirtual |
Returns the function linked to this option or nullptr if none exists.
Implements Arcane::CaseOptionBase.
Definition at line 401 of file CaseOptionSimple.h.
|
inline |
Definition at line 412 of file CaseOptionSimple.h.
|
inline |
Conversion to the constant view.
Definition at line 370 of file CaseOptionSimple.h.
References Arcane::ArrayView< T >::ArrayView().
|
inline |
Conversion to the constant view.
Definition at line 378 of file CaseOptionSimple.h.
References Arcane::ArrayView< T >::ArrayView().
|
inline |
Definition at line 358 of file CaseOptionSimple.h.
|
inline |
Definition at line 363 of file CaseOptionSimple.h.
|
inline |
Definition at line 396 of file CaseOptionSimple.h.
|
inline |
Definition at line 395 of file CaseOptionSimple.h.
|
overridevirtual |
Prints the option value in the language lang, to the stream o.
Implements Arcane::CaseOptionBase.
Definition at line 831 of file CaseOptionSimple.cc.
References Arcane::ArrayView< T >::_ptr().
|
inline |
Definition at line 410 of file CaseOptionSimple.h.
|
inlineoverridevirtual |
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 402 of file CaseOptionSimple.h.
|
inline |
Definition at line 409 of file CaseOptionSimple.h.
|
inline |
Definition at line 404 of file CaseOptionSimple.h.
|
inline |
View on the option elements.
Definition at line 390 of file CaseOptionSimple.h.
|
inline |
Constant view on the option elements.
Definition at line 385 of file CaseOptionSimple.h.
|
overridevirtual |
Applies the visitor to this option.
Implements Arcane::CaseOptionBase.
Definition at line 842 of file CaseOptionSimple.cc.