Quantum 3 3.1.0

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

Collects event registrations and produces the id lookup tables. Ids are assigned on Commit: explicit ids are kept, the rest fill the remaining slots in alphabetical order of the type's full name. Registration order does not matter. More...

Inherited by Quantum.Statics.EventRegistryGen.

Public Member Functions

void Commit ()
 Assigns ids so they form a dense [0, count) range and resolves parent ids from base types. Afterwards the registry serves as the id lookup and accepts no further registrations. More...
 
void Register< T > (Action< int > idSetter)
 Collect an event type. More...
 
void Register< T > (int explicitId)
 Collect an event type with a fixed id. More...
 

Detailed Description

Collects event registrations and produces the id lookup tables. Ids are assigned on Commit: explicit ids are kept, the rest fill the remaining slots in alphabetical order of the type's full name. Registration order does not matter.

Member Function Documentation

◆ Register< T >() [1/2]

void Quantum.EventRegistry.Register< T > ( Action< int >  idSetter)
inline

Collect an event type.

Type Constraints
T :EventBase 

◆ Register< T >() [2/2]

void Quantum.EventRegistry.Register< T > ( int  explicitId)
inline

Collect an event type with a fixed id.

Type Constraints
T :EventBase 

◆ Commit()

void Quantum.EventRegistry.Commit ( )
inline

Assigns ids so they form a dense [0, count) range and resolves parent ids from base types. Afterwards the registry serves as the id lookup and accepts no further registrations.