Table of Contents

Class FamilyVector<T>

Namespace
WoWLib
Assembly
WoWLib.dll

The version-agnostic view of a welded family's SEQUENCE member — a vector or fixed array whose elements are per-version welded classes — element-typed as the element's own family base. It is what lets base-typed code walk such a member without naming a version: Count and the indexer read through to the concrete version's native container LIVE (no copy; mutating an element view writes through), and the indexer's setter version-checks the assigned element — a wrong-version element throws InvalidCastException, the same contract as the family surface's single-member setters. Size-changing operations are deliberately absent: a fixed-array member has none at all, and growing a vector takes version-specific elements anyway — pattern-match to the concrete class and use its own member for Add/Clear. foreach is supported (the nested Enumerator is the standard allocation-free pattern).

public sealed class FamilyVector<T> where T : class

Type Parameters

T
Inheritance
FamilyVector<T>
Inherited Members

Constructors

FamilyVector(Func<int>, Func<int, T>, Action<int, T>?)

public FamilyVector(Func<int> count, Func<int, T> get, Action<int, T>? set = null)

Parameters

count Func<int>
get Func<int, T>
set Action<int, T>

Properties

Count

public int Count { get; }

Property Value

int

this[int]

public T this[int i] { get; set; }

Parameters

i int

Property Value

T

Methods

GetEnumerator()

public FamilyVector<T>.Enumerator GetEnumerator()

Returns

FamilyVector<T>.Enumerator