SwiftlyS2

CUtlVector

Struct CUtlVector

Namespace: SwiftlyS2.Shared.Natives

Assembly: SwiftlyS2.CS2.dll

public struct CUtlVector<T> : IEnumerable<T>, IEnumerable
Type Parameters
  • T

Implements

Inherited Members

Constructors

CUtlVector(int, int)

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

public CUtlVector(int growSize, int initSize)
Parameters

CUtlVector(nint, int, int)

Please use SwiftlyS2.Shared.Natives.ManagedCUtlVector%601 instead to construct it. If you really want to use this, you should call SwiftlyS2.Shared.Natives.CUtlVector%601.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

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

Methods

AddToHead(T)

public int AddToHead(T value)
Parameters
  • value T
Returns

AddToTail(T)

public int AddToTail(T value)
Parameters
  • value T
Returns

AddVectorToTail(CUtlVector<T>)

public int AddVectorToTail(CUtlVector<T> other)
Parameters
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
  • value T

Find(T)

public int Find(T value)
Parameters
  • value T
Returns

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.

GrowVector(int)

public void GrowVector(int count)
Parameters

HasElement(T)

public bool HasElement(T value)
Parameters
  • value T
Returns
public ref T Head()
Returns
  • T

InsertAfter(int, T)

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

InsertAfterIdx(int)

public int InsertAfterIdx(int elem)
Parameters
Returns

InsertBefore(int, T)

public int InsertBefore(int idx, T value)
Parameters
  • idx int
  • value T
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

On this page