Quantum 3 3.1.0

Public Member Functions | Static Public Member Functions | List of all members
Quantum.Statics Class Reference

Static type registry is completed by code generation. More...

Public Member Functions

partial record ComponentRegistrations (ComponentRegistry registry)
 Collects every component type into a ComponentRegistry. Code generation adds one field initializer per qtn file across partial declarations of this record, each calling a generated static method that registers its components on the primary-constructor registry; constructing an instance runs them all. Ids are not assigned here — ComponentRegistry.Commit derives them from the complete set, so initializer order across partial parts does not matter. More...
 
partial record EventRegistrations (EventRegistryGen registry)
 Collects every event type into an EventRegistryGen. For each codegen module, code generation adds a partial declaration of this record with one field initializer that calls a generated static method; that method registers the module's events on the primary-constructor registry. Constructing an instance runs all of them. Registering does not assign ids. Commit assigns them once the complete set is known: explicit ids are kept and the remaining events fill the free slots. More...
 
partial record TypeRegistrations (TypeRegistry registry)
 Registers every simulation type's size into a TypeRegistry. Code generation adds one field initializer per qtn file across partial declarations of this record, each calling a generated static method that registers its types on the primary-constructor registry; constructing an instance runs them all. IL2CPP printer instantiations are anchored separately by the generated per-file [Preserve] members, not here. More...
 

Static Public Member Functions

static void RegisterSimulationTypes (TypeRegistry typeRegistry)
 Register Quantum types. Use RegisterSimulationTypesUser partial method to extend. More...
 

Detailed Description

Static type registry is completed by code generation.

Member Function Documentation

◆ ComponentRegistrations()

partial record Quantum.Statics.ComponentRegistrations ( ComponentRegistry  registry)
inline

Collects every component type into a ComponentRegistry. Code generation adds one field initializer per qtn file across partial declarations of this record, each calling a generated static method that registers its components on the primary-constructor registry; constructing an instance runs them all. Ids are not assigned here — ComponentRegistry.Commit derives them from the complete set, so initializer order across partial parts does not matter.

◆ EventRegistrations()

partial record Quantum.Statics.EventRegistrations ( EventRegistryGen  registry)
inline

Collects every event type into an EventRegistryGen. For each codegen module, code generation adds a partial declaration of this record with one field initializer that calls a generated static method; that method registers the module's events on the primary-constructor registry. Constructing an instance runs all of them. Registering does not assign ids. Commit assigns them once the complete set is known: explicit ids are kept and the remaining events fill the free slots.

Returns the reference-based hash code of this instance, instead of the value-based one a record would generate.

Compares by reference, instead of comparing all fields as a record would.

Parameters
otherThe instance to compare with.
Returns
true if other is this instance.

Commits the registry, which assigns the event ids, and returns it. After this call no more events can be registered.

◆ RegisterSimulationTypes()

static void Quantum.Statics.RegisterSimulationTypes ( TypeRegistry  typeRegistry)
inlinestatic

Register Quantum types. Use RegisterSimulationTypesUser partial method to extend.

Parameters
typeRegistryType registry.

◆ TypeRegistrations()

partial record Quantum.Statics.TypeRegistrations ( TypeRegistry  registry)
inline

Registers every simulation type's size into a TypeRegistry. Code generation adds one field initializer per qtn file across partial declarations of this record, each calling a generated static method that registers its types on the primary-constructor registry; constructing an instance runs them all. IL2CPP printer instantiations are anchored separately by the generated per-file [Preserve] members, not here.