Skip to main content
Version: 15.x (API 15) [Current]

Struct ImVectorWrapper<T>

Wrapper for ImVector.

Assembly: Dalamud.dll​
Declaration
public struct ImVectorWrapper<T> : IList<T>, ICollection<T>, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, IDisposable where T : unmanaged

Implements:

Expand

System.Collections.Generic.IList<<T>>, System.Collections.Generic.ICollection<<T>>, System.Collections.IList, System.Collections.ICollection, System.Collections.Generic.IReadOnlyList<<T>>, System.Collections.Generic.IReadOnlyCollection<<T>>, System.Collections.Generic.IEnumerable<<T>>, System.Collections.IEnumerable, System.IDisposable

Properties​

RawVector​

Gets the raw vector.

Declaration
public ImVector* RawVector { get; }

DataSpan​

Gets a System.Span1view of the underlying ImVector{T}, for the range ofDalamud.Interface.Utility.ImVectorWrapper1.Length.

Declaration
public Span<T> DataSpan { get; }

StorageSpan​

Gets a System.Span1view of the underlying ImVector{T}, for the range ofDalamud.Interface.Utility.ImVectorWrapper1.Capacity.

Declaration
public Span<T> StorageSpan { get; }

IsDisposed​

Gets a value indicating whether this Dalamud.Interface.Utility.ImVectorWrapper1` is disposed.

Declaration
public bool IsDisposed { get; }

HasOwnership​

Gets a value indicating whether this Dalamud.Interface.Utility.ImVectorWrapper1has the ownership of the underlyingDalamud.Bindings.ImGui.ImVector`.

Declaration
public readonly bool HasOwnership { get; }

Vector​

Gets the underlying Dalamud.Bindings.ImGui.ImVector.

Declaration
public ImVector* Vector { get; }

Length​

Gets the number of items contained inside the underlying ImVector{T}.

Declaration
public int Length { get; }

Capacity​

Gets the number of items that can be contained inside the underlying ImVector{T}.

Declaration
public int Capacity { get; }

Data​

Gets the pointer to the first item in the data inside underlying ImVector{T}.

Declaration
public T* Data { get; }

LengthUnsafe​

Gets the reference to the number of items contained inside the underlying ImVector{T}.

Declaration
public ref int LengthUnsafe { get; }

CapacityUnsafe​

Gets the reference to the number of items that can be contained inside the underlying ImVector{T}.

Declaration
public ref int CapacityUnsafe { get; }

DataUnsafe​

Gets the reference to the pointer to the first item in the data inside underlying ImVector{T}.

Declaration
public ref T* DataUnsafe { get; }
Remarks​

This may be null, if Dalamud.Interface.Utility.ImVectorWrapper1.Capacity` is zero.

IsReadOnly​

Declaration
public bool IsReadOnly { get; }

this[int]​

Gets the element at the specified index as a reference.

Declaration
public ref T this[int index] { get; }

Methods​

Dispose()​

Declaration
public void Dispose()

GetEnumerator()​

Declaration
public IEnumerator<T> GetEnumerator()
Returns​

System.Collections.Generic.IEnumerator<<T>>

Add(in T)​

Declaration
public void Add(in T item)
Parameters​
TypeName
<T>item

AddRange(IEnumerable<T>)​

Declaration
public void AddRange(IEnumerable<T> items)
Parameters​
TypeName
System.Collections.Generic.IEnumerable<<T>>items

AddRange(ReadOnlySpan<T>)​

Declaration
public void AddRange(ReadOnlySpan<T> items)
Parameters​
TypeName
System.ReadOnlySpan<<T>>items

Clear()​

Declaration
public void Clear()

Clear(bool)​

Clears this vector, optionally skipping destroyer invocation.

Declaration
public void Clear(bool skipDestroyer)
Parameters​
TypeNameDescription
System.BooleanskipDestroyerWhether to skip destroyer invocation.

Contains(in T)​

Declaration
public bool Contains(in T item)
Returns​

System.Boolean

Parameters​
TypeName
<T>item

Compact(int)​

Size down the underlying ImVector{T}.

Declaration
public bool Compact(int reservation)
Returns​

System.Boolean: Whether the capacity has been changed.

Parameters​
TypeNameDescription
System.Int32reservationCapacity to reserve.

CopyTo(T[], int)​

Declaration
public void CopyTo(T[] array, int arrayIndex)
Parameters​
TypeName
<T>[]array
System.Int32arrayIndex

EnsureCapacity(int)​

Ensures that the capacity of this list is at least the specified <code class="paramref">capacity</code>.

On growth, the new capacity exactly matches <code class="paramref">capacity</code>.

Declaration
public bool EnsureCapacity(int capacity)
Returns​

System.Boolean: Whether the capacity has been changed.

Parameters​
TypeNameDescription
System.Int32capacityThe minimum capacity to ensure.

EnsureCapacityExponential(int)​

Ensures that the capacity of this list is at least the specified <code class="paramref">capacity</code>.

On growth, the new capacity may exceed <code class="paramref">capacity</code>.

Declaration
public bool EnsureCapacityExponential(int capacity)
Returns​

System.Boolean: Whether the capacity has been changed.

Parameters​
TypeNameDescription
System.Int32capacityThe minimum capacity to ensure.

Resize(int, in T, bool)​

Resizes the underlying array and fills with zeroes if grown.

Declaration
public void Resize(int size, in T defaultValue = default, bool skipDestroyer = false)
Parameters​
TypeNameDescription
System.Int32sizeNew size.
<T>defaultValueNew default value.
System.BooleanskipDestroyerWhether to skip calling destroyer function.

Remove(in T)​

Declaration
public bool Remove(in T item)
Returns​

System.Boolean

Parameters​
TypeName
<T>item

IndexOf(in T)​

Declaration
public int IndexOf(in T item)
Returns​

System.Int32

Parameters​
TypeName
<T>item

Insert(int, in T)​

Declaration
public void Insert(int index, in T item)
Parameters​
TypeName
System.Int32index
<T>item

InsertRange(int, IEnumerable<T>)​

Declaration
public void InsertRange(int index, IEnumerable<T> items)
Parameters​
TypeName
System.Int32index
System.Collections.Generic.IEnumerable<<T>>items

InsertRange(int, ReadOnlySpan<T>)​

Declaration
public void InsertRange(int index, ReadOnlySpan<T> items)
Parameters​
TypeName
System.Int32index
System.ReadOnlySpan<<T>>items

RemoveAt(int, bool)​

Removes the element at the given index.

Declaration
public void RemoveAt(int index, bool skipDestroyer = false)
Parameters​
TypeNameDescription
System.Int32indexThe index.
System.BooleanskipDestroyerWhether to skip calling the destroyer function.

RemoveRange(int, int, bool)​

Removes <code class="paramref">count</code> elements at the given index.

Declaration
public void RemoveRange(int index, int count, bool skipDestroyer = false)
Parameters​
TypeNameDescription
System.Int32indexThe index of the first item to remove.
System.Int32countNumber of items to remove.
System.BooleanskipDestroyerWhether to skip calling the destroyer function.

ReplaceRange(int, int, ReadOnlySpan<T>, bool)​

Replaces a sequence at given offset <code class="paramref">index</code> of <code class="paramref">count</code> items with <code class="paramref">replacement</code>.

Declaration
public void ReplaceRange(int index, int count, ReadOnlySpan<T> replacement, bool skipDestroyer = false)
Parameters​
TypeNameDescription
System.Int32indexThe index of the first item to be replaced.
System.Int32countThe number of items to be replaced.
System.ReadOnlySpan<<T>>replacementThe replacement.
System.BooleanskipDestroyerWhether to skip calling the destroyer function.

SetCapacity(int)​

Sets the capacity exactly as requested.

Declaration
public bool SetCapacity(int capacity)
Returns​

System.Boolean: Whether the capacity has been changed.

Parameters​
TypeNameDescription
System.Int32capacityNew capacity.
Exceptions​

System.ArgumentOutOfRangeException
If <code class="paramref">capacity</code> is less than Dalamud.Interface.Utility.ImVectorWrapper1.Length. System.OutOfMemoryException`
If memory for the requested capacity cannot be allocated.

Implements​

  • System.Collections.Generic.IList<<T>>
  • System.Collections.Generic.ICollection<<T>>
  • System.Collections.IList
  • System.Collections.ICollection
  • System.Collections.Generic.IReadOnlyList<<T>>
  • System.Collections.Generic.IReadOnlyCollection<<T>>
  • System.Collections.Generic.IEnumerable<<T>>
  • System.Collections.IEnumerable
  • System.IDisposable