- Timestamp:
- 08/13/08 17:09:48 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Core/DatabaseOperatorLibrary.cs
r512 r513 85 85 } 86 86 87 // patch all OperatorLinks87 // set the DB source for each operator 88 88 foreach(IOperator op in group.Operators) { 89 PatchLinks(op); 90 } 91 } 92 93 private void PatchLinks(IOperatorGraph opGraph) { 94 foreach(IOperator op in opGraph.Operators) { 95 PatchLinks(op); 96 } 97 } 98 99 private void PatchLinks(IOperator op) { 100 if(op is OperatorLink) { 101 OperatorLink link = op as OperatorLink; 102 link.Database = Database; 103 } 104 else if(op is CombinedOperator) { 105 CombinedOperator combinedOp = op as CombinedOperator; 106 foreach(IOperator internalOp in combinedOp.OperatorGraph.Operators) { 107 PatchLinks(internalOp); 108 } 109 } 110 // also patch operator links contained (indirectly) in variables 111 foreach(VariableInfo varInfo in op.VariableInfos) { 112 IVariable var = op.GetVariable(varInfo.ActualName); 113 if(var != null && var.Value is IOperatorGraph) { 114 PatchLinks((IOperatorGraph)var.Value); 115 } else if(var != null && var.Value is IOperator) { 116 PatchLinks((IOperator)var.Value); 117 } 89 OperatorLinkPatcher.LinkDatabase(op, Database); 118 90 } 119 91 }
Note: See TracChangeset
for help on using the changeset viewer.