CUtlLeanVector
Struct CUtlLeanVector
Namespace: SwiftlyS2.Shared.Natives
Assembly: SwiftlyS2.CS2.dll
public struct CUtlLeanVector<T, I> : IDisposable, IEnumerable<T>, IEnumerable where I : unmanaged, IBinaryInteger<I>, IMinMaxValue<I>Type Parameters
- T
- I
Implements
Inherited Members
- object.Equals(object?)
- object.Equals(object?, object?)
- object.GetHashCode()
- object.GetType()
- object.ReferenceEquals(object?, object?)
- object.ToString()
Constructors
CUtlLeanVector(I, I)
Please use SwiftlyS2.Shared.Natives.ManagedCUtlLeanVector%602 instead to construct it. If you really want to use this, you should call SwiftlyS2.Shared.Natives.CUtlLeanVector%602.Purge after you are done with it.
public CUtlLeanVector(I growSize, I initSize)Parameters
- growSize I
- initSize I
CUtlLeanVector(nint, I, I)
Please use SwiftlyS2.Shared.Natives.ManagedCUtlLeanVector%602 instead to construct it. If you really want to use this, you should call SwiftlyS2.Shared.Natives.CUtlLeanVector%602.Purge after you are done with it.
public CUtlLeanVector(nint memory, I allocationCount, I numElements)Parameters
- memory nint
- allocationCount I
- numElements I
Fields
Allocated
public I AllocatedField Value
- I
Count
public I CountField Value
- I
Elements
public nint ElementsField Value
Properties
Base
public nint Base { get; }Property Value
ElementSize
public int ElementSize { get; }Property Value
ExternallyAllocated
public bool ExternallyAllocated { get; }Property Value
NumAllocated
public int NumAllocated { get; }Property Value
this
public ref T this[I index] { get; }Property Value
- T
Methods
AddToTail()
public I AddToTail()Returns
- I
AddToTail(T)
public I AddToTail(T element)Parameters
- element T
Returns
- I
AssumeMemory(nint, I, I)
public void AssumeMemory(nint memory, I allocationCount, I numElements)Parameters
- memory nint
- allocationCount I
- numElements I
DetachMemory()
public nint DetachMemory()Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()Element(I)
public ref T Element(I idx)Parameters
- idx I
Returns
- T
EnsureCapacity(int, bool)
public void EnsureCapacity(int num, bool force)Parameters
FastRemove(I)
public void FastRemove(I elem)Parameters
- elem I
Find(T)
public I Find(T element)Parameters
- element T
Returns
- I
FindAndFastRemove(T)
public bool FindAndFastRemove(T value)Parameters
- value T
Returns
FindAndRemove(T)
public bool FindAndRemove(T value)Parameters
- value T
Returns
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<T> GetEnumerator()Returns
- IEnumerator<T> — An enumerator that can be used to iterate through the collection.
Head()
public ref T Head()Returns
- T
IsIdxValid(I)
public bool IsIdxValid(I idx)Parameters
- idx I
Returns
IsValidIndex(I)
public bool IsValidIndex(I idx)Parameters
- idx I
Returns
Purge()
public void Purge()Remove(I)
public void Remove(I elem)Parameters
- elem I
RemoveAll()
public void RemoveAll()RemoveMultiple(I, I)
public void RemoveMultiple(I idx, I count)Parameters
- idx I
- count I
RemoveMultipleFromHead(I)
public void RemoveMultipleFromHead(I count)Parameters
- count I
RemoveMultipleFromTail(I)
public void RemoveMultipleFromTail(I count)Parameters
- count I
SetCount(I)
public void SetCount(I count)Parameters
- count I
SetExternalBuffer(nint, I, I)
public void SetExternalBuffer(nint memory, I allocationCount, I numElements)Parameters
- memory nint
- allocationCount I
- numElements I
SetSize(I)
public void SetSize(I size)Parameters
- size I
Tail()
public ref T Tail()Returns
- T