The cl-fast-ecs Reference Manual

This is the cl-fast-ecs Reference Manual, version 0.9.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Tue Jul 15 03:49:33 2025 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-fast-ecs

Blazingly fast Entity-Component-System microframework.

Author

Andrew Kravchuk <>

Home Page

https://gitlab.com/lockie/cl-fast-ecs

License

MIT

Version

0.9.0

Dependencies
  • alexandria (system).
  • closer-mop (system).
  • global-vars (system).
  • trivial-adjust-simple-array (system).
Source

cl-fast-ecs.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 cl-fast-ecs/src

Source

cl-fast-ecs.asd.

Parent Component

cl-fast-ecs (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 cl-fast-ecs/cl-fast-ecs.asd

Source

cl-fast-ecs.asd.

Parent Component

cl-fast-ecs (system).

ASDF Systems

cl-fast-ecs.


4.1.2 cl-fast-ecs/src/package.lisp

Source

cl-fast-ecs.asd.

Parent Component

src (module).

Packages

cl-fast-ecs.


4.1.3 cl-fast-ecs/src/components.lisp

Dependencies
Source

cl-fast-ecs.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.4 cl-fast-ecs/src/entities.lisp

Dependencies
Source

cl-fast-ecs.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.5 cl-fast-ecs/src/hooks.lisp

Source

cl-fast-ecs.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.6 cl-fast-ecs/src/index.lisp

Dependency

storage.lisp (file).

Source

cl-fast-ecs.asd.

Parent Component

src (module).

Internals

4.1.7 cl-fast-ecs/src/storage.lisp

Dependency

hooks.lisp (file).

Source

cl-fast-ecs.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.8 cl-fast-ecs/src/systems.lisp

Dependencies
Source

cl-fast-ecs.asd.

Parent Component

src (module).

Public Interface
Internals

5 Packages

Packages are listed by definition order.


5.1 cl-fast-ecs

**NOTE: this software is of alpha quality, and the API is
subject to change.**

‘cl-fast-ecs‘ is a Common Lisp library providing an
implementation of the Entity-Component-System pattern, primarily focused on speed and interactive development.

ECS is an architectural data-oriented design pattern that allows for the effective processing of a large number of in-game objects while keeping the code and data separated. This provides flexibility in the way that game objects are built at runtime.

NOTE: to boost the performance extra 5-6%, but loose the ability to interactively (re)define components in the storage, add ‘:ECS-RELEASE‘ keyword into ‘*FEATURES*‘ before compiling the library.

Source

package.lisp.

Nickname

ecs

Use List
  • common-lisp.
  • trivial-adjust-simple-array.
Public Interface
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Special variables

Special Variable: *skip-printing-components*

A list of keywords denoting components that should be skipped while printing entities.

Package

cl-fast-ecs.

Source

entities.lisp.


6.1.2 Macros

Macro: defcomponent (name* &rest slots*)

Defines component structure with ‘NAME‘ and ‘SLOTS‘, allowing optional docstring, just like ‘DEFSTRUCT‘.

There’s extra keyword argument ‘:INDEX‘ to the slot definition, which, if set to symbol, creates a function referencing a hash table-based index for that slot allowing fast (amort. *O(1)*) lookups in form of "which set of entities have this exact slot value"; that might come in handy when implementing parent/child or other entity relationships. The downside of such index is that component add/delete/update operations take a little bit longer, and addition can trigger expensive table rehashing.

Additionally, when ‘:UNIQUE‘ is set to ‘T‘, such index ensures that entities and given slot values map 1 to 1, at least in value’s ‘SXHASH‘ sense. This might prove valuable when implementing entity names.

The index function always returns entities in strictly ascending order. It also takes optional keyword arguments ‘START‘ and ‘COUNT‘ allowing to limit the returned list of entities.

In addition, a ‘WITH-name‘ macro is defined for every index, allowing to iterate over entities in index without extra consing. Note that deleting entities from index while iterating with that macro is bad idea as it will lead to subtle logic errors.

There’s also ‘:GENERATED-FROM‘ argument to the slot definition, which, if set to the list of slot names, creates a generated slot akin to ‘GENERATED STORED‘ columns found in some relational databases. The value of such slot is calculated using its default expression, and is automatically recalculated when any of the slots specified in ‘:GENERATED-FROM‘ list are changed. Setting its value directly is impossible. A generated column could also be a part of an index.

The ‘NAME‘ argument could also be a lambda list of form
‘(NAME &KEY FINALIZE COMPOSITE-INDEX)‘. ‘FINALIZE‘ is a designator of function that’d be called when the entity with the component is deleted. It should take entity as the first argument and component slot values as keyword arguments with corresponding names. ‘COMPOSITE-INDEX‘ is lambda list of form
‘(NAME SLOTS &KEY UNIQUE)‘, which defines a composite index, i.e. index similar to single-slot index described above, but spawning several slots at once, supplied as ‘SLOTS‘ list. Composite index name cannot be the same as any slot name.

To be called from a top-level. Allows redefinition of component with the same ‘NAME‘ but different set of ‘SLOT‘s; all necessary storage will be properly reallocated.

This macro defines a following set of operations for given ‘NAME‘:

* an internal structure called ‘name-SOA‘ with its required internal machinery; * a constant ‘+name-COMPONENT-INDEX+‘ to reference component data within a storage;
* a component data accessors ‘name-slotName‘ and
‘(SETF name-slotName)‘ for every slot on a component, with *O(1)* complexity (their usage is discouraged though because of poor caching performance, in favour of defining a new system with ‘DEFSYSTEM‘);
* a component constructor aptly named ‘MAKE-name‘, which adds the component being defined to the given ‘ENTITY‘, with *O(k)* complexity, where *k* is the number of slots on the component. Note that trying to construct the component on an entity which already has that component is not an error, but produces warning when not in release mode;
* specialization of ‘MAKE-COMPONENT‘ generic on a component being defined; * a predicate called ‘HAS-name-P‘ testing whether given ‘ENTITY‘ has the component being defined, with *O(1)* complexity;
* a component destructor called ‘DELETE-name‘, removing the component being defined from the given ‘ENTITY‘ in *O(k)* complexity,where *k* is the number of slots on the component;
* specialization of ‘DELETE-COMPONENT‘ generic on a component being defined; * a convenience macro ‘WITH-name‘ akin to ‘WITH-SLOTS‘;
* an upsert operator ‘ASSIGN-name‘ which first ensures the component exists on given entity and then sets its values according to given keyword arguments, but keeps slots that weren’t specified to their previous values;
* specialization of ‘ASSIGN-COMPONENT‘ generic on a component being defined; * a ‘REPLACE-name‘ function which copies the component slot values from one given entity to another;
* a ‘RESET-name‘ function which sets component slot values to their default values for given entity;
* specialization of ‘RESET-COMPONENT‘ generic on a component being defined; * a ‘name-COUNT‘ helper function with no arguments which returns the current count of entities having this component;
* some internal helper macros;
* if ‘:INDEX‘ if set to a symbol for any slot, the function with the name denoted by that symbol is defined, taking slot value as an argument and returning the list of entities having such slot value;
* if ‘:UNIQUE‘ is specified and set to ‘T‘ in addition to ‘:INDEX‘, the index function returns a single entity having given slot value, or raises a condition if there’s no such entity. If the ‘:MISSING-ERROR-P‘ keyword argument to that function is ‘NIL‘, no condition is raised, but negative entity is returned instead.

Also runs hook ‘*COMPONENT-DEFINED-HOOK*‘ or ‘*COMPONENT-REDEFINED-HOOK*‘ when called, depending on circumstances.

Package

cl-fast-ecs.

Source

components.lisp.

Macro: defentity (name spec &optional documentation)

Defines a global variable named ‘NAME‘ holding an entity that is initialized automatically along with the data storage according to specification ‘SPEC‘ structured the same way as for ‘MAKE-OBJECT‘. Supports optional docstring via ‘DOCUMENTATION‘ argument.

NOTE: the variable is created by means of [global-vars](https://github.com/lmj/global-vars) library and hence cannot be dynamically bound.

See also: ‘MAKE-STORAGE‘.

Package

cl-fast-ecs.

Source

entities.lisp.

Macro: define-component (name &rest slots)

An alias for ‘DEFCOMPONENT‘.

Package

cl-fast-ecs.

Source

components.lisp.

Macro: define-entity (name spec &optional documentation)

An alias for ‘DEFENTITY‘.

Package

cl-fast-ecs.

Source

entities.lisp.

Macro: define-system (name (&key components-ro components-rw components-no arguments initially finally when enable with after before) &body body)

An alias for ‘DEFSYSTEM‘.

Package

cl-fast-ecs.

Source

systems.lisp.

Macro: defsystem (name (&key components-ro components-rw components-no arguments initially finally when enable with after before) &body body)

Defines a system with a given ‘NAME‘ and component sets ‘COMPONENTS-RO‘ and ‘COMPONENTS-RW‘ with read-only and read-write access to component slots, respectively. ‘COMPONENTS-NO‘ defines a list of components that should not appear on entities processed by the system. ‘ARGUMENTS‘ is a two-list of the keyword arguments the system expects to be passed via ‘RUN-SYSTEMS‘, just like in ‘FTYPE‘ declaration.

Can be called from a top-level or embedded into other form. Allows redefinition of system with the same ‘NAME‘ but different ‘BODY‘ or set of components.

Note that requested components should be defined with ‘DEFCOMPONENT‘ before defining the system.

The ‘BODY‘ of forms (with optional docstring) would be run for every entity containing all of the components from the given set, having the following bindings:

* ‘ENTITY‘ — the entity being processed;
* ‘ComponentName-SlotName‘ for every slot of every component specified.

The forms in ‘BODY‘ are enclosed in block named ‘CURRENT-ENTITY‘, so the processing could be skipped to the next entity by calling
‘(RETURN-FROM CURRENT-ENTITY)‘.

The ‘INITIALLY‘ form would be evaluated before the entities loop, and the ‘FINALLY‘ form would be evaluated after the loop and its value would be returned from the system.

The ‘WHEN‘ form is evaluated every entity loop iteration to check if that entity should be processed or not.

The ‘ENABLE‘ form is evaluated before the entity loop to check if the entire loop needs to run or not.

The ‘WITH‘ form, having lambda list ‘(VARS &KEY OF-TYPE =)‘, allows to initialize the local variables once before the loop starts. The ‘VARS‘ and ‘OF-TYPE‘ could be the single symbol or the list, and in latter case the required ‘=‘ argument should be mutliple values.

‘BEFORE‘ and ‘AFTER‘ lists denote names of systems that need to be run before and after the system being defined, respectively. If there are cycles in order graph defined by those arguments, a corresponding error is thrown. When both ‘BEFORE‘ and ‘AFTER‘ are ‘NIL‘, the last defined system would be executed first.

See also ‘RUN-SYSTEMS‘, ‘DELETE-SYSTEM‘.

Package

cl-fast-ecs.

Source

systems.lisp.

Macro: hook-up (hook fn)

Hooks up the function ‘FN‘ on the ‘HOOK‘.

Complexity: *O(m)*, where *m* is the number of functions on a given hook.

See also ‘UNHOOK‘.

Package

cl-fast-ecs.

Source

hooks.lisp.

Macro: unhook (hook fn)

Unhooks the function ‘FN‘ from the ‘HOOK‘.

If the function wasn’t registered with ‘HOOK-UP‘ on a given hook, this macro has no effect.

Complexity: *O(m)*, where *m* is the number of functions on a given hook.

Package

cl-fast-ecs.

Source

hooks.lisp.


6.1.3 Compiler macros

Compiler Macro: make-object (spec)
Package

cl-fast-ecs.

Source

entities.lisp.


6.1.4 Ordinary functions

Function: copy-entity (source &key destination except)

Copies all components present in ‘SOURCE‘ entity to ‘DESTINATION‘ entity (freshly created entity by default), overriding any existing data. Skips components denoted by keywords in optional ‘EXCEPT‘ list.

See also ‘REPLACE-COMPONENT‘.

Package

cl-fast-ecs.

Source

entities.lisp.

Function: delete-entity (entity)

Deletes given ‘ENTITY‘ and all of its components in the order they’ve been defined with ‘DEFCOMPONENT‘.

Complexity: amortized *O(m + log p)*, where *m* is the number of defined components, and *p* is the number of deleted & unreclaimed entities so far.

Package

cl-fast-ecs.

Source

entities.lisp.

Function: delete-system (name)

Deletes system identified by ‘NAME‘ (either string, symbol or keyword) that was previously defined with ‘DEFSYSTEM‘. Throws an error if there’s no system with given name.

Package

cl-fast-ecs.

Source

systems.lisp.

Function: entity-valid-p (entity)

Return ‘T‘ if entity is valid.

Complexity: *O(1)*.

Package

cl-fast-ecs.

Source

entities.lisp.

Function: make-entity ()

Creates and returns a new componentless entity.

Note that when no entities were deleted, ‘MAKE-ENTITY‘ returns new ones in strictly ascending order, i.e. the entities would be processed by systems in the order they’ve been created. When there are deleted entities, they’d be reclaimed by ‘MAKE-ENTITY‘.

Complexity: amortized *O(1)*.

See also ‘DELETE-ENTITY‘.

Package

cl-fast-ecs.

Source

entities.lisp.

Function: make-object (spec)

Creates and returns a new object (that is, an entity with a set of components) following specification ‘SPEC‘ structured as follows:

“‘
’((:component-name1 :component-slot1 "value1" :component-slot2 2.0) (:component-name2 :component-slot 42)
;; ...
)
“‘

Complexity: *O(m)*, where *m* is the number of components in the given ‘SPEC‘.

Not recommended for using in a tight loops such as systems, see ‘DEFCOMPONENT‘ documentation for alternatives.

For a technical reasons, the count of component specifiers in ‘SPEC‘ should not exceed 4000 (which is more than enough for any practical usage).

See also ‘MAKE-ENTITY‘, ‘DELETE-ENTITY‘.

Package

cl-fast-ecs.

Source

entities.lisp.

Function: make-storage (&key initial-allocated)

Initializes a new component data storage.

Optional ‘INITIAL-ALLOCATED‘ argument sets the initial count of pre-allocated entities and defaults to 32.

Note: this triggers initialization of entity variables defined by ‘DEFENTITY‘.

See also ‘*STORAGE*‘.

Package

cl-fast-ecs.

Source

storage.lisp.

Function: print-entities/picture (entities filename &key name-getter value-printer bg-color format keep-source)

Prints given list of ‘ENTITIES‘ to the picture identified by ‘FILENAME‘ and ‘FORMAT‘ (defaulting to PNG), and keeps Graphviz source file if ‘KEEP-SOURCE‘ is ‘T‘. Image’s background color could be specified by the string designator ‘BG-COLOR‘.

Entity names would be printed according to ‘NAME-GETTER‘, a function of one argument that takes an entity and returns any value. Component slot values would be printed according to ‘VALUE-PRINTER‘, a function of one argument that takes a value and returns its representation.

To be used in debugging and demo scenarios.

See also ‘*SKIP-PRINTING-COMPONENTS*‘.

Package

cl-fast-ecs.

Source

entities.lisp.

Function: print-entity (entity &optional stream)

Prints given ‘ENTITY‘ to the ‘STREAM‘ in a way that is compatible with ‘MAKE-OBJECT‘. To be used in debugging scenarios.

See also ‘*SKIP-PRINTING-COMPONENTS*‘.

Package

cl-fast-ecs.

Source

entities.lisp.

Function: run-systems (&rest arguments)

Runs all of the systems registered with ‘DEFSYSTEM‘ with given optional keyword ‘ARGUMENTS‘.

NOTE: creating or removing components between calls to ‘RUN-SYSTEMS‘ incurs small performance penalty on all affected systems because of recalculation of set of entities the system should process.

Package

cl-fast-ecs.

Source

systems.lisp.

Function: spec-adjoin (spec item)

Adjoins single non-empty component specification ‘ITEM‘ to object specification ‘SPEC‘ as if by ‘ADJOIN‘, i.e. if spec already has given component spec, returns it untouched, otherwise returns the new spec with given component spec added.

See also ‘MAKE-OBJECT‘.

Package

cl-fast-ecs.

Source

entities.lisp.

Function: system-ref (name)

Returns a system function object with given ‘NAME‘ (either
string, symbol or keyword); returns ‘NIL‘ if there’s no system with such name.

Package

cl-fast-ecs.

Source

systems.lisp.


6.1.5 Generic functions

Generic Function: assign-component (index entity &key &allow-other-keys)

An upsert operator which first ensures the component exists
on a given entity and then sets its values according to given keyword arguments, but keeps slots that weren’t specified to their previous values.

Not recommended for using in a tight loops such as systems, see ‘DEFCOMPONENT‘ documentation for alternatives.

Package

cl-fast-ecs.

Source

components.lisp.

Generic Function: delete-component (index entity)

Deletes a component from a given ‘ENTITY‘ in generic fashion.

Not recommended for using in a tight loops such as systems, see ‘DEFCOMPONENT‘ documentation for alternatives.

Package

cl-fast-ecs.

Source

components.lisp.

Generic Function: make-component (index entity &key &allow-other-keys)

Create a component on a given ‘ENTITY‘ in generic fashion.

Not recommended for using in a tight loops such as systems, see ‘DEFCOMPONENT‘ documentation for alternatives.

Package

cl-fast-ecs.

Source

components.lisp.

Generic Function: print-component (index entity &optional stream)

Prints component data to the given ‘STREAM‘.

See ‘PRINT-ENTITY‘.

Package

cl-fast-ecs.

Source

components.lisp.

Generic Function: replace-component (index source-entity dest-entity)

Copies component slot values from given ‘SOURCE-ENTITY‘ to
given ‘DEST-ENTITY‘ in generic fashion.

Not recommended for using in a tight loops such as systems, see ‘DEFCOMPONENT‘ documentation for alternatives.

Package

cl-fast-ecs.

Source

components.lisp.

Generic Function: reset-component (index entity)

Resets the values of component slots to their default values
for given ‘ENTITY‘.

Not recommended for using in a tight loops such as systems, see ‘DEFCOMPONENT‘ documentation for alternatives.

Package

cl-fast-ecs.

Source

components.lisp.


6.1.6 Standalone methods

Method: direct-slot-definition-class ((class component-soa-class) &rest initargs)
Package

sb-mop.

Source

storage.lisp.

Method: initialize-instance :after ((soa-class component-soa-class) &key &allow-other-keys)
Source

storage.lisp.

Method: print-object ((obj storage) stream)
Source

storage.lisp.

Method: shared-initialize :around ((soa-class component-soa-class) slots &rest initargs)
Source

storage.lisp.

Method: update-instance-for-redefined-class ((soa component-soa) added deleted plist &rest rest)
Source

storage.lisp.

Method: validate-superclass ((class component-soa-class) (super standard-class))
Package

sb-mop.

Source

storage.lisp.


6.1.7 Types

Type: entity ()

An entity type, basically just a ‘FIXNUM‘.

Package

cl-fast-ecs.

Source

storage.lisp.


6.2 Internals


6.2.1 Macros

Macro: defhook (name &key documentation)
Package

cl-fast-ecs.

Source

hooks.lisp.

Macro: index-bucket (index (&rest values))
Package

cl-fast-ecs.

Source

index.lisp.

Macro: index-delete (index entity (&rest values))
Package

cl-fast-ecs.

Source

index.lisp.

Macro: index-enumerate (index (&rest data) (&rest values) entity &body body)
Package

cl-fast-ecs.

Source

index.lisp.

Macro: index-insert (index (&rest data) entity (&rest values) unique)
Package

cl-fast-ecs.

Source

index.lisp.

Macro: index-lookup (index (&rest data) (&rest values) &optional count start)
Package

cl-fast-ecs.

Source

index.lisp.

Macro: index-lookup-1 (index (&rest data) (&rest values))
Package

cl-fast-ecs.

Source

index.lisp.

Macro: index-maybe-grow (index count (&rest data) exists min-entity max-entity)
Package

cl-fast-ecs.

Source

index.lisp.

Macro: unionf (place set &rest keywords)
Package

cl-fast-ecs.

Source

entities.lisp.

Macro: values-equal (entity data values)
Package

cl-fast-ecs.

Source

index.lisp.

Macro: with-checked-entity (entity &body body)
Package

cl-fast-ecs.

Source

entities.lisp.

Macro: with-storage ((&optional storage-var) &body body)
Package

cl-fast-ecs.

Source

storage.lisp.


6.2.2 Ordinary functions

Function: %accessor-decls (name index-var-name slot-names slot-defaults slot-types slot-docs slot-index slot-unique slot-generated-from composite-index-name composite-index-slots composite-index-unique)
Package

cl-fast-ecs.

Source

components.lisp.

Function: %append-to-hash-table (table key val)
Package

cl-fast-ecs.

Source

systems.lisp.

Function: %composite-index-accessor-decls (name struct-name slots unique slot-names slot-defaults slot-types)
Package

cl-fast-ecs.

Source

components.lisp.

Function: %ctor-decl (name index-var-name slot-names slot-defaults slot-types slot-index slot-unique slot-generated-from composite-index-name composite-index-slots composite-index-unique)
Package

cl-fast-ecs.

Source

components.lisp.

Function: %dtor-decl (name index-var-name slot-names slot-defaults slot-types finalize slot-index composite-index-name composite-index-slots)
Package

cl-fast-ecs.

Source

components.lisp.

Function: %get-storage ()
Package

cl-fast-ecs.

Source

storage.lisp.

Function: %index-accessor-decls (component-name index-var-name struct-name name type index unique)
Package

cl-fast-ecs.

Source

components.lisp.

Function: %make-storage (&key entities-count deleted-entities deleted-entities-count component-storages component-created-bits component-removed-bits)
Package

cl-fast-ecs.

Source

storage.lisp.

Function: %non-unique-error (name values slots)
Package

cl-fast-ecs.

Source

components.lisp.

Function: %quasiquotep (form)
Package

cl-fast-ecs.

Source

entities.lisp.

Function: %rebuild-entities-bitmap (entities-bitmap component-indices component-no-indices)
Package

cl-fast-ecs.

Source

systems.lisp.

Function: %reorder-systems! (new-system after before)

Topologically sort systems according to their BEFORE and AFTER constraints with respect to newly added system, using DFS.

Package

cl-fast-ecs.

Source

systems.lisp.

Function: %soa-decl (name documentation slot-names slot-defaults slot-types slot-index slot-unique composite-index-name composite-index-slots composite-index-unique)
Package

cl-fast-ecs.

Source

components.lisp.

Function: %unknown-system (system)
Package

cl-fast-ecs.

Source

systems.lisp.

Function: %update-composite-index (name slot soa value slot-names slot-types composite-index-name composite-index-slots composite-index-unique &rest body)
Package

cl-fast-ecs.

Source

components.lisp.

Function: %update-generated-slots (name slot soa value slot-names slot-defaults slot-types slot-index slot-unique slot-generated-from)
Package

cl-fast-ecs.

Source

components.lisp.

Function: %update-index (name slot soa data value index unique)
Package

cl-fast-ecs.

Source

components.lisp.

Function: %with-macro-decl (name index-var-name slot-names slot-defaults slot-types slot-index slot-unique slot-generated-from composite-index-name composite-index-slots composite-index-unique)
Package

cl-fast-ecs.

Source

components.lisp.

Function: binary-search (data value greater &key start end)
Package

cl-fast-ecs.

Source

index.lisp.

Function: copy-storage (instance)
Package

cl-fast-ecs.

Source

storage.lisp.

Function: format-symbol/component (component control &rest args)
Package

cl-fast-ecs.

Source

components.lisp.

Function: new-capacity (current-capacity)
Package

cl-fast-ecs.

Source

index.lisp.

Function: run-hook (hook &rest args)
Package

cl-fast-ecs.

Source

hooks.lisp.

Reader: storage-component-created-bits (instance)
Writer: (setf storage-component-created-bits) (instance)
Package

cl-fast-ecs.

Source

storage.lisp.

Target Slot

component-created-bits.

Reader: storage-component-removed-bits (instance)
Writer: (setf storage-component-removed-bits) (instance)
Package

cl-fast-ecs.

Source

storage.lisp.

Target Slot

component-removed-bits.

Reader: storage-component-storages (instance)
Writer: (setf storage-component-storages) (instance)
Package

cl-fast-ecs.

Source

storage.lisp.

Target Slot

component-storages.

Reader: storage-deleted-entities (instance)
Writer: (setf storage-deleted-entities) (instance)
Package

cl-fast-ecs.

Source

storage.lisp.

Target Slot

deleted-entities.

Reader: storage-deleted-entities-count (instance)
Writer: (setf storage-deleted-entities-count) (instance)
Package

cl-fast-ecs.

Source

storage.lisp.

Target Slot

deleted-entities-count.

Reader: storage-entities-count (instance)
Writer: (setf storage-entities-count) (instance)
Package

cl-fast-ecs.

Source

storage.lisp.

Target Slot

entities-count.

Function: storage-p (object)
Package

cl-fast-ecs.

Source

storage.lisp.


6.2.3 Generic functions

Generic Reader: component-soa-allocated (object)
Package

cl-fast-ecs.

Methods
Reader Method: component-soa-allocated ((component-soa component-soa))

automatically generated reader method

Source

storage.lisp.

Target Slot

allocated.

Generic Writer: (setf component-soa-allocated) (object)
Package

cl-fast-ecs.

Methods
Writer Method: (setf component-soa-allocated) ((component-soa component-soa))

automatically generated writer method

Source

storage.lisp.

Target Slot

allocated.

Generic Reader: component-soa-count (object)
Package

cl-fast-ecs.

Methods
Reader Method: component-soa-count ((component-soa component-soa))

automatically generated reader method

Source

storage.lisp.

Target Slot

count.

Generic Writer: (setf component-soa-count) (object)
Package

cl-fast-ecs.

Methods
Writer Method: (setf component-soa-count) ((component-soa component-soa))

automatically generated writer method

Source

storage.lisp.

Target Slot

count.

Generic Reader: component-soa-exists (object)
Package

cl-fast-ecs.

Methods
Reader Method: component-soa-exists ((component-soa component-soa))

automatically generated reader method

Source

storage.lisp.

Target Slot

exists.

Generic Writer: (setf component-soa-exists) (object)
Package

cl-fast-ecs.

Methods
Writer Method: (setf component-soa-exists) ((component-soa component-soa))

automatically generated writer method

Source

storage.lisp.

Target Slot

exists.

Generic Reader: component-soa-max-entity (object)
Package

cl-fast-ecs.

Methods
Reader Method: component-soa-max-entity ((component-soa component-soa))

automatically generated reader method

Source

storage.lisp.

Target Slot

max-entity.

Generic Writer: (setf component-soa-max-entity) (object)
Package

cl-fast-ecs.

Methods
Writer Method: (setf component-soa-max-entity) ((component-soa component-soa))

automatically generated writer method

Source

storage.lisp.

Target Slot

max-entity.

Generic Reader: component-soa-min-entity (object)
Package

cl-fast-ecs.

Methods
Reader Method: component-soa-min-entity ((component-soa component-soa))

automatically generated reader method

Source

storage.lisp.

Target Slot

min-entity.

Generic Writer: (setf component-soa-min-entity) (object)
Package

cl-fast-ecs.

Methods
Writer Method: (setf component-soa-min-entity) ((component-soa component-soa))

automatically generated writer method

Source

storage.lisp.

Target Slot

min-entity.

Generic Reader: obsoletep (object)
Package

cl-fast-ecs.

Methods
Reader Method: obsoletep ((component-soa-slot component-soa-slot))

automatically generated reader method

Source

storage.lisp.

Target Slot

obsoletep.

Generic Writer: (setf obsoletep) (object)
Package

cl-fast-ecs.

Methods
Writer Method: (setf obsoletep) ((component-soa-slot component-soa-slot))

automatically generated writer method

Source

storage.lisp.

Target Slot

obsoletep.

Generic Reader: slot-composite-index (object)
Package

cl-fast-ecs.

Methods
Reader Method: slot-composite-index ((component-soa-slot component-soa-slot))

automatically generated reader method

Source

storage.lisp.

Target Slot

slot-composite-index.

Generic Writer: (setf slot-composite-index) (object)
Package

cl-fast-ecs.

Methods
Writer Method: (setf slot-composite-index) ((component-soa-slot component-soa-slot))

automatically generated writer method

Source

storage.lisp.

Target Slot

slot-composite-index.

Generic Reader: slot-composite-index-unique (object)
Package

cl-fast-ecs.

Methods
Reader Method: slot-composite-index-unique ((component-soa-slot component-soa-slot))

automatically generated reader method

Source

storage.lisp.

Target Slot

slot-composite-index-unique.

Generic Writer: (setf slot-composite-index-unique) (object)
Package

cl-fast-ecs.

Methods
Writer Method: (setf slot-composite-index-unique) ((component-soa-slot component-soa-slot))

automatically generated writer method

Source

storage.lisp.

Target Slot

slot-composite-index-unique.

Generic Reader: slot-index (object)
Package

cl-fast-ecs.

Methods
Reader Method: slot-index ((component-soa-slot component-soa-slot))

automatically generated reader method

Source

storage.lisp.

Target Slot

slot-index.

Generic Writer: (setf slot-index) (object)
Package

cl-fast-ecs.

Methods
Writer Method: (setf slot-index) ((component-soa-slot component-soa-slot))

automatically generated writer method

Source

storage.lisp.

Target Slot

slot-index.

Generic Reader: slot-index-unique (object)
Package

cl-fast-ecs.

Methods
Reader Method: slot-index-unique ((component-soa-slot component-soa-slot))

automatically generated reader method

Source

storage.lisp.

Target Slot

slot-index-unique.

Generic Writer: (setf slot-index-unique) (object)
Package

cl-fast-ecs.

Methods
Writer Method: (setf slot-index-unique) ((component-soa-slot component-soa-slot))

automatically generated writer method

Source

storage.lisp.

Target Slot

slot-index-unique.

Generic Reader: slot-type (object)
Package

cl-fast-ecs.

Methods
Reader Method: slot-type ((component-soa-slot component-soa-slot))

automatically generated reader method

Source

storage.lisp.

Target Slot

slot-type.

Generic Writer: (setf slot-type) (object)
Package

cl-fast-ecs.

Methods
Writer Method: (setf slot-type) ((component-soa-slot component-soa-slot))

automatically generated writer method

Source

storage.lisp.

Target Slot

slot-type.


6.2.4 Structures

Structure: storage
Package

cl-fast-ecs.

Source

storage.lisp.

Direct superclasses

structure-object.

Direct methods

print-object.

Direct slots
Slot: entities-count
Type

alexandria:array-length

Initform

0

Readers

storage-entities-count.

Writers

(setf storage-entities-count).

Slot: deleted-entities
Type

(simple-array cl-fast-ecs:entity (*))

Readers

storage-deleted-entities.

Writers

(setf storage-deleted-entities).

Slot: deleted-entities-count
Type

alexandria:array-length

Initform

0

Readers

storage-deleted-entities-count.

Writers

(setf storage-deleted-entities-count).

Slot: component-storages
Type

(simple-array (or cl-fast-ecs::component-soa null) (*))

Readers

storage-component-storages.

Writers

(setf storage-component-storages).

Slot: component-created-bits
Type

simple-bit-vector

Readers

storage-component-created-bits.

Writers

(setf storage-component-created-bits).

Slot: component-removed-bits
Type

simple-bit-vector

Readers

storage-component-removed-bits.

Writers

(setf storage-component-removed-bits).


6.2.5 Classes

Class: component-soa
Package

cl-fast-ecs.

Source

storage.lisp.

Direct methods
Direct slots
Slot: allocated
Type

alexandria:array-length

Initform

cl-fast-ecs::*storage-entities-allocated*

Initargs

:allocated

Readers

component-soa-allocated.

Writers

(setf component-soa-allocated).

Slot: exists
Type

simple-bit-vector

Initform

(make-array cl-fast-ecs::*storage-entities-allocated* :element-type (quote bit) :initial-element 0)

Readers

component-soa-exists.

Writers

(setf component-soa-exists).

Slot: min-entity
Type

cl-fast-ecs:entity

Initform

array-dimension-limit

Readers

component-soa-min-entity.

Writers

(setf component-soa-min-entity).

Slot: max-entity
Type

cl-fast-ecs:entity

Initform

-1

Readers

component-soa-max-entity.

Writers

(setf component-soa-max-entity).

Slot: count
Package

common-lisp.

Type

alexandria:array-length

Initform

0

Readers

component-soa-count.

Writers

(setf component-soa-count).

Class: component-soa-class
Package

cl-fast-ecs.

Source

storage.lisp.

Direct superclasses

standard-class.

Direct methods
Class: component-soa-slot
Package

cl-fast-ecs.

Source

storage.lisp.

Direct superclasses

standard-direct-slot-definition.

Direct methods
Direct slots
Slot: slot-type
Initargs

:slot-type

Readers

slot-type.

Writers

(setf slot-type).

Slot: slot-index
Initargs

:slot-index

Readers

slot-index.

Writers

(setf slot-index).

Slot: slot-index-unique
Initargs

:slot-index-unique

Readers

slot-index-unique.

Writers

(setf slot-index-unique).

Slot: slot-composite-index
Initargs

:slot-composite-index

Readers

slot-composite-index.

Writers

(setf slot-composite-index).

Slot: slot-composite-index-unique
Initargs

:slot-composite-index-unique

Readers

slot-composite-index-unique.

Writers

(setf slot-composite-index-unique).

Slot: obsoletep
Initargs

:obsoletep

Readers

obsoletep.

Writers

(setf obsoletep).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
A   B   C   D   E   F   G   H   I   M   N   O   P   R   S   U   V   W  
Index Entry  Section

%
%accessor-decls: Private ordinary functions
%append-to-hash-table: Private ordinary functions
%composite-index-accessor-decls: Private ordinary functions
%ctor-decl: Private ordinary functions
%dtor-decl: Private ordinary functions
%get-storage: Private ordinary functions
%index-accessor-decls: Private ordinary functions
%make-storage: Private ordinary functions
%non-unique-error: Private ordinary functions
%quasiquotep: Private ordinary functions
%rebuild-entities-bitmap: Private ordinary functions
%reorder-systems!: Private ordinary functions
%soa-decl: Private ordinary functions
%unknown-system: Private ordinary functions
%update-composite-index: Private ordinary functions
%update-generated-slots: Private ordinary functions
%update-index: Private ordinary functions
%with-macro-decl: Private ordinary functions

(
(setf component-soa-allocated): Private generic functions
(setf component-soa-allocated): Private generic functions
(setf component-soa-count): Private generic functions
(setf component-soa-count): Private generic functions
(setf component-soa-exists): Private generic functions
(setf component-soa-exists): Private generic functions
(setf component-soa-max-entity): Private generic functions
(setf component-soa-max-entity): Private generic functions
(setf component-soa-min-entity): Private generic functions
(setf component-soa-min-entity): Private generic functions
(setf obsoletep): Private generic functions
(setf obsoletep): Private generic functions
(setf slot-composite-index): Private generic functions
(setf slot-composite-index): Private generic functions
(setf slot-composite-index-unique): Private generic functions
(setf slot-composite-index-unique): Private generic functions
(setf slot-index): Private generic functions
(setf slot-index): Private generic functions
(setf slot-index-unique): Private generic functions
(setf slot-index-unique): Private generic functions
(setf slot-type): Private generic functions
(setf slot-type): Private generic functions
(setf storage-component-created-bits): Private ordinary functions
(setf storage-component-removed-bits): Private ordinary functions
(setf storage-component-storages): Private ordinary functions
(setf storage-deleted-entities): Private ordinary functions
(setf storage-deleted-entities-count): Private ordinary functions
(setf storage-entities-count): Private ordinary functions

A
assign-component: Public generic functions

B
binary-search: Private ordinary functions

C
Compiler Macro, make-object: Public compiler macros
component-soa-allocated: Private generic functions
component-soa-allocated: Private generic functions
component-soa-count: Private generic functions
component-soa-count: Private generic functions
component-soa-exists: Private generic functions
component-soa-exists: Private generic functions
component-soa-max-entity: Private generic functions
component-soa-max-entity: Private generic functions
component-soa-min-entity: Private generic functions
component-soa-min-entity: Private generic functions
copy-entity: Public ordinary functions
copy-storage: Private ordinary functions

D
defcomponent: Public macros
defentity: Public macros
defhook: Private macros
define-component: Public macros
define-entity: Public macros
define-system: Public macros
defsystem: Public macros
delete-component: Public generic functions
delete-entity: Public ordinary functions
delete-system: Public ordinary functions
direct-slot-definition-class: Public standalone methods

E
entity-valid-p: Public ordinary functions

F
format-symbol/component: Private ordinary functions
Function, %accessor-decls: Private ordinary functions
Function, %append-to-hash-table: Private ordinary functions
Function, %composite-index-accessor-decls: Private ordinary functions
Function, %ctor-decl: Private ordinary functions
Function, %dtor-decl: Private ordinary functions
Function, %get-storage: Private ordinary functions
Function, %index-accessor-decls: Private ordinary functions
Function, %make-storage: Private ordinary functions
Function, %non-unique-error: Private ordinary functions
Function, %quasiquotep: Private ordinary functions
Function, %rebuild-entities-bitmap: Private ordinary functions
Function, %reorder-systems!: Private ordinary functions
Function, %soa-decl: Private ordinary functions
Function, %unknown-system: Private ordinary functions
Function, %update-composite-index: Private ordinary functions
Function, %update-generated-slots: Private ordinary functions
Function, %update-index: Private ordinary functions
Function, %with-macro-decl: Private ordinary functions
Function, (setf storage-component-created-bits): Private ordinary functions
Function, (setf storage-component-removed-bits): Private ordinary functions
Function, (setf storage-component-storages): Private ordinary functions
Function, (setf storage-deleted-entities): Private ordinary functions
Function, (setf storage-deleted-entities-count): Private ordinary functions
Function, (setf storage-entities-count): Private ordinary functions
Function, binary-search: Private ordinary functions
Function, copy-entity: Public ordinary functions
Function, copy-storage: Private ordinary functions
Function, delete-entity: Public ordinary functions
Function, delete-system: Public ordinary functions
Function, entity-valid-p: Public ordinary functions
Function, format-symbol/component: Private ordinary functions
Function, make-entity: Public ordinary functions
Function, make-object: Public ordinary functions
Function, make-storage: Public ordinary functions
Function, new-capacity: Private ordinary functions
Function, print-entities/picture: Public ordinary functions
Function, print-entity: Public ordinary functions
Function, run-hook: Private ordinary functions
Function, run-systems: Public ordinary functions
Function, spec-adjoin: Public ordinary functions
Function, storage-component-created-bits: Private ordinary functions
Function, storage-component-removed-bits: Private ordinary functions
Function, storage-component-storages: Private ordinary functions
Function, storage-deleted-entities: Private ordinary functions
Function, storage-deleted-entities-count: Private ordinary functions
Function, storage-entities-count: Private ordinary functions
Function, storage-p: Private ordinary functions
Function, system-ref: Public ordinary functions

G
Generic Function, (setf component-soa-allocated): Private generic functions
Generic Function, (setf component-soa-count): Private generic functions
Generic Function, (setf component-soa-exists): Private generic functions
Generic Function, (setf component-soa-max-entity): Private generic functions
Generic Function, (setf component-soa-min-entity): Private generic functions
Generic Function, (setf obsoletep): Private generic functions
Generic Function, (setf slot-composite-index): Private generic functions
Generic Function, (setf slot-composite-index-unique): Private generic functions
Generic Function, (setf slot-index): Private generic functions
Generic Function, (setf slot-index-unique): Private generic functions
Generic Function, (setf slot-type): Private generic functions
Generic Function, assign-component: Public generic functions
Generic Function, component-soa-allocated: Private generic functions
Generic Function, component-soa-count: Private generic functions
Generic Function, component-soa-exists: Private generic functions
Generic Function, component-soa-max-entity: Private generic functions
Generic Function, component-soa-min-entity: Private generic functions
Generic Function, delete-component: Public generic functions
Generic Function, make-component: Public generic functions
Generic Function, obsoletep: Private generic functions
Generic Function, print-component: Public generic functions
Generic Function, replace-component: Public generic functions
Generic Function, reset-component: Public generic functions
Generic Function, slot-composite-index: Private generic functions
Generic Function, slot-composite-index-unique: Private generic functions
Generic Function, slot-index: Private generic functions
Generic Function, slot-index-unique: Private generic functions
Generic Function, slot-type: Private generic functions

H
hook-up: Public macros

I
index-bucket: Private macros
index-delete: Private macros
index-enumerate: Private macros
index-insert: Private macros
index-lookup: Private macros
index-lookup-1: Private macros
index-maybe-grow: Private macros
initialize-instance: Public standalone methods

M
Macro, defcomponent: Public macros
Macro, defentity: Public macros
Macro, defhook: Private macros
Macro, define-component: Public macros
Macro, define-entity: Public macros
Macro, define-system: Public macros
Macro, defsystem: Public macros
Macro, hook-up: Public macros
Macro, index-bucket: Private macros
Macro, index-delete: Private macros
Macro, index-enumerate: Private macros
Macro, index-insert: Private macros
Macro, index-lookup: Private macros
Macro, index-lookup-1: Private macros
Macro, index-maybe-grow: Private macros
Macro, unhook: Public macros
Macro, unionf: Private macros
Macro, values-equal: Private macros
Macro, with-checked-entity: Private macros
Macro, with-storage: Private macros
make-component: Public generic functions
make-entity: Public ordinary functions
make-object: Public compiler macros
make-object: Public ordinary functions
make-storage: Public ordinary functions
Method, (setf component-soa-allocated): Private generic functions
Method, (setf component-soa-count): Private generic functions
Method, (setf component-soa-exists): Private generic functions
Method, (setf component-soa-max-entity): Private generic functions
Method, (setf component-soa-min-entity): Private generic functions
Method, (setf obsoletep): Private generic functions
Method, (setf slot-composite-index): Private generic functions
Method, (setf slot-composite-index-unique): Private generic functions
Method, (setf slot-index): Private generic functions
Method, (setf slot-index-unique): Private generic functions
Method, (setf slot-type): Private generic functions
Method, component-soa-allocated: Private generic functions
Method, component-soa-count: Private generic functions
Method, component-soa-exists: Private generic functions
Method, component-soa-max-entity: Private generic functions
Method, component-soa-min-entity: Private generic functions
Method, direct-slot-definition-class: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, obsoletep: Private generic functions
Method, print-object: Public standalone methods
Method, shared-initialize: Public standalone methods
Method, slot-composite-index: Private generic functions
Method, slot-composite-index-unique: Private generic functions
Method, slot-index: Private generic functions
Method, slot-index-unique: Private generic functions
Method, slot-type: Private generic functions
Method, update-instance-for-redefined-class: Public standalone methods
Method, validate-superclass: Public standalone methods

N
new-capacity: Private ordinary functions

O
obsoletep: Private generic functions
obsoletep: Private generic functions

P
print-component: Public generic functions
print-entities/picture: Public ordinary functions
print-entity: Public ordinary functions
print-object: Public standalone methods

R
replace-component: Public generic functions
reset-component: Public generic functions
run-hook: Private ordinary functions
run-systems: Public ordinary functions

S
shared-initialize: Public standalone methods
slot-composite-index: Private generic functions
slot-composite-index: Private generic functions
slot-composite-index-unique: Private generic functions
slot-composite-index-unique: Private generic functions
slot-index: Private generic functions
slot-index: Private generic functions
slot-index-unique: Private generic functions
slot-index-unique: Private generic functions
slot-type: Private generic functions
slot-type: Private generic functions
spec-adjoin: Public ordinary functions
storage-component-created-bits: Private ordinary functions
storage-component-removed-bits: Private ordinary functions
storage-component-storages: Private ordinary functions
storage-deleted-entities: Private ordinary functions
storage-deleted-entities-count: Private ordinary functions
storage-entities-count: Private ordinary functions
storage-p: Private ordinary functions
system-ref: Public ordinary functions

U
unhook: Public macros
unionf: Private macros
update-instance-for-redefined-class: Public standalone methods

V
validate-superclass: Public standalone methods
values-equal: Private macros

W
with-checked-entity: Private macros
with-storage: Private macros


A.3 Variables

Jump to:   *  
A   C   D   E   M   O   S  
Index Entry  Section

*
*skip-printing-components*: Public special variables

A
allocated: Private classes

C
component-created-bits: Private structures
component-removed-bits: Private structures
component-storages: Private structures
count: Private classes

D
deleted-entities: Private structures
deleted-entities-count: Private structures

E
entities-count: Private structures
exists: Private classes

M
max-entity: Private classes
min-entity: Private classes

O
obsoletep: Private classes

S
Slot, allocated: Private classes
Slot, component-created-bits: Private structures
Slot, component-removed-bits: Private structures
Slot, component-storages: Private structures
Slot, count: Private classes
Slot, deleted-entities: Private structures
Slot, deleted-entities-count: Private structures
Slot, entities-count: Private structures
Slot, exists: Private classes
Slot, max-entity: Private classes
Slot, min-entity: Private classes
Slot, obsoletep: Private classes
Slot, slot-composite-index: Private classes
Slot, slot-composite-index-unique: Private classes
Slot, slot-index: Private classes
Slot, slot-index-unique: Private classes
Slot, slot-type: Private classes
slot-composite-index: Private classes
slot-composite-index-unique: Private classes
slot-index: Private classes
slot-index-unique: Private classes
slot-type: Private classes
Special Variable, *skip-printing-components*: Public special variables


A.4 Data types

Jump to:   C   E   F   H   I   M   P   S   T  
Index Entry  Section

C
cl-fast-ecs: The cl-fast-ecs system
cl-fast-ecs: The cl-fast-ecs package
cl-fast-ecs.asd: The cl-fast-ecs/cl-fast-ecs․asd file
Class, component-soa: Private classes
Class, component-soa-class: Private classes
Class, component-soa-slot: Private classes
component-soa: Private classes
component-soa-class: Private classes
component-soa-slot: Private classes
components.lisp: The cl-fast-ecs/src/components․lisp file

E
entities.lisp: The cl-fast-ecs/src/entities․lisp file
entity: Public types

F
File, cl-fast-ecs.asd: The cl-fast-ecs/cl-fast-ecs․asd file
File, components.lisp: The cl-fast-ecs/src/components․lisp file
File, entities.lisp: The cl-fast-ecs/src/entities․lisp file
File, hooks.lisp: The cl-fast-ecs/src/hooks․lisp file
File, index.lisp: The cl-fast-ecs/src/index․lisp file
File, package.lisp: The cl-fast-ecs/src/package․lisp file
File, storage.lisp: The cl-fast-ecs/src/storage․lisp file
File, systems.lisp: The cl-fast-ecs/src/systems․lisp file

H
hooks.lisp: The cl-fast-ecs/src/hooks․lisp file

I
index.lisp: The cl-fast-ecs/src/index․lisp file

M
Module, src: The cl-fast-ecs/src module

P
Package, cl-fast-ecs: The cl-fast-ecs package
package.lisp: The cl-fast-ecs/src/package․lisp file

S
src: The cl-fast-ecs/src module
storage: Private structures
storage.lisp: The cl-fast-ecs/src/storage․lisp file
Structure, storage: Private structures
System, cl-fast-ecs: The cl-fast-ecs system
systems.lisp: The cl-fast-ecs/src/systems․lisp file

T
Type, entity: Public types