|
@@ -549,10 +549,13 @@ $globals.DagParentNode);
|
|
|
|
|
|
|
|
|
|
|
|
-$core.addClass("DagSink", $globals.DagNode, ["nodes"], "Kernel-Dag");
|
|
|
+$core.addClass("DagSink", $globals.DagNode, [], "Kernel-Dag");
|
|
|
|
|
|
$globals.DagSink.comment="I am `DagNode` with no direct successors.\x0a\x0aSending `dagChildren:` with empty collection is legal.";
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+$core.addTrait("TDagSink", "Kernel-Dag");
|
|
|
$core.addMethod(
|
|
|
$core.method({
|
|
|
selector: "dagChildren",
|
|
@@ -569,7 +572,7 @@ var self=this,$self=this;
|
|
|
return [];
|
|
|
|
|
|
}; }),
|
|
|
-$globals.DagSink);
|
|
|
+$globals.TDagSink);
|
|
|
|
|
|
$core.addMethod(
|
|
|
$core.method({
|
|
@@ -601,8 +604,134 @@ return self;
|
|
|
}, function($ctx1) {$ctx1.fill(self,"dagChildren:",{aCollection:aCollection})});
|
|
|
|
|
|
}; }),
|
|
|
-$globals.DagSink);
|
|
|
+$globals.TDagSink);
|
|
|
+
|
|
|
+
|
|
|
+$core.addTrait("TDerivedDagChildren", "Kernel-Dag");
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "addDagChild:",
|
|
|
+protocol: "accessing",
|
|
|
+
|
|
|
+args: ["aDagNode"],
|
|
|
+source: "addDagChild: aDagNode\x0a\x09self error: 'Cannot add child for a TDerivedChildren.'",
|
|
|
+referencedClasses: [],
|
|
|
+
|
|
|
+pragmas: [],
|
|
|
+messageSends: ["error:"]
|
|
|
+}, function ($methodClass){ return function (aDagNode){
|
|
|
+var self=this,$self=this;
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+$self._error_("Cannot add child for a TDerivedChildren.");
|
|
|
+return self;
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"addDagChild:",{aDagNode:aDagNode})});
|
|
|
+
|
|
|
+}; }),
|
|
|
+$globals.TDerivedDagChildren);
|
|
|
+
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "dagChildren",
|
|
|
+protocol: "accessing",
|
|
|
+
|
|
|
+args: [],
|
|
|
+source: "dagChildren\x0a\x09self subclassResponsibility",
|
|
|
+referencedClasses: [],
|
|
|
+
|
|
|
+pragmas: [],
|
|
|
+messageSends: ["subclassResponsibility"]
|
|
|
+}, function ($methodClass){ return function (){
|
|
|
+var self=this,$self=this;
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+$self._subclassResponsibility();
|
|
|
+return self;
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"dagChildren",{})});
|
|
|
+
|
|
|
+}; }),
|
|
|
+$globals.TDerivedDagChildren);
|
|
|
+
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "dagChildren:",
|
|
|
+protocol: "accessing",
|
|
|
+
|
|
|
+args: ["aCollection"],
|
|
|
+source: "dagChildren: aCollection\x0a\x09self error: 'Cannot set children of a TDerivedChildren.'",
|
|
|
+referencedClasses: [],
|
|
|
+
|
|
|
+pragmas: [],
|
|
|
+messageSends: ["error:"]
|
|
|
+}, function ($methodClass){ return function (aCollection){
|
|
|
+var self=this,$self=this;
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+$self._error_("Cannot set children of a TDerivedChildren.");
|
|
|
+return self;
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"dagChildren:",{aCollection:aCollection})});
|
|
|
+
|
|
|
+}; }),
|
|
|
+$globals.TDerivedDagChildren);
|
|
|
+
|
|
|
+
|
|
|
+$core.addTrait("TSingleDagChild", "Kernel-Dag");
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "dagChild",
|
|
|
+protocol: "accessing",
|
|
|
+
|
|
|
+args: [],
|
|
|
+source: "dagChild\x0a\x09self subclassResponsibility",
|
|
|
+referencedClasses: [],
|
|
|
+
|
|
|
+pragmas: [],
|
|
|
+messageSends: ["subclassResponsibility"]
|
|
|
+}, function ($methodClass){ return function (){
|
|
|
+var self=this,$self=this;
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+$self._subclassResponsibility();
|
|
|
+return self;
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"dagChild",{})});
|
|
|
+
|
|
|
+}; }),
|
|
|
+$globals.TSingleDagChild);
|
|
|
+
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "dagChildren",
|
|
|
+protocol: "accessing",
|
|
|
+
|
|
|
+args: [],
|
|
|
+source: "dagChildren\x0a\x09^ { self dagChild }",
|
|
|
+referencedClasses: [],
|
|
|
+
|
|
|
+pragmas: [],
|
|
|
+messageSends: ["dagChild"]
|
|
|
+}, function ($methodClass){ return function (){
|
|
|
+var self=this,$self=this;
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+return [$self._dagChild()];
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"dagChildren",{})});
|
|
|
+
|
|
|
+}; }),
|
|
|
+$globals.TSingleDagChild);
|
|
|
|
|
|
+$core.setTraitComposition([{trait: $globals.TDerivedDagChildren}], $globals.TDagSink);
|
|
|
+$core.setTraitComposition([{trait: $globals.TDerivedDagChildren}], $globals.TSingleDagChild);
|
|
|
+$core.setTraitComposition([{trait: $globals.TDagSink}], $globals.DagSink);
|
|
|
|
|
|
$core.addMethod(
|
|
|
$core.method({
|