Browse Source

AxonBase => Axon, AxonInterestBase => AxonInterest

Herbert Vojčík 8 years ago
parent
commit
67e6de9e04
4 changed files with 46 additions and 46 deletions
  1. 28 28
      src/Axon.js
  2. 12 12
      src/Axon.st
  3. 3 3
      src/Trapped-Backend.js
  4. 3 3
      src/Trapped-Backend.st

+ 28 - 28
src/Axon.js

@@ -4,9 +4,9 @@ $core.addPackage('Axon');
 $core.packages["Axon"].innerEval = function (expr) { return eval(expr); };
 $core.packages["Axon"].transport = {"type":"amd","amdNamespace":"axon"};
 
-$core.addClass('AxonBase', $globals.Object, ['factory'], 'Axon');
+$core.addClass('Axon', $globals.Object, ['factory'], 'Axon');
 //>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.AxonBase.comment="I represent a pub-sub based on a key (called 'aspect').\x0aI manage aspect-block subscriptions (called 'interests') as well as run blocks of dirtied interests.\x0aThe interest objects are responsible of decision if the change of an aspect is relevant for them.\x0aInterest object must be subclasses of `AxonInterestBase`.\x0a\x0aMy subclasses must provide implementation for:\x0a\x0a - add:\x0a - do:\x0a - clean";
+$globals.Axon.comment="I represent a pub-sub based on a key (called 'aspect').\x0aI manage aspect-block subscriptions (called 'interests') as well as run blocks of dirtied interests.\x0aThe interest objects are responsible of decision if the change of an aspect is relevant for them.\x0aInterest object must be subclasses of `AxonInterest`.\x0a\x0aMy subclasses must provide implementation for:\x0a\x0a - add:\x0a - do:\x0a - clean";
 //>>excludeEnd("ide");
 $core.addMethod(
 $core.method({
@@ -24,7 +24,7 @@ self._add_($1);
 $2=self._dirty_(true);
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"addInterest:",{anInterest:anInterest},$globals.AxonBase)});
+}, function($ctx1) {$ctx1.fill(self,"addInterest:",{anInterest:anInterest},$globals.Axon)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -34,7 +34,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: ["add:", "flag", "yourself", "dirty:"]
 }),
-$globals.AxonBase);
+$globals.Axon);
 
 $core.addMethod(
 $core.method({
@@ -65,7 +65,7 @@ return needsToRun;
 self._dirty_(needsToRun);
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"changed:",{anAspect:anAspect,needsToRun:needsToRun},$globals.AxonBase)});
+}, function($ctx1) {$ctx1.fill(self,"changed:",{anAspect:anAspect,needsToRun:needsToRun},$globals.Axon)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -75,7 +75,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: ["do:", "ifTrue:", "accepts:", "flag", "dirty:"]
 }),
-$globals.AxonBase);
+$globals.Axon);
 
 $core.addMethod(
 $core.method({
@@ -102,7 +102,7 @@ return needsToRun;
 self._dirty_(needsToRun);
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"changedAll",{needsToRun:needsToRun},$globals.AxonBase)});
+}, function($ctx1) {$ctx1.fill(self,"changedAll",{needsToRun:needsToRun},$globals.Axon)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -112,7 +112,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: ["do:", "flag", "dirty:"]
 }),
-$globals.AxonBase);
+$globals.Axon);
 
 $core.addMethod(
 $core.method({
@@ -136,7 +136,7 @@ return self._run();
 };
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"dirty:",{aBoolean:aBoolean},$globals.AxonBase)});
+}, function($ctx1) {$ctx1.fill(self,"dirty:",{aBoolean:aBoolean},$globals.Axon)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -146,7 +146,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: ["ifTrue:", "fork", "run"]
 }),
-$globals.AxonBase);
+$globals.Axon);
 
 $core.addMethod(
 $core.method({
@@ -201,7 +201,7 @@ return self._dirty_(true);
 }));
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"run",{},$globals.AxonBase)});
+}, function($ctx1) {$ctx1.fill(self,"run",{},$globals.Axon)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -211,11 +211,11 @@ referencedClasses: ["Error"],
 //>>excludeEnd("ide");
 messageSends: ["on:do:", "do:", "ifTrue:", "isFlagged", "run", "ifFalse:", "isEnabled", "clean", "dirty:"]
 }),
-$globals.AxonBase);
+$globals.Axon);
 
 
 
-$core.addClass('SimpleAxon', $globals.AxonBase, ['queue'], 'Axon');
+$core.addClass('SimpleAxon', $globals.Axon, ['queue'], 'Axon');
 $core.addMethod(
 $core.method({
 selector: "add:",
@@ -331,7 +331,7 @@ $globals.SimpleAxon);
 
 
 
-$core.addClass('AxonInterestBase', $globals.Object, ['aspect', 'actionBlock', 'flagged'], 'Axon');
+$core.addClass('AxonInterest', $globals.Object, ['aspect', 'actionBlock', 'flagged'], 'Axon');
 $core.addMethod(
 $core.method({
 selector: "accepts:",
@@ -344,7 +344,7 @@ return $core.withContext(function($ctx1) {
 self._subclassResponsibility();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"accepts:",{anAspect:anAspect},$globals.AxonInterestBase)});
+}, function($ctx1) {$ctx1.fill(self,"accepts:",{anAspect:anAspect},$globals.AxonInterest)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -354,7 +354,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: ["subclassResponsibility"]
 }),
-$globals.AxonInterestBase);
+$globals.AxonInterest);
 
 $core.addMethod(
 $core.method({
@@ -374,7 +374,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
 }),
-$globals.AxonInterestBase);
+$globals.AxonInterest);
 
 $core.addMethod(
 $core.method({
@@ -393,7 +393,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
 }),
-$globals.AxonInterestBase);
+$globals.AxonInterest);
 
 $core.addMethod(
 $core.method({
@@ -408,7 +408,7 @@ return $core.withContext(function($ctx1) {
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.supercall = true, 
 //>>excludeEnd("ctx");
-$globals.AxonInterestBase.superclass.fn.prototype._initialize.apply($recv(self), []));
+$globals.AxonInterest.superclass.fn.prototype._initialize.apply($recv(self), []));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.supercall = false;
 //>>excludeEnd("ctx");;
@@ -417,7 +417,7 @@ self["@actionBlock"]=nil;
 self["@flagged"]=false;
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.AxonInterestBase)});
+}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.AxonInterest)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -427,7 +427,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: ["initialize"]
 }),
-$globals.AxonInterestBase);
+$globals.AxonInterest);
 
 $core.addMethod(
 $core.method({
@@ -442,7 +442,7 @@ var $1;
 $1=$recv(self["@actionBlock"])._notNil();
 return $1;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"isEnabled",{},$globals.AxonInterestBase)});
+}, function($ctx1) {$ctx1.fill(self,"isEnabled",{},$globals.AxonInterest)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -452,7 +452,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: ["notNil"]
 }),
-$globals.AxonInterestBase);
+$globals.AxonInterest);
 
 $core.addMethod(
 $core.method({
@@ -472,7 +472,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
 }),
-$globals.AxonInterestBase);
+$globals.AxonInterest);
 
 $core.addMethod(
 $core.method({
@@ -501,7 +501,7 @@ return self["@actionBlock"];
 }));
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"run",{},$globals.AxonInterestBase)});
+}, function($ctx1) {$ctx1.fill(self,"run",{},$globals.AxonInterest)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -511,11 +511,11 @@ referencedClasses: ["AxonOff"],
 //>>excludeEnd("ide");
 messageSends: ["on:do:", "value"]
 }),
-$globals.AxonInterestBase);
+$globals.AxonInterest);
 
 
 
-$core.addClass('InterestedInEqual', $globals.AxonInterestBase, [], 'Axon');
+$core.addClass('InterestedInEqual', $globals.AxonInterest, [], 'Axon');
 $core.addMethod(
 $core.method({
 selector: "accepts:",
@@ -551,7 +551,7 @@ $globals.AxonOff.comment="Signal me from the subscription block to unsubscribe i
 
 $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 AxonBase instance with `axon:` and then use\x0a`self changed: anAspect` to trigger axon's `changed:`.";
+$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({

+ 12 - 12
src/Axon.st

@@ -1,12 +1,12 @@
 Smalltalk createPackage: 'Axon'!
-Object subclass: #AxonBase
+Object subclass: #Axon
 	instanceVariableNames: 'factory'
 	package: 'Axon'!
-!AxonBase commentStamp!
+!Axon commentStamp!
 I represent a pub-sub based on a key (called 'aspect').
 I manage aspect-block subscriptions (called 'interests') as well as run blocks of dirtied interests.
 The interest objects are responsible of decision if the change of an aspect is relevant for them.
-Interest object must be subclasses of `AxonInterestBase`.
+Interest object must be subclasses of `AxonInterest`.
 
 My subclasses must provide implementation for:
 
@@ -14,7 +14,7 @@ My subclasses must provide implementation for:
  - do:
  - clean!
 
-!AxonBase methodsFor: 'action'!
+!Axon methodsFor: 'action'!
 
 addInterest: anInterest
 	self
@@ -57,7 +57,7 @@ run
 	] on: Error do: [ self dirty: true ]
 ! !
 
-AxonBase subclass: #SimpleAxon
+Axon subclass: #SimpleAxon
 	instanceVariableNames: 'queue'
 	package: 'Axon'!
 
@@ -86,11 +86,11 @@ initialize
 	queue := OrderedCollection new
 ! !
 
-Object subclass: #AxonInterestBase
+Object subclass: #AxonInterest
 	instanceVariableNames: 'aspect actionBlock flagged'
 	package: 'Axon'!
 
-!AxonInterestBase methodsFor: 'accessing'!
+!AxonInterest methodsFor: 'accessing'!
 
 aspect: anAspect block: aBlock
 	aspect := anAspect.
@@ -101,14 +101,14 @@ flag
 	flagged := true
 ! !
 
-!AxonInterestBase methodsFor: 'action'!
+!AxonInterest methodsFor: 'action'!
 
 run
 	[ flagged := false. actionBlock value ]
     on: AxonOff do: [ actionBlock := nil ]
 ! !
 
-!AxonInterestBase methodsFor: 'initialization'!
+!AxonInterest methodsFor: 'initialization'!
 
 initialize
 	super initialize.
@@ -117,7 +117,7 @@ initialize
     flagged := false.
 ! !
 
-!AxonInterestBase methodsFor: 'testing'!
+!AxonInterest methodsFor: 'testing'!
 
 accepts: anAspect
     "Should return true if change for anAspect is relevant for this AxonInterest"
@@ -132,7 +132,7 @@ isFlagged
 	^flagged
 ! !
 
-AxonInterestBase subclass: #InterestedInEqual
+AxonInterest subclass: #InterestedInEqual
 	instanceVariableNames: ''
 	package: 'Axon'!
 
@@ -155,7 +155,7 @@ Object subclass: #AxonizedObject
 I am base class for object using Axon changed:
 for event / change logistics,
 
-Set AxonBase instance with `axon:` and then use
+Set Axon instance with `axon:` and then use
 `self changed: anAspect` to trigger axon's `changed:`.!
 
 !AxonizedObject methodsFor: 'accessing'!

+ 3 - 3
src/Trapped-Backend.js

@@ -159,7 +159,7 @@ $globals.EavModel);
 
 
 
-$core.addClass('InterestedInTrapPath', $globals.AxonInterestBase, [], 'Trapped-Backend');
+$core.addClass('InterestedInTrapPath', $globals.AxonInterest, [], 'Trapped-Backend');
 $core.addMethod(
 $core.method({
 selector: "accepts:",
@@ -204,7 +204,7 @@ $globals.InterestedInTrapPath);
 
 
 
-$core.addClass('InterestedInTrapPathSubtree', $globals.AxonInterestBase, [], 'Trapped-Backend');
+$core.addClass('InterestedInTrapPathSubtree', $globals.AxonInterest, [], 'Trapped-Backend');
 $core.addMethod(
 $core.method({
 selector: "accepts:",
@@ -568,7 +568,7 @@ $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 - `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 `AxonBase`)\x0a - model: (with a wrapped object, after `axon:`)";
+$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 - `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({

+ 3 - 3
src/Trapped-Backend.st

@@ -38,7 +38,7 @@ initialize
 	putBlock := [ self error: 'No putter block.' ].
 ! !
 
-AxonInterestBase subclass: #InterestedInTrapPath
+AxonInterest subclass: #InterestedInTrapPath
 	instanceVariableNames: ''
 	package: 'Trapped-Backend'!
 
@@ -48,7 +48,7 @@ accepts: anAspect
     ^anAspect size <= aspect size and: [anAspect = (aspect copyFrom: 1 to: anAspect size)]
 ! !
 
-AxonInterestBase subclass: #InterestedInTrapPathSubtree
+AxonInterest subclass: #InterestedInTrapPathSubtree
 	instanceVariableNames: ''
 	package: 'Trapped-Backend'!
 
@@ -160,7 +160,7 @@ My subclasses need to provide implementation for:
 
 and must issue these calls when initializing:
 
- - axon: (with a subclass of `AxonBase`)
+ - axon: (with a subclass of `Axon`)
  - model: (with a wrapped object, after `axon:`)!
 
 !Trapper methodsFor: 'accessing'!