#include <arcane/core/VariableRefArray.h>
Public Types | |
| typedef T | DataType |
| typedef Array< T > | ValueType |
| typedef ArrayView< T >::const_reference | ConstReturnReferenceType |
| typedef ArrayView< T >::reference | ReturnReferenceType |
| typedef DataType | ElementType |
| Type of the variable elements. | |
| typedef VariableRef | BaseClass |
| Type of the base class. | |
| typedef Array< DataType > | ContainerType |
| Type of the class managing the variable value. | |
| typedef ArrayView< DataType > | ArrayBase |
| Type of the array allowing access to the variable. | |
| typedef VariableArrayT< DataType > | PrivatePartType |
| typedef VariableRefArrayT< DataType > | ThatClass |
| typedef VariableRefArrayLockT< DataType > | LockType |
| 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 | |
| VariableRefArrayT (const VariableBuildInfo &vb) | |
| Constructs a reference to a 1D array variable specified in vb. | |
| VariableRefArrayT (const VariableRefArrayT< DataType > &rhs) | |
| Constructs a reference from rhs. | |
| VariableRefArrayT (IVariable *var) | |
| Constructs a reference from var. | |
| void | refersTo (const VariableRefArrayT< DataType > &rhs) |
| Positions the instance's reference to the variable rhs. | |
| ~VariableRefArrayT () override | |
| Frees resources. | |
| virtual void | resize (Integer new_size) |
| Resizes the array to contain new_size elements. | |
| virtual void | resizeWithReserve (Integer new_size, Integer nb_additional) |
| Resizes the array to contain new_size elements. | |
| virtual bool | isArrayVariable () const |
| Integer | arraySize () const override |
| If the variable is an array, returns its dimension, otherwise returns 0. | |
| void | updateFromInternal () override |
| Updates from the internal part. | |
| ArrayView< DataType > | asArray () |
| ConstArrayView< DataType > | asArray () const |
| LockType | lock () |
| ContainerType & | internalContainer () |
| Returns the container of this variable's values. | |
| IArrayDataInternalT< T > * | _internalTrueData () |
| Public Member Functions inherited from Arcane::VariableRef | |
| virtual | ~VariableRef () |
| Releases resources. | |
| ISubDomain * | subDomain () const |
| Sub-domain associated with the variable (TODO deprecate end of 2023). | |
| IVariableMng * | variableMng () const |
| Variable manager associated with the variable. | |
| String | name () const |
| Variable name. | |
| virtual eDataType | dataType () const |
| Variable type (Real, Integer, ...). | |
| virtual void | print (std::ostream &o) const |
| Prints the variable value. | |
| virtual IModule * | module () const |
| Module associated with the variable (or nullptr, if none). | |
| virtual int | property () const |
| Variable properties. | |
| virtual int | referenceProperty () const |
| Reference properties (internal). | |
| virtual void | setProperty (int property) |
| Sets the property property. | |
| virtual void | unsetProperty (int property) |
| Unsets the property property. | |
| virtual void | registerVariable () |
| Registers the variable (internal). | |
| virtual void | unregisterVariable () |
| Unregisters the variable (internal). | |
| IVariable * | variable () const |
| Associated variable. | |
| virtual Integer | checkIfSync (int max_print=0) |
| Checks if the variable is synchronized. | |
| virtual Integer | checkIfSameOnAllReplica (int max_print=0) |
| Checks if the variable has the same values on all replicas. | |
| void | setUsed (bool v) |
| bool | isUsed () const |
| virtual void | internalSetUsed (bool) |
| const String & | assignmentStackTrace () const |
| Call stack at the time of assigning this instance. | |
| void | addTag (const String &tagname, const String &tagvalue) |
| Adds the tag tagname with the value tagvalue. | |
| void | removeTag (const String &tagname) |
| Removes the tag tagname. | |
| bool | hasTag (const String &tagname) const |
| true if the variable has the tag tagname | |
| String | tagValue (const String &tagname) const |
| Value of the tag tagname. The string is null if the tag does not exist. | |
| void | update () |
| Recalculates the variable if necessary. | |
| void | setUpToDate () |
| Indicates that the variable has just been updated. | |
| Int64 | modifiedTime () |
| Time when the variable was updated. | |
| void | addDependCurrentTime (const VariableRef &var) |
| Adds var to the dependency list at the current time. | |
| void | addDependCurrentTime (const VariableRef &var, const TraceInfo &tinfo) |
| Adds var to the dependency list at the current time with trace info tinfo. | |
| void | addDependPreviousTime (const VariableRef &var) |
| Adds var to the dependency list at the previous time. | |
| void | addDependPreviousTime (const VariableRef &var, const TraceInfo &tinfo) |
| Adds var to the dependency list at the previous time with trace info tinfo. | |
| void | removeDepend (const VariableRef &var) |
| Removes var from the dependency list. | |
| template<typename ClassType> | |
| void | setComputeFunction (ClassType *instance, void(ClassType::*func)()) |
| Sets the variable's recalculation function. | |
| template<typename ClassType> | |
| void | setComputeFunction (ClassType *instance, void(ClassType::*func)(), const TraceInfo &tinfo) |
| Sets the variable's recalculation function. | |
| VariableRef * | previousReference () |
| Previous reference (or null) to variable(). | |
| VariableRef * | nextReference () |
| Next reference (or null) to variable(). | |
| void | setPreviousReference (VariableRef *v) |
| void | setNextReference (VariableRef *v) |
| 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. | |
Static Public Member Functions | |
| static VariableTypeInfo | _internalVariableTypeInfo () |
| static VariableInfo | _internalVariableInfo (const VariableBuildInfo &vbi) |
| static void | setTraceCreation (bool v) |
| static bool | hasTraceCreation () |
| 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. | |
Additional Inherited Members | |
| Protected Member Functions inherited from Arcane::VariableRef | |
| VariableRef (const VariableBuildInfo &vbi) | |
| Constructs a reference to a variable with the infos vbi. | |
| VariableRef (const VariableRef &from) | |
| Copy constructor. | |
| VariableRef (IVariable *var) | |
| Constructs a reference to a variable var. | |
| VariableRef & | operator= (const VariableRef &from) |
| Copy assignment operator. | |
| VariableRef () | |
| Default constructor. | |
| void | _setComputeFunction (IVariableComputeFunction *v) |
| void | _internalInit (IVariable *) |
| Internal initialization of the variable. | |
| IVariable * | _variable () const |
| Referenced variable. | |
| void | _executeUpdateFunctors () |
| void | _internalAssignVariable (const VariableRef &var) |
| 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. | |
| bool | m_has_trace = false |
Array variable.
Definition at line 37 of file VariableRefArray.h.
| typedef ArrayView<DataType> Arcane::VariableRefArrayT< T >::ArrayBase |
Type of the array allowing access to the variable.
Definition at line 55 of file VariableRefArray.h.
| typedef VariableRef Arcane::VariableRefArrayT< T >::BaseClass |
Type of the base class.
Definition at line 51 of file VariableRefArray.h.
| typedef ArrayView<T>::const_reference Arcane::VariableRefArrayT< T >::ConstReturnReferenceType |
Definition at line 45 of file VariableRefArray.h.
| typedef Array<DataType> Arcane::VariableRefArrayT< T >::ContainerType |
Type of the class managing the variable value.
Definition at line 53 of file VariableRefArray.h.
| typedef T Arcane::VariableRefArrayT< T >::DataType |
Definition at line 43 of file VariableRefArray.h.
| typedef DataType Arcane::VariableRefArrayT< T >::ElementType |
Type of the variable elements.
Definition at line 49 of file VariableRefArray.h.
| typedef VariableRefArrayLockT<DataType> Arcane::VariableRefArrayT< T >::LockType |
Definition at line 61 of file VariableRefArray.h.
| typedef VariableArrayT<DataType> Arcane::VariableRefArrayT< T >::PrivatePartType |
Definition at line 57 of file VariableRefArray.h.
| typedef ArrayView<T>::reference Arcane::VariableRefArrayT< T >::ReturnReferenceType |
Definition at line 46 of file VariableRefArray.h.
| typedef VariableRefArrayT<DataType> Arcane::VariableRefArrayT< T >::ThatClass |
Definition at line 59 of file VariableRefArray.h.
| typedef Array<T> Arcane::VariableRefArrayT< T >::ValueType |
Definition at line 44 of file VariableRefArray.h.
|
explicit |
Constructs a reference to a 1D array variable specified in vb.
Definition at line 81 of file VariableRefArray.cc.
References Arcane::VariableRef::_internalInit(), and Arcane::VariableRef::VariableRef().
Referenced by refersTo(), and VariableRefArrayT().
| Arcane::VariableRefArrayT< DataType >::VariableRefArrayT | ( | const VariableRefArrayT< DataType > & | rhs | ) |
Constructs a reference from rhs.
Definition at line 93 of file VariableRefArray.cc.
References Arcane::ArrayView< T >::ArrayView(), updateFromInternal(), Arcane::VariableRef::VariableRef(), and VariableRefArrayT().
|
explicit |
Constructs a reference from var.
Definition at line 106 of file VariableRefArray.cc.
References Arcane::VariableRef::_internalInit(), and Arcane::VariableRef::VariableRef().
|
override |
| IArrayDataInternalT< T > * Arcane::VariableRefArrayT< T >::_internalTrueData | ( | ) |
Definition at line 195 of file VariableRefArray.cc.
|
static |
Definition at line 58 of file VariableRefArray.cc.
|
static |
Definition at line 47 of file VariableRefArray.cc.
|
inlineoverridevirtual |
If the variable is an array, returns its dimension, otherwise returns 0.
Reimplemented from Arcane::VariableRef.
Definition at line 88 of file VariableRefArray.h.
|
inline |
Definition at line 93 of file VariableRefArray.h.
|
inline |
Definition at line 94 of file VariableRefArray.h.
| VariableRefArrayT< T >::ContainerType & Arcane::VariableRefArrayT< T >::internalContainer | ( | ) |
Returns the container of this variable's values.
Calling this method is only possible for private variables (PPrivate property). For others, an exception is raised (you must use lock()).
Definition at line 185 of file VariableRefArray.cc.
|
inlinevirtual |
Definition at line 87 of file VariableRefArray.h.
| VariableRefArrayT< DataType >::LockType Arcane::VariableRefArrayT< DataType >::lock | ( | ) |
Definition at line 174 of file VariableRefArray.cc.
| void Arcane::VariableRefArrayT< DataType >::refersTo | ( | const VariableRefArrayT< DataType > & | rhs | ) |
Positions the instance's reference to the variable rhs.
Definition at line 118 of file VariableRefArray.cc.
References Arcane::VariableRef::operator=(), updateFromInternal(), and VariableRefArrayT().
|
virtual |
Resizes the array to contain new_size elements.
Definition at line 142 of file VariableRefArray.cc.
|
virtual |
Resizes the array to contain new_size elements.
Definition at line 152 of file VariableRefArray.cc.
|
overridevirtual |
Updates from the internal part.
Reimplemented from Arcane::VariableRef.
Definition at line 162 of file VariableRefArray.cc.
References Arcane::VariableRef::updateFromInternal().
Referenced by refersTo(), and VariableRefArrayT().