swiftlys2/docs/api/ai/
API Reference Natives

CUtlVector`1

Struct
Namespace: SwiftlyS2.Shared.Natives · Assembly: SwiftlyS2.CS2.dll
public struct CUtlVector<T> : IEnumerable<T>, IEnumerable
View source

Constructors

CUtlVector(int, int)

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

public CUtlVector(int growSize, int initSize)
Parameters

CUtlVector(nint, int, int)

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

public CUtlVector(nint memory, int allocationCount, int numElements)
Parameters

Properties

Base

public nint Base { get; }
Property Value

Capacity

public int Capacity { get; }
Property Value

Count

public int Count { get; }
Property Value

ElementSize

public int ElementSize { get; }
Property Value

this[int]

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

Methods

AddToHead(T)

public int AddToHead(T value)
Parameters
  • valueT
Returns

AddToTail(T)

public int AddToTail(T value)
Parameters
  • valueT
Returns

AddVectorToTail(CUtlVector<T>)

public int AddVectorToTail(CUtlVector<T> other)
Parameters
  • otherCUtlVector<T>
Returns

AssumeMemory(nint, int, int)

public void AssumeMemory(nint memory, int allocationCount, int numElements)
Parameters

DetachMemory()

public nint DetachMemory()
Returns

EnsureCapacity(int)

public void EnsureCapacity(int num)
Parameters

FastRemove(int)

public void FastRemove(int elem)
Parameters

FillWithValue(T)

public void FillWithValue(T value)
Parameters
  • valueT

Find(T)

public int Find(T value)
Parameters
  • valueT
Returns

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.

GrowVector(int)

public void GrowVector(int count)
Parameters

HasElement(T)

public bool HasElement(T value)
Parameters
  • valueT
Returns

Head()

public ref T Head()
Returns
T

InsertAfter(int, T)

public int InsertAfter(int idx, T value)
Parameters
Returns

InsertAfterIdx(int)

public int InsertAfterIdx(int elem)
Parameters
Returns

InsertBefore(int, T)

public int InsertBefore(int idx, T value)
Parameters
Returns

InsertBeforeIdx(int)

public int InsertBeforeIdx(int elem)
Parameters
Returns

IsValidIndex(int)

public bool IsValidIndex(int index)
Parameters
Returns

Purge()

public void Purge()

Remove(int)

public void Remove(int elem)
Parameters

RemoveAll()

public void RemoveAll()

RemoveMultiple(int, int)

public void RemoveMultiple(int idx, int count)
Parameters

RemoveMultipleFromHead(int)

public void RemoveMultipleFromHead(int count)
Parameters

RemoveMultipleFromTail(int)

public void RemoveMultipleFromTail(int count)
Parameters

SetExternalBuffer(nint, int, int, bool)

public void SetExternalBuffer(nint memory, int allocationCount, int numELements, bool readOnly)
Parameters

Tail()

public ref T Tail()
Returns
T