Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::CaseOptionMultiEnumT< T > Class Template Reference

Multi-enumeration data set option. More...

#include <arcane/core/CaseOptionEnum.h>

Public Types

typedef T Type
 Option type.
Public Types inherited from Arcane::ArrayView< T >
using ThatClass = ArrayView<T>
typedef T value_type
 Type of the array elements.
typedef value_typepointer
 Pointer type of an array element.
typedef const value_typeconst_pointer
 Constant pointer type of an array element.
typedef ArrayIterator< pointeriterator
 Type of the iterator over an array element.
typedef ArrayIterator< const_pointerconst_iterator
 Type of the constant iterator over an array element.
typedef value_typereference
 Reference type of an array element.
typedef const value_typeconst_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< iteratorreverse_iterator
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator

Public Member Functions

 CaseOptionMultiEnumT (const CaseOptionBuildInfo &cob, const String type_name)
Public Member Functions inherited from Arcane::CaseOptionMultiEnum
 CaseOptionMultiEnum (const CaseOptionBuildInfo &cob, const String &type_name)
virtual void print (const String &lang, std::ostream &o) const
 Prints the option value in the language lang, to the stream o.
virtual ICaseFunctionfunction () const
 Returns the function linked to this option or nullptr if none exists.
virtual void updateFromFunction (Real, Integer)
 Updates the option value from a function.
void addEnumValue (CaseOptionEnumValue *value, bool do_clone)
CaseOptionEnumValuesenumValues () const
virtual void visit (ICaseDocumentVisitor *visitor) const
 Applies the visitor to this option.
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.
ICaseMngcaseMng () const
 Case manager.
ICaseOptionListparentOptionList () const
 Parent OptionList.
ITraceMngtraceMng () const
 Trace manager.
ISubDomainsubDomain () const
 Sub-domain manager.
ICaseDocumentcaseDocument () const
 Returns the document manager.
ICaseDocumentFragmentcaseDocumentFragment () 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< pointerrange ()
 Iteration range from the first to the last element.
ArrayRange< const_pointerrange () 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 &copy_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

virtual void _allocate (Integer size)
 Allocates an array for size elements.
virtual Integer _nbElem () const
 Returns the number of elements in the array.
virtual void _setOptionValue (Integer index, int v)
virtual int _optionValue (Integer index) const
 Returns the enumeration value for index index.
Protected Member Functions inherited from Arcane::CaseOptionMultiEnum
virtual void _search (bool is_phase1)
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.

Detailed Description

template<class T>
class Arcane::CaseOptionMultiEnumT< T >

Multi-enumeration data set option.

Definition at line 341 of file CaseOptionEnum.h.

Member Typedef Documentation

◆ Type

template<class T>
typedef T Arcane::CaseOptionMultiEnumT< T >::Type

Option type.

Definition at line 347 of file CaseOptionEnum.h.

Constructor & Destructor Documentation

◆ CaseOptionMultiEnumT()

template<class T>
Arcane::CaseOptionMultiEnumT< T >::CaseOptionMultiEnumT ( const CaseOptionBuildInfo & cob,
const String type_name )
inline

Definition at line 351 of file CaseOptionEnum.h.

Member Function Documentation

◆ _allocate()

template<class T>
virtual void Arcane::CaseOptionMultiEnumT< T >::_allocate ( Integer size)
inlineprotectedvirtual

Allocates an array for size elements.

Implements Arcane::CaseOptionMultiEnum.

Definition at line 357 of file CaseOptionEnum.h.

References Arcane::ArrayView< T >::ArrayView(), and Arcane::ArrayView< T >::size().

◆ _nbElem()

template<class T>
virtual Integer Arcane::CaseOptionMultiEnumT< T >::_nbElem ( ) const
inlineprotectedvirtual

Returns the number of elements in the array.

Implements Arcane::CaseOptionMultiEnum.

Definition at line 363 of file CaseOptionEnum.h.

References Arcane::ArrayView< T >::size().

◆ _optionValue()

template<class T>
virtual int Arcane::CaseOptionMultiEnumT< T >::_optionValue ( Integer index) const
inlineprotectedvirtual

Returns the enumeration value for index index.

Implements Arcane::CaseOptionMultiEnum.

Definition at line 371 of file CaseOptionEnum.h.

◆ _setOptionValue()

template<class T>
virtual void Arcane::CaseOptionMultiEnumT< T >::_setOptionValue ( Integer index,
int v )
inlineprotectedvirtual

Sets the option value to the value v. v is directly converted to the enumeration value.

Implements Arcane::CaseOptionMultiEnum.

Definition at line 367 of file CaseOptionEnum.h.


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