Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/19/08 12:12:39 (16 years ago)
Author:
vdorfer
Message:

Created API documentation for HeuristicLab.Core namespace (#331)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/CompositeOperation.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Represents a class for operations consisting themselves of several operations.
     30  /// Can also be executed in parallel.
     31  /// </summary>
    2832  public class CompositeOperation : ItemBase, IOperation {
    2933    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>
    3038    public bool ExecuteInParallel {
    3139      get { return myExecuteInParallel; }
     
    3341    }
    3442    private List<IOperation> myOperations;
     43    /// <summary>
     44    /// Gets all current operations.
     45    /// <note type="caution"> Operations are read-only!</note>
     46    /// </summary>
    3547    public IList<IOperation> Operations {
    3648      get { return myOperations.AsReadOnly(); }
    3749    }
    3850
     51    /// <summary>
     52    /// Initializes a new instance of <see cref="CompositeOperation"/>, the <see cref="ExecuteInParallel"/>
     53    /// property set to <c>false</c>.
     54    /// </summary>
    3955    public CompositeOperation() {
    4056      myOperations = new List<IOperation>();
     
    4258    }
    4359
     60    /// <summary>
     61    /// Adds an operation to the current list of operations.
     62    /// </summary>
     63    /// <param name="operation">The operation to add.</param>
    4464    public void AddOperation(IOperation operation) {
    4565      myOperations.Add(operation);
    4666    }
     67    /// <summary>
     68    /// Removes an operation from the current list.
     69    /// </summary>
     70    /// <param name="operation">The operation to remove.</param>
    4771    public void RemoveOperation(IOperation operation) {
    4872      myOperations.Remove(operation);
    4973    }
    5074
     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>
    5182    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    5283      CompositeOperation clone = new CompositeOperation();
     
    5990
    6091    #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>
    61104    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
    62105      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    71114      return node;
    72115    }
     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>
    73126    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    74127      base.Populate(node, restoredObjects);
Note: See TracChangeset for help on using the changeset viewer.