Liking cljdoc? Tell your friends :D

com.fulcrologic.statecharts.data-model.working-memory-data-model

An implementation of DataModel that stores the data in working memory itself.

Supports using src in data model for CLJ ONLY, which must be a URI that clojure.java.io/reader would accept.

There are two implementations: One where data is scoped to the state, and another where it is global.

An implementation of DataModel that stores the data in working memory itself.

Supports using `src` in data model for CLJ ONLY, which must be a URI that clojure.java.io/reader
would accept.

There are two implementations: One where data is scoped to the state, and another where it is global.
raw docstring

FlatWorkingMemoryDataModelcljs

source

new-flat-modelclj/s

(new-flat-model)

Creates a data model where data is stored in the working memory of the state machine. ALL data scoped to a single map. Location paths work like get-in and assoc-in on that map. The special location path :ROOT is simply ignored. The keys [:ROOT :a] === [:a] === :a

Creates a data model where data is stored in the working memory of the state machine.
ALL data scoped to a single map. Location paths work like get-in and assoc-in on that map. The special location
path `:ROOT` is simply ignored. The keys [:ROOT :a] === [:a] === :a

sourceraw docstring

new-modelclj/s

(new-model)

Creates a data model where data is stored in the working memory of the state machine. The data is scoped to the state it is declared or set in (visible to states below it). Locations in this data model are [state-id key], where the special state-id :ROOT stands for the top-level machine scope. Using a keyword as a location is resolved relative to the current state, then parent, parent parent, etc.

current-data is a merge of all data for the contextual state from root, with each nested state overriding anything that appeared in a parent state.

get-at will NOT walk scopes, but supports simple keywords for the current context, and paths of the form [state-id data-key]. The special state-id :ROOT is reserved for those at the top-most level.

The operations implemented for this model can be extended by adding to the multimethod run-op.

WARNING: This model is not recommended for many use-cases. The contextual paths turn out to be rather difficult to reason about. The flat data model is recommended.

Creates a data model where data is stored in the working memory of the state machine.
The data is scoped to the state it is declared or set in (visible to states
below it). Locations in this data model are [state-id key], where the special state-id :ROOT stands
for the top-level machine scope.  Using a keyword as a location is resolved relative to the current
state, then parent, parent parent, etc.

`current-data` is a merge of all data for the contextual state from root, with each nested state overriding anything
that appeared in a parent state.

`get-at` will NOT walk scopes, but supports simple keywords for the current context,
and paths of the form `[state-id data-key]`. The special state-id `:ROOT` is reserved for those at the top-most level.

The operations implemented for this model can be extended by adding to the multimethod `run-op`.

WARNING: This model is not recommended for many use-cases. The contextual paths turn out to be
rather difficult to reason about. The flat data model is recommended.
sourceraw docstring

run-flat-opclj/smultimethod

source

run-opclj/smultimethod

source

WorkingMemoryDataModelcljs

source

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

× close