Table of Contents

Namespace Typhon.Schema.Definition

Classes

ArchetypeAttribute

Marks a class as an ECS archetype. The archetype's durable identity is its Name (defaulting to the declaring CLR type's simple name); the engine assigns the per-process catalog id and the per-DB routing id automatically, and re-matches persisted archetypes by Name — then PreviousName — on reopen (feature #514 D1/D4 — no author-set id).

ComponentAttribute

Marks a struct as an ECS component type and carries its schema identity (Name, Revision) plus its storage and durability defaults. The annotated struct must be blittable (unmanaged) so components can be stored and persisted zero-copy.

ComponentFamilyAttribute

Marks a component struct as belonging to a named family. The Workbench Data Flow module groups components by family at the L2 granularity ("Component-family"). When the attribute is absent, a server-side naming heuristic (Spatial / Combat / AI / Inventory / Rendering / Networking / Input / Misc) classifies the component by its name. The attribute always wins over the heuristic.

DatabaseSchemaExtensions

Maps CLR types to their schema FieldType and computes the inline byte size a field of a given type occupies in component storage.

FieldAttribute

Overrides the schema identity of a component field. Optional — an unannotated field is still a schema field, keyed by its C# name with an auto-assigned id.

ForeignKeyAttribute

Declares a component field as a foreign key referencing another component type, enabling FK validation and cascade-on-delete behavior (see OnParentDelete).

GeneratedSchemaRegistry

Process-global sink for source-generated component schemas (feature #514). Each schema assembly's generated [ModuleInitializer] calls RegisterComponent(Type, ComponentSchemaSpec) exactly once at assembly load; the engine reads specs via TryGetComponentSpec(Type, out ComponentSchemaSpec) when building component definitions — so the schema build is reflection-free without the component implementing an interface (hence without the component needing to be partial).

IndexAttribute

Marks a component field for indexing, maintaining a B+Tree index over the field's values for lookups and range scans.

MurmurHash2

MurmurHash2 (32-bit) — a fast non-cryptographic hash used to hash byte/string content, e.g. for value hash codes and index bucketing.

SpatialIndexAttribute

Marks a spatial (AABB or bounding-sphere) component field for R-Tree indexing, enabling range and nearest-neighbor queries over its bounds.

Structs

AABB2D

Double-precision 2D axis-aligned bounding box, defined by its minimum and maximum corners.

AABB2F

Single-precision 2D axis-aligned bounding box, defined by its minimum and maximum corners.

AABB3D

Double-precision 3D axis-aligned bounding box, defined by its minimum and maximum corners.

AABB3F

Single-precision 3D axis-aligned bounding box, defined by its minimum and maximum corners.

BSphere2D

Double-precision 2D bounding sphere (circle), defined by its center and radius.

BSphere2F

Single-precision 2D bounding sphere (circle), defined by its center and radius.

BSphere3D

Double-precision 3D bounding sphere, defined by its center and radius.

BSphere3F

Single-precision 3D bounding sphere, defined by its center and radius.

ComponentCollection<T>

A component field holding a variable-length collection of unmanaged T values. The struct itself is a compact handle (a buffer id), so the owning component stays fixed-size and blittable; the elements live in a separate engine-managed buffer.

ComponentFieldSpec

Pure-data description of a single component field: its identity, CLR type, byte offset, and any array / index / foreign-key / spatial metadata. The engine maps DotNetType to its stored field type and applies field-id resolution (schema migration) when building the definition, so this spec carries the same inputs reflection would read from the struct — never a pre-resolved field id.

ComponentSchemaSpec

Pure-data description of one component revision's schema: its identity, storage/durability defaults, and ordered fields. Consumed by the engine's single build core (shared by reflection and the source generator) to produce the compiled component definition.

PackedDateTime48

A 6-byte (48-bit) packed UTC timestamp: DateTime ticks offset from the 1970-01-01 epoch and shifted right by PackedShift bits, giving ~102.4 µs resolution in half the footprint of a DateTime. Values before MinValue are not representable.

PackedTimeSpan32

A 4-byte (32-bit) packed TimeSpan: the tick count shifted right by PackedShift bits, giving ~102.4 µs resolution. Durations outside [MinValue, MaxValue] are not representable.

PackedTimeSpan48

A 6-byte (48-bit) packed TimeSpan: the tick count shifted right by PackedShift bits, giving ~102.4 µs resolution over a much wider range than PackedTimeSpan32. Durations outside [MinValue, MaxValue] are not representable.

Point2D

Double-precision 2D point / vector.

Point2F

Single-precision 2D point / vector.

Point3D

Double-precision 3D point / vector.

Point3F

Single-precision 3D point / vector.

Point4D

Double-precision 4D point / vector (homogeneous coordinates).

Point4F

Single-precision 4D point / vector (homogeneous coordinates).

QuaternionD

Double-precision quaternion. X, Y, Z are the vector part; W is the scalar part.

QuaternionF

Single-precision quaternion. X, Y, Z are the vector part; W is the scalar part.

String1024

A fixed 1024-byte inline UTF-8 string buffer — a blittable, fixed-size component field that stores its characters in place (no heap allocation).

String64

A fixed 64-byte inline UTF-8 string buffer — a blittable, fixed-size component field that stores up to 63 bytes plus a null terminator in place (no heap allocation). Input that does not fit is truncated to the buffer size. Comparison, equality, and hashing operate byte-wise over the inline buffer.

VarString

Marker type for a variable-length string field (String); its payload lives in the component's variable-size buffer, not inline.

Variant

Store data of a type determined at construction and formatted as a string

Interfaces

ISpatialBox

Marker interface narrowing generic cluster-spatial-query box parameters to the supported AABB variants. Implemented by AABB2F, AABB3F, AABB2D, and AABB3D. Consumed by Typhon.Engine.ClusterSpatialQuery<TArch>.AABB<TBox> (issue #230 Phase 2.5) to accept any of the 4 dimensionality × precision combinations as a query region while preserving native-precision reads at the API boundary.

Enums

CascadeAction

Cascade action when a parent entity is deleted.

DurabilityDiscipline

Runtime durability discipline for a SingleVersion-layout component — selected per transaction, orthogonal to the design-time StorageMode (which fixes the cluster layout) and to the per-UoW DurabilityMode (which fixes flush timing).

FieldType

Identifies the storage type of a component field. The two high bits Unsigned and DoubleFloat are flags OR-ed onto a base type to form its unsigned-integer or double-precision variant (e.g. UInt = Unsigned | Int); the remaining low ordinals identify the base types themselves.

SpatialMode

Controls whether a spatial-indexed component uses a static or dynamic R-Tree. Static trees skip tick-fence updates entirely; dynamic trees use fat AABBs for movement hysteresis.

StorageMode

Determines how a component's data is stored, persisted, and recovered. Immutable per ComponentTable after registration.