aztecs-0.8.0: A modular game engine and Entity-Component-System (ECS) for Haskell.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Aztecs.ECS.World.Components

Synopsis

Documentation

newtype ComponentID Source #

Component ID.

Constructors

ComponentID 

Fields

Instances

Instances details
Generic ComponentID Source # 
Instance details

Defined in Aztecs.ECS.Component

Associated Types

type Rep ComponentID :: Type -> Type #

Show ComponentID Source # 
Instance details

Defined in Aztecs.ECS.Component

NFData ComponentID Source # 
Instance details

Defined in Aztecs.ECS.Component

Methods

rnf :: ComponentID -> () #

Eq ComponentID Source # 
Instance details

Defined in Aztecs.ECS.Component

Ord ComponentID Source # 
Instance details

Defined in Aztecs.ECS.Component

type Rep ComponentID Source # 
Instance details

Defined in Aztecs.ECS.Component

type Rep ComponentID = D1 ('MetaData "ComponentID" "Aztecs.ECS.Component" "aztecs-0.8.0-5YWGoxTs0Vw9iciqZAe9GO" 'True) (C1 ('MetaCons "ComponentID" 'PrefixI 'True) (S1 ('MetaSel ('Just "unComponentId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

data Components Source #

Component ID map.

Instances

Instances details
Generic Components Source # 
Instance details

Defined in Aztecs.ECS.World.Components

Associated Types

type Rep Components :: Type -> Type #

Show Components Source # 
Instance details

Defined in Aztecs.ECS.World.Components

NFData Components Source # 
Instance details

Defined in Aztecs.ECS.World.Components

Methods

rnf :: Components -> () #

type Rep Components Source # 
Instance details

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)))

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.