Alter values specified by range
| C# | Visual Basic | Visual C++ |
public abstract void SetRange( ILRange range, ILBaseArray<BaseT> values )
Public MustOverride Sub SetRange ( _ range As ILRange, _ values As ILBaseArray(Of BaseT) _ )
public: virtual void SetRange( ILRange^ range, ILBaseArray<BaseT>^ values ) abstract
- range (ILRange)
- ILRange specifying the dimensions/indices to alter
- values (ILBaseArray<(Of <(BaseT>)>))
- ILArray holding the new values.
The values pointed to by range will be replaced with the values
coming from vals. If the underlying
ILArray pointed to by vals is of another size then specified
by range, only a part of the vals-storaged will be used or respectivly
those values will repeatedly get inserted. One may use this as a
feature for filling the range with a sequence of values repeatedly.
On the other hand this may cause the problem of not recognizing
differences in the size between vals and range!
Another remarkable situation arises, if this storage is the only
reference wich is left to an physical storage array and it holds
multiple (repeated) entries to single array elements. Due to the
nature of a "reference", altering any values will also update corresponding
entries in the reference storage, pointing to the same underlying elements.
(In fact, those corresponding values will only point to the updated
elements also.) Keep in mind, that setting a range for a reference which
is connected to an array which is referenced by more than one storage, will
usually lead to a Detach() process - therefore the storage gets disconnected
and the behavior described will not happen. Since for the user the result
is not transparent, consider to eather
- check the state of the storage before calling SetRange()
- Detach() the storage manually, if required, or
- set the static flag DetachReferences to true to detach all reference storages automatically before altering any values on it.