Liking cljdoc? Tell your friends :D

automaton-simulation-de.entity

An entity is a part of the model living in the state with its lifecycle managed.

  • entity
  • entity state
  • lifestatus
An entity is a part of the model living in the `state` with its lifecycle managed.

* ![entity](archi/entity/entity.png)
* ![entity state](archi/entity/entity_state.png)
* ![lifestatus](archi/entity/lifestatus.png)
raw docstring

createclj/s

(create state date entity-name entity-data)

Creates an entity called :entity-name with entity-data. The lifecycle of this entity starts at date.

An error is documented if the entity is created already.

Creates an entity called `:entity-name` with `entity-data`. The lifecycle of this entity starts at `date`.

An error is documented if the entity is created already.
raw docstring

disposeclj/s

(dispose state date entity-name)

Disposing an entity by its entity-name is removing its data, its lifecycle will mark ::disposed at the current date.

Disposing an entity by its `entity-name` is removing its data, its lifecycle will mark `::disposed` at the current `date`.
raw docstring

error?clj/s

(error? {:automaton-simulation-de.entity/keys [entities] :as _state})

Detects an eror in the entities.

Detects an eror in the entities.
raw docstring

errorsclj/s

(errors state)
(errors state entity-name)

Returns entity errors if exists with a map associating a collection of errors to an entity-name

Returns entity errors if exists with a map associating a collection of errors to an `entity-name`
raw docstring

is-created?clj/s

(is-created? state entity-name)

Is the entity called :entity-name living?

Is the entity called `:entity-name` living?
raw docstring

is-disposed?clj/s

(is-disposed? state entity-name)

Is the entity called :entity-name disposed?

Is the entity called `:entity-name` disposed?
raw docstring

is-living?clj/s

(is-living? state entity-name)

Is the entity called :entity-name living?

Is the entity called `:entity-name` living?
raw docstring

lifecycle-corruptedclj/s

(lifecycle-corrupted {:automaton-simulation-de.simulation-engine/keys [state]
                      :as _snapshot}
                     _params)

Detects if one entity has a lifecycle error.

Detects if one entity has a lifecycle error.
raw docstring

lifecycle-statusclj/s

(lifecycle-status state entity-name)

The lifecycle has three possible fields ::created, ::living or :disposed depending on the position of the entity in its lifecycle.

The lifecycle has three possible fields `::created`, `::living` or `:disposed` depending on the position of the entity in its lifecycle.
raw docstring

stateclj/s

(state state entity-name)

Returns the state value of the entity called entity-name.

Returns the state value of the entity called `entity-name`.
raw docstring

stopping-definitionclj/s

(stopping-definition)

updateclj/s

(update state date entity-name f & args)

Update the entity called :entity-name with f applied to the existing value together with arguments args. The update of the entity is mark in the living lifecycle field.

Update the entity called `:entity-name` with `f` applied to the existing value together with arguments `args`.
The update of the entity is mark in the `living` lifecycle field.
raw docstring

wrap-modelclj/s

(wrap-model model)

Wraps a model to add necessary behavior to model an entity.

Wraps a model to add necessary behavior to model an entity.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close