Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Aztecs.ECS.World.Components
Synopsis
- newtype ComponentID = ComponentID {
- unComponentId :: Int
- data Components = Components {}
- empty :: Components
- lookup :: forall a. Typeable a => Components -> Maybe ComponentID
- insert :: forall a. Component a => Components -> (ComponentID, Components)
- insert' :: forall c. Component c => Components -> (ComponentID, Components)
Documentation
newtype ComponentID Source #
Component ID.
Constructors
ComponentID | |
Fields
|
Instances
data Components Source #
Component ID map.
Constructors
Components | |
Fields
|
Instances
Generic Components Source # | |
Defined in Aztecs.ECS.World.Components Associated Types type Rep Components :: Type -> Type # | |
Show Components Source # | |
Defined in Aztecs.ECS.World.Components Methods showsPrec :: Int -> Components -> ShowS # show :: Components -> String # showList :: [Components] -> ShowS # | |
NFData Components Source # | |
Defined in Aztecs.ECS.World.Components Methods rnf :: Components -> () # | |
type Rep Components Source # | |
Defined in Aztecs.ECS.World.Components type Rep Components = D1 ('MetaData "Components" "Aztecs.ECS.World.Components" "aztecs-0.8.0-5YWGoxTs0Vw9iciqZAe9GO" 'False) (C1 ('MetaCons "Components" 'PrefixI 'True) (S1 ('MetaSel ('Just "componentIds") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map TypeRep ComponentID)) :*: S1 ('MetaSel ('Just "nextComponentId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ComponentID))) |
empty :: Components Source #
Empty Components
.
lookup :: forall a. Typeable a => Components -> Maybe ComponentID Source #
Lookup a component ID by type.
insert :: forall a. Component a => Components -> (ComponentID, Components) Source #
Insert a component ID by type, if it does not already exist.
insert' :: forall c. Component c => Components -> (ComponentID, Components) Source #
Insert a component ID by type.