Photon Quantum 3.0.0

Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Quantum.SystemsConfig Class Reference

A Quantum configuration asset that will create and start Quantum systems in a data-driven way when starting the simulation. Can be assigned to RuntimeConfig. If no config is assigned then a default selection of build-in systems is used (DeterministicSystemSetup.CreateSystems(RuntimeConfig, SimulationConfig, SystemsConfig). The systems to be used can always be changed by code inside DeterministicSystemSetup.AddSystemsUser(ICollection<SystemBase>, RuntimeConfig, SimulationConfig, SystemsConfig). More...

Inheritance diagram for Quantum.SystemsConfig:
Quantum.AssetObject Quantum.ILogSource

Classes

class  SubSubSystemEntry
 2nd sub level system type. More...
 
class  SubSystemEntry
 1st sub level system type. More...
 
class  SystemEntry
 Base system type. More...
 
class  SystemEntryBase
 To prevent indefinite recursion in Unity serialization system hierarchies are limited to 3 levels. More...
 
class  SystemEntryBase
 System that will be instantiated on simulation start. More...
 

Public Member Functions

SystemEntry AddSystem (Type systemType, string name=null, bool enabled=true)
 Add a system entry that describes a system to be instantiated on simulation start. More...
 
SystemEntry AddSystem< T > (string name=null, bool enabled=true)
 Add a system entry that describes a system to be instantiated on simulation start. More...
 
- Public Member Functions inherited from Quantum.AssetObject
virtual void Disposed (IResourceManager resourceManager, Native.Allocator allocator)
 Called when the asset object is disposed. More...
 
virtual void Loaded (IResourceManager resourceManager, Native.Allocator allocator)
 Called when the asset object is loaded. More...
 
virtual void Reset ()
 Resets the asset object. More...
 

Static Public Member Functions

static List< SystemBaseCreateSystems (SystemsConfig config)
 Converts the systems configuration into a list of system objects while calling the matching (Name, Children) constructors. This method throws AssertionExceptions on any invalid system configuration. More...
 
- Static Public Member Functions inherited from Quantum.AssetObject
static AssetObject Create (Type t)
 Creates a new instance of the specified type. More...
 
static T Create< T > ()
 Creates a new instance of the specified type. More...
 
static T Create< T > (Action< T > init)
 Creates a new instance of the specified type and initializes it. More...
 

Public Attributes

List< SystemEntryEntries = new()
 System entries to be instantiated on simulation start. More...
 
- Public Attributes inherited from Quantum.AssetObject
AssetObjectIdentifier Identifier
 The identifier of the asset object. More...
 
AssetObject Settings => this
 Gets the asset object settings. More...
 

Additional Inherited Members

- Properties inherited from Quantum.AssetObject
AssetGuid Guid [get, set]
 The GUID of the asset object. More...
 
string Path [get, set]
 The path of the asset object. Optional. More...
 

Detailed Description

A Quantum configuration asset that will create and start Quantum systems in a data-driven way when starting the simulation. Can be assigned to RuntimeConfig. If no config is assigned then a default selection of build-in systems is used (DeterministicSystemSetup.CreateSystems(RuntimeConfig, SimulationConfig, SystemsConfig). The systems to be used can always be changed by code inside DeterministicSystemSetup.AddSystemsUser(ICollection<SystemBase>, RuntimeConfig, SimulationConfig, SystemsConfig).

Member Function Documentation

◆ CreateSystems()

static List<SystemBase> Quantum.SystemsConfig.CreateSystems ( SystemsConfig  config)
inlinestatic

Converts the systems configuration into a list of system objects while calling the matching (Name, Children) constructors. This method throws AssertionExceptions on any invalid system configuration.

                                 SystemBase   
   __________________________________|___________________________________________________________
  |                 |                |                    |                     |                |

SystemGroup SystemMainThread SystemArrayComponent SystemArrayFilter SystemSignalsOnly SystemThreadedFilter children (SystemBase) | __________|__________ | | SystemMainThreadGroup SystemMainThreadFilter children (SystemMainThread)

◆ AddSystem< T >()

SystemEntry Quantum.SystemsConfig.AddSystem< T > ( string  name = null,
bool  enabled = true 
)
inline

Add a system entry that describes a system to be instantiated on simulation start.

Template Parameters
TSystem type
Parameters
nameSystem name
enabledSystem starts enabled
Returns
System entry that was added to the config
Type Constraints
T :SystemBase 

◆ AddSystem()

SystemEntry Quantum.SystemsConfig.AddSystem ( Type  systemType,
string  name = null,
bool  enabled = true 
)
inline

Add a system entry that describes a system to be instantiated on simulation start.

Parameters
systemTypeSystem type
nameSystem name
enabledSystem starts enabled
Returns
System entry that was added to the config
Exceptions
ArgumentNullExceptionIs raised of the systemType is null

Member Data Documentation

◆ Entries

List<SystemEntry> Quantum.SystemsConfig.Entries = new()

System entries to be instantiated on simulation start.