-
-
Notifications
You must be signed in to change notification settings - Fork 11
ComponentSingletonProvider
ctreffs edited this page Oct 8, 2020
·
1 revision
This component provider always returns the same instance of the component. The instance is created when first required and is of the type passed in to the initializer.
public final class ComponentSingletonProvider
Initializer
public init(type: ComponentInitializable.Type)
- type: The type of the single instance
Used to compare this provider with others. Any provider that returns the same single instance will be regarded as equivalent.
var identifier: AnyHashable
ObjectIdentifier of the single instance
Used to request a component from this provider
public func getComponent() -> Component
The single instance
Generated at 2020-11-25T10:28:11+0000 using swift-doc 1.0.0-beta.5.
Types
- ComponentAdded
- ComponentIdentifier
- ComponentInstanceProvider
- ComponentRemoved
- ComponentSingletonProvider
- ComponentTypeProvider
- ComponentsBuilder.Context
- ComponentsBuilderPreview
- DefaultCodingStrategy
- DynamicCodingKey
- DynamicComponentProvider
- DynamicComponentProvider.Closure
- Entity
- Entity.ComponentsIterator
- EntityCreated
- EntityDestroyed
- EntityIdentifier
- EntityState
- EntityStateMachine
- Family
- Family.ComponentsIterator
- Family.EntityComponentIterator
- Family.EntityIterator
- FamilyMemberAdded
- FamilyMemberBuilderPreview
- FamilyMemberRemoved
- FamilyTraitSet
- LinearIncrementingEntityIdGenerator
- ManagedContiguousArray
- Nexus
- Nexus.EntitiesIterator
- Requires1
- Requires2
- Requires3
- Requires4
- Requires5
- Requires6
- Requires7
- Requires8
- Single
- StateComponentMapping
- StringHashing
- UnorderedSparseSet
- UnorderedSparseSet.ElementIterator
Protocols
- CodingStrategy
- Component
- ComponentProvider
- DefaultInitializable
- EntityIdentifierGenerator
- FamilyDecoding
- FamilyEncoding
- FamilyRequirementsManaging
- NexusEvent
- NexusEventDelegate
- RequiringComponents1
- RequiringComponents2
- RequiringComponents3
- RequiringComponents4
- RequiringComponents5
- RequiringComponents6
- RequiringComponents7
- RequiringComponents8
- SingleComponent
- TopLevelDecoder
- TopLevelEncoder