Class XRLoaderHelper
XR Loader abstract subclass used as a base class for specific provider implementations. Class provides some
helper logic that can be used to handle subsystem handling in a typesafe manner, reducing potential boilerplate
code.
Inheritance
System.Object
XRLoaderHelper
Syntax
public abstract class XRLoaderHelper : XRLoader
Fields
m_SubsystemInstanceMap
Map of loaded susbsystems. Used so we don't always have to fo to XRSubsystemManger and do a manual
search to find the instance we loaded.
Declaration
protected Dictionary<Type, ISubsystem> m_SubsystemInstanceMap
Field Value
| Type |
Description |
| System.Collections.Generic.Dictionary<System.Type, ISubsystem> |
|
Methods
CreateIntegratedSubsystem<TDescriptor, TSubsystem>(List<TDescriptor>, String)
Creates a native, integrated subsystem given a list of descriptors and a specific subsystem id.
Declaration
protected void CreateIntegratedSubsystem<TDescriptor, TSubsystem>(List<TDescriptor> descriptors, string id)where TDescriptor : IntegratedSubsystemDescriptor where TSubsystem : IntegratedSubsystem
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.List<TDescriptor> |
descriptors |
List of TDescriptor instances to use for subsystem matching.
|
| System.String |
id |
The identifier key of the particualr subsystem implementation being requested.
|
Type Parameters
| Name |
Description |
| TDescriptor |
|
| TSubsystem |
|
CreateIntegratedSubsystemHelper<TSubsystem>(IntegratedSubsystemDescriptor<TSubsystem>, String)
Declaration
protected ISubsystem CreateIntegratedSubsystemHelper<TSubsystem>(IntegratedSubsystemDescriptor<TSubsystem> descriptor, string id)where TSubsystem : IntegratedSubsystem
Parameters
| Type |
Name |
Description |
| IntegratedSubsystemDescriptor<TSubsystem> |
descriptor |
|
| System.String |
id |
|
Returns
| Type |
Description |
| ISubsystem |
|
Type Parameters
| Name |
Description |
| TSubsystem |
|
CreateStandaloneSubsystem<TDescriptor, TSubsystem>(List<TDescriptor>, String)
Creates a managed, standalone subsystem given a list of descriptors and a specific subsystem id.
Declaration
protected void CreateStandaloneSubsystem<TDescriptor, TSubsystem>(List<TDescriptor> descriptors, string id)where TDescriptor : SubsystemDescriptor where TSubsystem : Subsystem
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.List<TDescriptor> |
descriptors |
List of TDescriptor instances to use for subsystem matching.
|
| System.String |
id |
The identifier key of the particualr subsystem implementation being requested.
|
Type Parameters
| Name |
Description |
| TDescriptor |
|
| TSubsystem |
|
CreateSubsystemHelper<TSubsystem>(SubsystemDescriptor<TSubsystem>, String)
Declaration
protected ISubsystem CreateSubsystemHelper<TSubsystem>(SubsystemDescriptor<TSubsystem> descriptor, string id)where TSubsystem : Subsystem
Parameters
| Type |
Name |
Description |
| SubsystemDescriptor<TSubsystem> |
descriptor |
|
| System.String |
id |
|
Returns
| Type |
Description |
| ISubsystem |
|
Type Parameters
| Name |
Description |
| TSubsystem |
|
DestroySubsystem<T>()
Destroy a subsystem instance of a given type. Subsystem assumed to already be loaded from
a previous call to CreateSubsystem
Declaration
protected void DestroySubsystem<T>()where T : class, ISubsystem
Type Parameters
GetLoadedSubsystem<T>()
Gets the loaded subsystem of the specified type. Implementation dependent as only implemetnations
know what they have loaded and how best to get it..
Declaration
public override T GetLoadedSubsystem<T>()where T : class, ISubsystem
Returns
| Type |
Description |
| T |
The loaded subsystem or null if not found.
|
Type Parameters
Overrides
StartSubsystem<T>()
Start a subsystem instance of a given type. Subsystem assumed to already be loaded from
a previous call to CreateSubsystem
Declaration
protected void StartSubsystem<T>()where T : class, ISubsystem
Type Parameters
StopSubsystem<T>()
Stop a subsystem instance of a given type. Subsystem assumed to already be loaded from
a previous call to CreateSubsystem
Declaration
protected void StopSubsystem<T>()where T : class, ISubsystem
Type Parameters