swiftlys2/docs/api/ai/
API Reference Natives

CUtlLeanVector`2

Struct
Namespace: SwiftlyS2.Shared.Natives · Assembly: SwiftlyS2.CS2.dll
public struct CUtlLeanVector<T, I> : IDisposable, IEnumerable<T>, IEnumerable where I : unmanaged, IBinaryInteger<I>, IMinMaxValue<I>
View source

Constructors

CUtlLeanVector(I, I)

Please use ManagedCUtlLeanVector%602 instead to construct it. If you really want to use this, you should call Purge after you are done with it.

public CUtlLeanVector(I growSize, I initSize)
Parameters
  • growSizeI
  • initSizeI

CUtlLeanVector(nint, I, I)

Please use ManagedCUtlLeanVector%602 instead to construct it. If you really want to use this, you should call Purge after you are done with it.

public CUtlLeanVector(nint memory, I allocationCount, I numElements)
Parameters
  • memorynint
  • allocationCountI
  • numElementsI

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[I]

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
  • elementT
Returns
I

AssumeMemory(nint, I, I)

public void AssumeMemory(nint memory, I allocationCount, I numElements)
Parameters
  • memorynint
  • allocationCountI
  • numElementsI

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
  • idxI
Returns
T

EnsureCapacity(int, bool)

public void EnsureCapacity(int num, bool force)
Parameters

FastRemove(I)

public void FastRemove(I elem)
Parameters
  • elemI

Find(T)

public I Find(T element)
Parameters
  • elementT
Returns
I

FindAndFastRemove(T)

public bool FindAndFastRemove(T value)
Parameters
  • valueT
Returns

FindAndRemove(T)

public bool FindAndRemove(T value)
Parameters
  • valueT
Returns

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<T> GetEnumerator()
Returns
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
  • idxI
Returns

IsValidIndex(I)

public bool IsValidIndex(I idx)
Parameters
  • idxI
Returns

Purge()

public void Purge()

Remove(I)

public void Remove(I elem)
Parameters
  • elemI

RemoveAll()

public void RemoveAll()

RemoveMultiple(I, I)

public void RemoveMultiple(I idx, I count)
Parameters
  • idxI
  • countI

RemoveMultipleFromHead(I)

public void RemoveMultipleFromHead(I count)
Parameters
  • countI

RemoveMultipleFromTail(I)

public void RemoveMultipleFromTail(I count)
Parameters
  • countI

SetCount(I)

public void SetCount(I count)
Parameters
  • countI

SetExternalBuffer(nint, I, I)

public void SetExternalBuffer(nint memory, I allocationCount, I numElements)
Parameters
  • memorynint
  • allocationCountI
  • numElementsI

SetSize(I)

public void SetSize(I size)
Parameters
  • sizeI

Tail()

public ref T Tail()
Returns
T

Fields

Allocated

public I Allocated
Field Value
I

Count

public I Count
Field Value
I

Elements

public nint Elements
Field Value