Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1186


Ignore:
Timestamp:
01/29/09 14:03:34 (15 years ago)
Author:
vdorfer
Message:

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

Location:
trunk/sources/HeuristicLab.ThreadParallelEngine
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.ThreadParallelEngine/HeuristicLabThreadParallelEnginePlugin.cs

    r582 r1186  
    2626
    2727namespace HeuristicLab.ThreadParallelEngine {
     28  /// <summary>
     29  /// Plugin class for HeuristicLab.ThreadParallelEngine plugin.
     30  /// </summary>
    2831  [ClassInfo(Name = "HeuristicLab.ThreadParallelEngine-3.2")]
    2932  [PluginFile(Filename = "HeuristicLab.ThreadParallelEngine-3.2.dll", Filetype = PluginFileType.Assembly)]
  • trunk/sources/HeuristicLab.ThreadParallelEngine/ThreadParallelEngine.cs

    r2 r1186  
    2828
    2929namespace HeuristicLab.ThreadParallelEngine {
     30  /// <summary>
     31  /// Implementation of an engine being able to run in parallel with threads.
     32  /// </summary>
    3033  public class ThreadParallelEngine : EngineBase, IEditable {
    3134    #region Inner Class Task
     
    4245
    4346    private int myWorkers;
     47    /// <summary>
     48    /// Gets or sets the number of worker threads of the current engine.
     49    /// </summary>
     50    /// <remarks>Calls <see cref="OnWorkersChanged"/> in the setter.</remarks>
    4451    public int Workers {
    4552      get { return myWorkers; }
     
    5259    }
    5360
    54 
     61    /// <summary>
     62    /// Initializes a new instance of <see cref="ThreadParallelEngine"/> with the number of processors
     63    /// as number of worker threads.
     64    /// </summary>
    5565    public ThreadParallelEngine() {
    5666      myWorkers = Environment.ProcessorCount;
     
    5969
    6070
     71    /// <inheritdoc/>
     72    /// <returns>The cloned object as <see cref="ThreadParallelEngine"/>.</returns>
    6173    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    6274      ThreadParallelEngine clone = (ThreadParallelEngine)base.Clone(clonedObjects);
     
    6577    }
    6678
     79    /// <summary>
     80    /// Creates a new instance of <see cref="ThreadParallelEngineEditor"/> to display the current
     81    /// instance.
     82    /// </summary>
     83    /// <returns>The created instance as <see cref="ThreadParallelEngineEditor"/>.</returns>
    6784    public override IView CreateView() {
    6885      return new ThreadParallelEngineEditor(this);
    6986    }
     87    /// <summary>
     88    /// Creates a new instance of <see cref="ThreadParallelEngineEditor"/>.
     89    /// </summary>
     90    /// <returns>The created instance as <see cref="ThreadParallelEngineEditor"/>.</returns>
    7091    public virtual IEditor CreateEditor() {
    7192      return new ThreadParallelEngineEditor(this);
    7293    }
    7394
     95    /// <summary>
     96    /// This execution method is not supported by ThreadParallelEngines.
     97    /// </summary>
     98    /// <exception cref="InvalidOperationException">Thrown because the current instance of an engine
     99    /// does not support stepwise execution.</exception>
     100    /// <param name="steps">The number of steps to execute.</param>
    74101    public override void ExecuteSteps(int steps) {
    75102      throw new InvalidOperationException("ThreadParallelEngine doesn't support stepwise execution");
    76103    }
    77104
     105    /// <inheritdoc/>
    78106    public override void Abort() {
    79107      base.Abort();
     
    83111      }
    84112    }
    85 
     113    /// <summary>
     114    /// Processes the next operation (if it is a compositeOperation and it can be executed in parallel it is
     115    /// done).
     116    /// </summary>
    86117    protected override void ProcessNextOperation() {
    87118      operatorIndex = 1;
     
    169200    }
    170201
     202    /// <summary>
     203    /// Occurs when the number of workers has been changed.
     204    /// </summary>
    171205    public event EventHandler WorkersChanged;
     206    /// <summary>
     207    /// Fires a new <c>WorkersChanged</c> event.
     208    /// </summary>
    172209    protected virtual void OnWorkersChanged() {
    173210      if (WorkersChanged != null)
     
    176213
    177214    #region Persistence Methods
     215    /// <summary>
     216    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     217    /// </summary>
     218    /// <remarks>The number of workers is saved as <see cref="XmlAttribute"/> with attribute name
     219    /// <c>Workers</c>.</remarks>
     220    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     221    /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>
     222    /// <param name="persistedObjects">The dictionary of all already persisted objects.
     223    /// (Needed to avoid cycles.)</param>
     224    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    178225    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
    179226      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    183230      return node;
    184231    }
     232    /// <summary>
     233    /// Loads the persisted engine from the specified <paramref name="node"/>.
     234    /// </summary>
     235    /// <remarks>The number of workers must be saved in a specific way, see <see cref="GetXmlNode"/>
     236    /// for further information.</remarks>
     237    /// <param name="node">The <see cref="XmlNode"/> where the instance is saved.</param>
     238    /// <param name="restoredObjects">The dictionary of all already restored objects.
     239    /// (Needed to avoid cycles.)</param>
    185240    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    186241      base.Populate(node, restoredObjects);
  • trunk/sources/HeuristicLab.ThreadParallelEngine/ThreadParallelEngineEditor.cs

    r2 r1186  
    3030
    3131namespace HeuristicLab.ThreadParallelEngine {
     32  /// <summary>
     33  /// Visual representation of a <see cref="ThreadParallelEngine"/>.
     34  /// </summary>
    3235  public partial class ThreadParallelEngineEditor : EngineBaseEditor {
     36    /// <summary>
     37    /// Gets or sets the ThreadParallelEngine to display.
     38    /// </summary>
     39    /// <remarks>Uses property <see cref="EngineBaseEditor.Engine"/> of base class
     40    /// <see cref="EngineBaseEditor"/>. No own data storage present.</remarks>
    3341    public ThreadParallelEngine ThreadParallelEngine {
    3442      get { return (ThreadParallelEngine)Engine; }
     
    3644    }
    3745
     46    /// <summary>
     47    /// Initializes a new instance of <see cref="ThreadParallelEngineEditor"/>.
     48    /// </summary>
    3849    public ThreadParallelEngineEditor() {
    3950      InitializeComponent();
    4051    }
     52    /// <summary>
     53    /// Initializes a new instance of <see cref="ThreadParallelEngineEditor"/> with the given
     54    /// <paramref name="threadParallelEngine"/> to display.
     55    /// </summary>
     56    /// <param name="threadParallelEngine">The engine to represent visually.</param>
    4157    public ThreadParallelEngineEditor(ThreadParallelEngine threadParallelEngine)
    4258      : this() {
     
    4460    }
    4561
     62    /// <summary>
     63    /// Removes the eventhandlers from the underlying <see cref="ThreadParallelEngine"/>.
     64    /// </summary>
     65    /// <remarks>Calls <see cref="EngineBaseEditor.RemoveItemEvents"/> of base class
     66    /// <see cref="EngineBaseEditor"/>.
     67    /// </remarks>
    4668    protected override void RemoveItemEvents() {
    4769      ThreadParallelEngine.WorkersChanged -= new EventHandler(ThreadParallelEngine_WorkersChanged);
     
    4971    }
    5072
     73    /// <summary>
     74    /// Adds eventhandlers to the underlying <see cref="ThreadParallelEngine"/>.
     75    /// </summary>
     76    /// <remarks>Calls <see cref="EngineBaseEditor.AddItemEvents"/> of base class
     77    /// <see cref="EngineBaseEditor"/>.
     78    /// </remarks>
    5179    protected override void AddItemEvents() {
    5280      base.AddItemEvents();
     
    5482    }
    5583
     84    /// <summary>
     85    /// Updates the controls with the latest data.
     86    /// </summary>
     87    /// <remarks>Calls <see cref="EngineBaseEditor.UpdateControls"/> of base class
     88    /// <see cref="EngineBaseEditor"/>.</remarks>
    5689    protected override void UpdateControls() {
    5790      base.UpdateControls();
Note: See TracChangeset for help on using the changeset viewer.