Changeset 776 for trunk/sources/HeuristicLab.Core/CompositeOperation.cs
- Timestamp:
- 11/19/08 12:12:39 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/CompositeOperation.cs
r2 r776 26 26 27 27 namespace HeuristicLab.Core { 28 /// <summary> 29 /// Represents a class for operations consisting themselves of several operations. 30 /// Can also be executed in parallel. 31 /// </summary> 28 32 public class CompositeOperation : ItemBase, IOperation { 29 33 private bool myExecuteInParallel; 34 35 /// <summary> 36 /// Gets or sets the bool value, whether the operation should be executed in parallel or not. 37 /// </summary> 30 38 public bool ExecuteInParallel { 31 39 get { return myExecuteInParallel; } … … 33 41 } 34 42 private List<IOperation> myOperations; 43 /// <summary> 44 /// Gets all current operations. 45 /// <note type="caution"> Operations are read-only!</note> 46 /// </summary> 35 47 public IList<IOperation> Operations { 36 48 get { return myOperations.AsReadOnly(); } 37 49 } 38 50 51 /// <summary> 52 /// Initializes a new instance of <see cref="CompositeOperation"/>, the <see cref="ExecuteInParallel"/> 53 /// property set to <c>false</c>. 54 /// </summary> 39 55 public CompositeOperation() { 40 56 myOperations = new List<IOperation>(); … … 42 58 } 43 59 60 /// <summary> 61 /// Adds an operation to the current list of operations. 62 /// </summary> 63 /// <param name="operation">The operation to add.</param> 44 64 public void AddOperation(IOperation operation) { 45 65 myOperations.Add(operation); 46 66 } 67 /// <summary> 68 /// Removes an operation from the current list. 69 /// </summary> 70 /// <param name="operation">The operation to remove.</param> 47 71 public void RemoveOperation(IOperation operation) { 48 72 myOperations.Remove(operation); 49 73 } 50 74 75 /// <summary> 76 /// Clones the current instance of <see cref="CompositeOperation"/> (deep clone). 77 /// </summary> 78 /// <remarks>All operations of the current instance are cloned, too (deep clone), with the 79 /// <see cref="HeuristicLab.Core.Auxiliary.Clone"/> method of the class <see cref="Auxiliary"/>.</remarks> 80 /// <param name="clonedObjects">A dictionary of all already cloned objects. (Needed to avoid cycles.)</param> 81 /// <returns>The cloned operation as <see cref="CompositeOperation"/>.</returns> 51 82 public override object Clone(IDictionary<Guid, object> clonedObjects) { 52 83 CompositeOperation clone = new CompositeOperation(); … … 59 90 60 91 #region Persistence Methods 92 /// <summary> 93 /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>. 94 /// </summary> 95 /// <remarks>Calls <see cref="HeuristicLab.Core.StorableBase.GetXmlNode"/> of base 96 /// class <see cref="ItemBase"/>.<br/> 97 /// The <see cref="ExecuteInParallel"/> property is saved as <see cref="XmlAttribute"/> with the 98 /// tag name <c>ExecuteInParallel</c>. A child node with tag name <c>Operations</c> is created where 99 /// all operations are saved as child nodes.</remarks> 100 /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param> 101 /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param> 102 /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param> 103 /// <returns>The saved <see cref="XmlNode"/>.</returns> 61 104 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) { 62 105 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 71 114 return node; 72 115 } 116 /// <summary> 117 /// Loads the persisted operation from the specified <paramref name="node"/>. 118 /// </summary> 119 /// <remarks>The <see cref="ExecuteInParallel"/> property must be saved as <see cref="XmlAttribute"/> 120 /// with the tag name <c>ExecuteInParallel</c>. <br/> 121 /// The single operations must be saved as child nodes of a node with tag name <c>Operations</c>, 122 /// being a child node of the current instance. <br/> 123 /// Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.</remarks> 124 /// <param name="node">The <see cref="XmlNode"/> where the operation is saved.</param> 125 /// <param name="restoredObjects">A dictionary of all already restored objects. (Needed to avoid cycles.)</param> 73 126 public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) { 74 127 base.Populate(node, restoredObjects);
Note: See TracChangeset
for help on using the changeset viewer.