Changeset 1994 for branches/Operator Architecture Refactoring/HeuristicLab.Core/3.2/AtomicOperation.cs
- Timestamp:
- 06/03/09 02:40:39 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Operator Architecture Refactoring/HeuristicLab.Core/3.2/AtomicOperation.cs
r1529 r1994 37 37 get { return myOperator; } 38 38 } 39 private IScope myScope; 39 private IEnvironment myEnvironment; 40 /// <summary> 41 /// Gets the current environment as <see cref="IEnvironment"/>. 42 /// </summary> 43 public IEnvironment Environment { 44 get { return myEnvironment; } 45 } 46 private IScope myScope; 40 47 /// <summary> 41 48 /// Gets the current scope as <see cref="IScope"/>. … … 54 61 /// </summary> 55 62 /// <param name="op">The operator to assign.</param> 63 /// <param name="environment">The environment to assign.</param> 56 64 /// <param name="scope">The scope to assign.</param> 57 public AtomicOperation(IOperator op, I Scope scope) {65 public AtomicOperation(IOperator op, IEnvironment environment, IScope scope) { 58 66 myOperator = op; 67 myEnvironment = environment; 59 68 myScope = scope; 60 69 } … … 71 80 clonedObjects.Add(Guid, clone); 72 81 clone.myOperator = (IOperator)Auxiliary.Clone(Operator, clonedObjects); 82 clone.myEnvironment = (IEnvironment)Auxiliary.Clone(Environment, clonedObjects); 73 83 clone.myScope = (IScope)Auxiliary.Clone(Scope, clonedObjects); 74 84 return clone; … … 83 93 /// class <see cref="ItemBase"/>. <br/> 84 94 /// The operator is saved as child node having the tag name <c>Operator</c>.<br/> 95 /// The environment is also saved as a child node having the tag name <c>Environment</c>.<br/> 85 96 /// The scope is also saved as a child node having the tag name <c>Scope</c>.</remarks> 86 97 /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param> … … 91 102 XmlNode node = base.GetXmlNode(name, document, persistedObjects); 92 103 node.AppendChild(PersistenceManager.Persist("Operator", Operator, document, persistedObjects)); 104 node.AppendChild(PersistenceManager.Persist("Environment", Environment, document, persistedObjects)); 93 105 node.AppendChild(PersistenceManager.Persist("Scope", Scope, document, persistedObjects)); 94 106 return node; … … 99 111 /// <remarks>Calls <see cref="HeuristicLab.Core.StorableBase.Populate"/> of base class 100 112 /// <see cref="ItemBase"/>.<br/> 101 /// The operator must be saved as a child node with the tag name <c>Operator</c>, also the scope must 113 /// The operator must be saved as a child node with the tag name <c>Operator</c>, the environment must be saved as 114 /// a child node with the tag name <c>Environment</c>, and also the scope must 102 115 /// be saved as a child node having the tag name <c>Scope</c> (see <see cref="GetXmlNode"/>).</remarks> 103 116 /// <param name="node">The <see cref="XmlNode"/> where the operation is saved.</param> … … 106 119 base.Populate(node, restoredObjects); 107 120 myOperator = (IOperator)PersistenceManager.Restore(node.SelectSingleNode("Operator"), restoredObjects); 121 myEnvironment = (IEnvironment)PersistenceManager.Restore(node.SelectSingleNode("Environment"), restoredObjects); 108 122 myScope = (IScope)PersistenceManager.Restore(node.SelectSingleNode("Scope"), restoredObjects); 109 123 }
Note: See TracChangeset
for help on using the changeset viewer.