Browse Source

Clean old things.

Herbert Vojčík 6 years ago
parent
commit
f01aa1d1b0
6 changed files with 3 additions and 729 deletions
  1. 2 18
      Gruntfile.js
  2. 0 1
      local.amd.json
  3. 0 76
      src/Axon.js
  4. 0 27
      src/Axon.st
  5. 1 459
      src/Trapped-Backend.js
  6. 0 148
      src/Trapped-Backend.st

+ 2 - 18
Gruntfile.js

@@ -11,7 +11,7 @@ module.exports = function (grunt) {
         helpers = require('amber-dev').helpers;
 
     // Default task.
-    grunt.registerTask('default', ['amdconfig:app', 'amberc:axon', 'amberc:alybaba', 'amberc:all']);
+    grunt.registerTask('default', ['amdconfig:app', 'amberc:all']);
     grunt.registerTask('test', ['amdconfig:app', 'requirejs:test_runner', 'exec:test_runner', 'clean:test_runner']);
     grunt.registerTask('devel', ['amdconfig:app', 'requirejs:devel']);
     grunt.registerTask('deploy', ['amdconfig:app', 'requirejs:deploy']);
@@ -39,29 +39,13 @@ module.exports = function (grunt) {
                 amber_dir: path.join(__dirname, "bower_components", "amber"),
                 configFile: "config.js"
             },
-            axon: {
-                src: [
-                    'src/Axon.st',  // list all sources in dependency order
-                    // list all tests in dependency order
-                ],
-                amd_namespace: 'axon',
-                libraries: ['amber_core/SUnit']
-            },
             all: {
                 src: [
                     'src/Trapped-Backend.st', 'src/Trapped-Frontend.st', 'src/Trapped-Processors.st', // list all sources in dependency order
                     'src/Trapped-Tests.st' // list all tests in dependency order
                 ],
                 amd_namespace: 'trapped',
-                libraries: ['axon/Axon', 'amber_core/SUnit', 'amber/web/Web']
-            },
-            alybaba: {
-                src: [
-                    'src/Alybaba.st',  // list all sources in dependency order
-                    // list all tests in dependency order
-                ],
-                amd_namespace: 'alybaba',
-                libraries: ['amber_core/SUnit']
+                libraries: ['axxord/Axxord', 'amber_core/SUnit', 'amber/web/Web']
             },
             counter: {
                 src: [

+ 0 - 1
local.amd.json

@@ -1,7 +1,6 @@
 {
     "paths": {
         "trapped": "src",
-        "axon": "src",
         "trapped-todo": "example-todo/src",
         "trapped-counter": "example-counter/src"
     }

+ 0 - 76
src/Axon.js

@@ -1,76 +0,0 @@
-define(["amber/boot", "amber_core/Kernel-Objects"], function($boot){"use strict";
-if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
-if(!("nilAsValue" in $boot))$boot.nilAsValue=$boot.nilAsReceiver;
-var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
-if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
-$core.addPackage("Axon");
-$core.packages["Axon"].innerEval = function (expr) { return eval(expr); };
-$core.packages["Axon"].transport = {"type":"amd","amdNamespace":"axon"};
-
-$core.addClass("AxonizedObject", $globals.Object, ["axon"], "Axon");
-//>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.AxonizedObject.comment="I am base class for object using Axon changed:\x0afor event / change logistics,\x0a\x0aSet Axon instance with `axon:` and then use\x0a`self changed: anAspect` to trigger axon's `changed:`.";
-//>>excludeEnd("ide");
-$core.addMethod(
-$core.method({
-selector: "axon",
-protocol: "accessing",
-fn: function (){
-var self=this,$self=this;
-return $self["@axon"];
-
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "axon\x0a\x09^ axon",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.AxonizedObject);
-
-$core.addMethod(
-$core.method({
-selector: "axon:",
-protocol: "accessing",
-fn: function (anAxon){
-var self=this,$self=this;
-$self["@axon"]=anAxon;
-return self;
-
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anAxon"],
-source: "axon: anAxon\x0a\x09axon := anAxon",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.AxonizedObject);
-
-$core.addMethod(
-$core.method({
-selector: "changed:",
-protocol: "action",
-fn: function (anAspect){
-var self=this,$self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-$recv($self._axon())._changed_(anAspect);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"changed:",{anAspect:anAspect},$globals.AxonizedObject)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anAspect"],
-source: "changed: anAspect\x0a\x09self axon changed: anAspect",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["changed:", "axon"]
-}),
-$globals.AxonizedObject);
-
-
-});

+ 0 - 27
src/Axon.st

@@ -1,27 +0,0 @@
-Smalltalk createPackage: 'Axon'!
-Object subclass: #AxonizedObject
-	instanceVariableNames: 'axon'
-	package: 'Axon'!
-!AxonizedObject commentStamp!
-I am base class for object using Axon changed:
-for event / change logistics,
-
-Set Axon instance with `axon:` and then use
-`self changed: anAspect` to trigger axon's `changed:`.!
-
-!AxonizedObject methodsFor: 'accessing'!
-
-axon
-	^ axon
-!
-
-axon: anAxon
-	axon := anAxon
-! !
-
-!AxonizedObject methodsFor: 'action'!
-
-changed: anAspect
-	self axon changed: anAspect
-! !
-

+ 1 - 459
src/Trapped-Backend.js

@@ -2,7 +2,7 @@ define(["amber/boot"
 //>>excludeStart("imports", pragmas.excludeImports);
 , "axxord/Axxord"
 //>>excludeEnd("imports");
-, "amber_core/Kernel-Collections", "amber_core/Kernel-Objects", "axon/Axon", "axxord/Axxord"], function($boot
+, "amber_core/Kernel-Objects", "axxord/Axxord"], function($boot
 //>>excludeStart("imports", pragmas.excludeImports);
 
 //>>excludeEnd("imports");
@@ -16,148 +16,6 @@ $core.packages["Trapped-Backend"].innerEval = function (expr) { return eval(expr
 $core.packages["Trapped-Backend"].imports = ["axxord/Axxord"];
 $core.packages["Trapped-Backend"].transport = {"type":"amd","amdNamespace":"trapped"};
 
-$core.addClass("EavModel", $globals.Object, ["getBlock", "putBlock"], "Trapped-Backend");
-//>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.EavModel.comment="External actor value model.";
-//>>excludeEnd("ide");
-$core.addMethod(
-$core.method({
-selector: "getBlock:",
-protocol: "accessing",
-fn: function (aBlock){
-var self=this,$self=this;
-$self["@getBlock"]=aBlock;
-return self;
-
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aBlock"],
-source: "getBlock: aBlock\x0a\x0agetBlock := aBlock",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.EavModel);
-
-$core.addMethod(
-$core.method({
-selector: "initialize",
-protocol: "initialization",
-fn: function (){
-var self=this,$self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-(
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.supercall = true,
-//>>excludeEnd("ctx");
-($globals.EavModel.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($self, []));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.supercall = false;
-//>>excludeEnd("ctx");;
-$self["@getBlock"]=(function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $self._error_("No getter block.");
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx2.sendIdx["error:"]=1;
-//>>excludeEnd("ctx");
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-});
-$self["@putBlock"]=(function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $self._error_("No putter block.");
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
-//>>excludeEnd("ctx");
-});
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.EavModel)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "initialize\x0a\x09super initialize.\x0a\x09getBlock := [ self error: 'No getter block.' ].\x0a\x09putBlock := [ self error: 'No putter block.' ].",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["initialize", "error:"]
-}),
-$globals.EavModel);
-
-$core.addMethod(
-$core.method({
-selector: "on:",
-protocol: "accessing",
-fn: function (anObject){
-var self=this,$self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return $recv($self["@getBlock"])._value_(anObject);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},$globals.EavModel)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anObject"],
-source: "on: anObject\x0a\x22Returns value of model applied on object\x22\x0a\x0a^getBlock value: anObject",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["value:"]
-}),
-$globals.EavModel);
-
-$core.addMethod(
-$core.method({
-selector: "on:put:",
-protocol: "accessing",
-fn: function (anObject,anObject2){
-var self=this,$self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return $recv($self["@putBlock"])._value_value_(anObject,anObject2);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"on:put:",{anObject:anObject,anObject2:anObject2},$globals.EavModel)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anObject", "anObject2"],
-source: "on: anObject put: anObject2\x0a\x22Puts a value via model applied on object\x22\x0a\x0a^putBlock value: anObject value: anObject2",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["value:value:"]
-}),
-$globals.EavModel);
-
-$core.addMethod(
-$core.method({
-selector: "putBlock:",
-protocol: "accessing",
-fn: function (aBlock){
-var self=this,$self=this;
-$self["@putBlock"]=aBlock;
-return self;
-
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aBlock"],
-source: "putBlock: aBlock\x0a\x0aputBlock := aBlock",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.EavModel);
-
-
-
 $core.addClass("InterestedInTrapPath", $globals.AxonInterest, [], "Trapped-Backend");
 $core.addMethod(
 $core.method({
@@ -551,320 +409,4 @@ messageSends: ["addInterest:", "registeredAxon", "model", "interestOn:block:", "
 $globals.TrappedPosition);
 
 
-
-$core.addClass("Trapper", $globals.AxonizedObject, ["payload"], "Trapped-Backend");
-//>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.Trapper.comment="A portmanteau of 'Trapped wrapper', I am base class for model objects wrapped by Trapped.\x0a\x0aWrapped object is indexed by #('string-at-index' #selector numeric-at-index) array paths. Operations using this indexing are:\x0a\x0a - `read:do:` to get the indexed content\x0a - `modify:do:` to get and modify the indexed content, and\x0a - (not any more) `watch:do:` to subscribe to changes of the indexed content.\x0a\x0aThe wrapped model can be any smalltalk object.\x0a\x0aMy subclasses need to provide implementation for:\x0a\x0a - read:do:\x0a - modify:do:\x0a\x0aand must issue these calls when initializing:\x0a\x0a - axon: (with a subclass of `Axon`)\x0a - model: (with a wrapped object, after `axon:`)";
-//>>excludeEnd("ide");
-$core.addMethod(
-$core.method({
-selector: "model:",
-protocol: "accessing",
-fn: function (anObject){
-var self=this,$self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-$self["@payload"]=anObject;
-$recv($self._axon())._changedAll();
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"model:",{anObject:anObject},$globals.Trapper)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anObject"],
-source: "model: anObject\x0a\x09payload := anObject.\x0a    self axon changedAll",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["changedAll", "axon"]
-}),
-$globals.Trapper);
-
-$core.addMethod(
-$core.method({
-selector: "modify:do:",
-protocol: "action",
-fn: function (path,aBlock){
-var self=this,$self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-$self._subclassResponsibility();
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"modify:do:",{path:path,aBlock:aBlock},$globals.Trapper)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["path", "aBlock"],
-source: "modify: path do: aBlock\x0a\x09self subclassResponsibility",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["subclassResponsibility"]
-}),
-$globals.Trapper);
-
-$core.addMethod(
-$core.method({
-selector: "read:do:",
-protocol: "action",
-fn: function (path,aBlock){
-var self=this,$self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-$self._subclassResponsibility();
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"read:do:",{path:path,aBlock:aBlock},$globals.Trapper)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["path", "aBlock"],
-source: "read: path do: aBlock\x0a\x09self subclassResponsibility",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["subclassResponsibility"]
-}),
-$globals.Trapper);
-
-
-
-$core.addClass("DirectTrapper", $globals.Trapper, [], "Trapped-Backend");
-//>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.DirectTrapper.comment="I am Trapper that directly manipulate\x0athe wrapped model object.";
-//>>excludeEnd("ide");
-$core.addMethod(
-$core.method({
-selector: "modify:do:",
-protocol: "action",
-fn: function (path,aBlock){
-var self=this,$self=this;
-var newValue,eavModel;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-eavModel=$recv(path)._asEavModel();
-newValue=$recv(aBlock)._value_($recv(eavModel)._on_($self["@payload"]));
-$recv((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-$1=$recv($self["@payload"]).__eq_eq(newValue);
-if(!$core.assert($1)){
-return $recv(eavModel)._on_put_($self["@payload"],newValue);
-}
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}))._ensure_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $self._changed_(path);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
-//>>excludeEnd("ctx");
-}));
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"modify:do:",{path:path,aBlock:aBlock,newValue:newValue,eavModel:eavModel},$globals.DirectTrapper)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["path", "aBlock"],
-source: "modify: path do: aBlock\x0a    | newValue eavModel |\x0a    eavModel := path asEavModel.\x0a    newValue := aBlock value: (eavModel on: payload).\x0a    [ payload == newValue ifFalse: [ eavModel on: payload put: newValue ] ] ensure: [ self changed: path ]",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["asEavModel", "value:", "on:", "ensure:", "ifFalse:", "==", "on:put:", "changed:"]
-}),
-$globals.DirectTrapper);
-
-$core.addMethod(
-$core.method({
-selector: "read:do:",
-protocol: "action",
-fn: function (path,aBlock){
-var self=this,$self=this;
-var eavModel;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-eavModel=$recv(path)._asEavModel();
-$recv(aBlock)._value_($recv(eavModel)._on_($self["@payload"]));
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"read:do:",{path:path,aBlock:aBlock,eavModel:eavModel},$globals.DirectTrapper)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["path", "aBlock"],
-source: "read: path do: aBlock\x0a    | eavModel |\x0a    eavModel := path asEavModel.\x0a    aBlock value: (eavModel on: payload)",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["asEavModel", "value:", "on:"]
-}),
-$globals.DirectTrapper);
-
-
-
-$core.addClass("IsolatingTrapper", $globals.Trapper, [], "Trapped-Backend");
-//>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.IsolatingTrapper.comment="I am Trapper that guards access\x0ato the wrapped model object via Isolator.\x0a\x0aIOW, read:do: gets always its own deep copy,\x0amodify:do: is not reentrant\x0aand upon writing the written part is deep-copied as well\x0a(so modifier does not hold the source of truth\x0aand can change it later).\x0a\x0aThis also means, a wrapped object and all its parts\x0amust understand `#deepCopy`.";
-//>>excludeEnd("ide");
-$core.addMethod(
-$core.method({
-selector: "model:",
-protocol: "accessing",
-fn: function (anObject){
-var self=this,$self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-(
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.supercall = true,
-//>>excludeEnd("ctx");
-($globals.IsolatingTrapper.superclass||$boot.nilAsClass).fn.prototype._model_.apply($self, [$recv($globals.Isolator)._on_(anObject)]));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.supercall = false;
-//>>excludeEnd("ctx");;
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"model:",{anObject:anObject},$globals.IsolatingTrapper)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anObject"],
-source: "model: anObject\x0a\x09super model: (Isolator on: anObject)",
-referencedClasses: ["Isolator"],
-//>>excludeEnd("ide");
-messageSends: ["model:", "on:"]
-}),
-$globals.IsolatingTrapper);
-
-$core.addMethod(
-$core.method({
-selector: "modify:do:",
-protocol: "action",
-fn: function (path,aBlock){
-var self=this,$self=this;
-var eavModel;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-eavModel=$recv($recv([["root"]]).__comma(path))._asEavModel();
-$recv((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $recv($self["@payload"])._model_modify_(eavModel,aBlock);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}))._ensure_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $self._changed_(path);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
-//>>excludeEnd("ctx");
-}));
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"modify:do:",{path:path,aBlock:aBlock,eavModel:eavModel},$globals.IsolatingTrapper)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["path", "aBlock"],
-source: "modify: path do: aBlock\x0a    | eavModel |\x0a    eavModel := ({{#root}},path) asEavModel.\x0a    [ payload model: eavModel modify: aBlock ] ensure: [ self changed: path ]",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["asEavModel", ",", "ensure:", "model:modify:", "changed:"]
-}),
-$globals.IsolatingTrapper);
-
-$core.addMethod(
-$core.method({
-selector: "read:do:",
-protocol: "action",
-fn: function (path,aBlock){
-var self=this,$self=this;
-var eavModel;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-eavModel=$recv($recv([["root"]]).__comma(path))._asEavModel();
-$recv($self["@payload"])._model_read_(eavModel,aBlock);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"read:do:",{path:path,aBlock:aBlock,eavModel:eavModel},$globals.IsolatingTrapper)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["path", "aBlock"],
-source: "read: path do: aBlock\x0a    | eavModel |\x0a    eavModel := ({{#root}},path) asEavModel.\x0a    payload model: eavModel read: aBlock",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["asEavModel", ",", "model:read:"]
-}),
-$globals.IsolatingTrapper);
-
-
-$core.addMethod(
-$core.method({
-selector: "asEavModel",
-protocol: "*Trapped-Backend",
-fn: function (){
-var self=this,$self=this;
-var model;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-model=$recv($globals.EavModel)._new();
-$recv(model)._getBlock_((function(anObject){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $recv(anObject)._atAxes_ifAbsent_(self,(function(){
-return nil;
-
-}));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({anObject:anObject},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
-$1=$self._isEmpty();
-if(!$core.assert($1)){
-$recv(model)._putBlock_((function(anObject,value){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $recv(anObject)._atAxes_ifAbsent_put_(self,(function(){
-return nil;
-
-}),value);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({anObject:anObject,value:value},$ctx1,4)});
-//>>excludeEnd("ctx");
-}));
-}
-return model;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"asEavModel",{model:model},$globals.SequenceableCollection)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "asEavModel\x0a    | model |\x0a    model := EavModel new.\x0a    model getBlock: [ :anObject | anObject atAxes: self ifAbsent: [ nil ] ].\x0a    self isEmpty ifFalse: [\x0a        model putBlock: [ :anObject :value | anObject atAxes: self ifAbsent: [ nil ] put: value ]].\x0a    ^model",
-referencedClasses: ["EavModel"],
-//>>excludeEnd("ide");
-messageSends: ["new", "getBlock:", "atAxes:ifAbsent:", "ifFalse:", "isEmpty", "putBlock:", "atAxes:ifAbsent:put:"]
-}),
-$globals.SequenceableCollection);
-
 });

+ 0 - 148
src/Trapped-Backend.st

@@ -1,43 +1,5 @@
 Smalltalk createPackage: 'Trapped-Backend'!
 (Smalltalk packageAt: 'Trapped-Backend') imports: {'axxord/Axxord'}!
-Object subclass: #EavModel
-	instanceVariableNames: 'getBlock putBlock'
-	package: 'Trapped-Backend'!
-!EavModel commentStamp!
-External actor value model.!
-
-!EavModel methodsFor: 'accessing'!
-
-getBlock: aBlock
-
-getBlock := aBlock
-!
-
-on: anObject
-"Returns value of model applied on object"
-
-^getBlock value: anObject
-!
-
-on: anObject put: anObject2
-"Puts a value via model applied on object"
-
-^putBlock value: anObject value: anObject2
-!
-
-putBlock: aBlock
-
-putBlock := aBlock
-! !
-
-!EavModel methodsFor: 'initialization'!
-
-initialize
-	super initialize.
-	getBlock := [ self error: 'No getter block.' ].
-	putBlock := [ self error: 'No putter block.' ].
-! !
-
 AxonInterest subclass: #InterestedInTrapPath
 	instanceVariableNames: ''
 	package: 'Trapped-Backend'!
@@ -139,113 +101,3 @@ interestOn: anAspect block: aBlock
 		ifFalse: [ ^ InterestedInTrapPath new aspect: anAspect block: aBlock ]
 ! !
 
-AxonizedObject subclass: #Trapper
-	instanceVariableNames: 'payload'
-	package: 'Trapped-Backend'!
-!Trapper commentStamp!
-A portmanteau of 'Trapped wrapper', I am base class for model objects wrapped by Trapped.
-
-Wrapped object is indexed by #('string-at-index' #selector numeric-at-index) array paths. Operations using this indexing are:
-
- - `read:do:` to get the indexed content
- - `modify:do:` to get and modify the indexed content, and
- - (not any more) `watch:do:` to subscribe to changes of the indexed content.
-
-The wrapped model can be any smalltalk object.
-
-My subclasses need to provide implementation for:
-
- - read:do:
- - modify:do:
-
-and must issue these calls when initializing:
-
- - axon: (with a subclass of `Axon`)
- - model: (with a wrapped object, after `axon:`)!
-
-!Trapper methodsFor: 'accessing'!
-
-model: anObject
-	payload := anObject.
-    self axon changedAll
-! !
-
-!Trapper methodsFor: 'action'!
-
-modify: path do: aBlock
-	self subclassResponsibility
-!
-
-read: path do: aBlock
-	self subclassResponsibility
-! !
-
-Trapper subclass: #DirectTrapper
-	instanceVariableNames: ''
-	package: 'Trapped-Backend'!
-!DirectTrapper commentStamp!
-I am Trapper that directly manipulate
-the wrapped model object.!
-
-!DirectTrapper methodsFor: 'action'!
-
-modify: path do: aBlock
-    | newValue eavModel |
-    eavModel := path asEavModel.
-    newValue := aBlock value: (eavModel on: payload).
-    [ payload == newValue ifFalse: [ eavModel on: payload put: newValue ] ] ensure: [ self changed: path ]
-!
-
-read: path do: aBlock
-    | eavModel |
-    eavModel := path asEavModel.
-    aBlock value: (eavModel on: payload)
-! !
-
-Trapper subclass: #IsolatingTrapper
-	instanceVariableNames: ''
-	package: 'Trapped-Backend'!
-!IsolatingTrapper commentStamp!
-I am Trapper that guards access
-to the wrapped model object via Isolator.
-
-IOW, read:do: gets always its own deep copy,
-modify:do: is not reentrant
-and upon writing the written part is deep-copied as well
-(so modifier does not hold the source of truth
-and can change it later).
-
-This also means, a wrapped object and all its parts
-must understand `#deepCopy`.!
-
-!IsolatingTrapper methodsFor: 'accessing'!
-
-model: anObject
-	super model: (Isolator on: anObject)
-! !
-
-!IsolatingTrapper methodsFor: 'action'!
-
-modify: path do: aBlock
-    | eavModel |
-    eavModel := ({{#root}},path) asEavModel.
-    [ payload model: eavModel modify: aBlock ] ensure: [ self changed: path ]
-!
-
-read: path do: aBlock
-    | eavModel |
-    eavModel := ({{#root}},path) asEavModel.
-    payload model: eavModel read: aBlock
-! !
-
-!SequenceableCollection methodsFor: '*Trapped-Backend'!
-
-asEavModel
-    | model |
-    model := EavModel new.
-    model getBlock: [ :anObject | anObject atAxes: self ifAbsent: [ nil ] ].
-    self isEmpty ifFalse: [
-        model putBlock: [ :anObject :value | anObject atAxes: self ifAbsent: [ nil ] put: value ]].
-    ^model
-! !
-