Free cookie consent management tool by TermsFeed Policy Generator

Changeset 776


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

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

Location:
trunk/sources
Files:
70 edited

Legend:

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

    r61 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Event arguments to be able to specify the affected alias.
     29  /// </summary>
    2730  public class AliasEventArgs : EventArgs {
    2831    private string myAlias;
     32    /// <summary>
     33    /// Gets the affected alias.
     34    /// </summary>
    2935    public string Alias {
    3036      get { return myAlias; }
    3137    }
    3238
     39    /// <summary>
     40    /// Initializes a new instance of <see cref="AliasEventArgs"/> with the given <paramref name="alias"/>.
     41    /// </summary>
     42    /// <param name="alias">The affected alias.</param>
    3343    public AliasEventArgs(string alias) {
    3444      myAlias = alias;
  • trunk/sources/HeuristicLab.Core/AtomicOperation.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Represents a single operation with one operator and one scope.
     30  /// </summary>
    2831  public class AtomicOperation : ItemBase, IOperation {
    2932    private IOperator myOperator;
     33    /// <summary>
     34    /// Gets the current operator as <see cref="IOperator"/>.
     35    /// </summary>
    3036    public IOperator Operator {
    3137      get { return myOperator; }
    3238    }
    33     private IScope myScope;
     39    private IScope myScope; 
     40    /// <summary>
     41    /// Gets the current scope as <see cref="IScope"/>.
     42    /// </summary>
    3443    public IScope Scope {
    3544      get { return myScope; }
    3645    }
    3746
     47    /// <summary>
     48    /// Initializes a new instance of <see cref="AtomicOperation"/>.
     49    /// </summary>
    3850    public AtomicOperation() { }
     51    /// <summary>
     52    /// Initializes a new instance of <see cref="AtomicOperation"/> with the given <paramref name="op"/>
     53    /// and the given <paramref name="scope"/>.
     54    /// </summary>
     55    /// <param name="op">The operator to assign.</param>
     56    /// <param name="scope">The scope to assign.</param>
    3957    public AtomicOperation(IOperator op, IScope scope) {
    4058      myOperator = op;
     
    4260    }
    4361
     62    /// <summary>
     63    /// Clones the current instance.
     64    /// </summary>
     65    /// <remarks>The operator and the scope objects are cloned with the
     66    /// <see cref="HeuristicLab.Core.Auxiliary.Clone"/> method of the <see cref="Auxiliary"/> class.</remarks>
     67    /// <param name="clonedObjects">All already cloned objects. (Needed to avoid cycles.)</param>
     68    /// <returns>The cloned object as <see cref="AtomicOperation"/>.</returns>
    4469    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    4570      AtomicOperation clone = new AtomicOperation();
     
    5176
    5277    #region Persistence Methods
     78
     79    /// <summary>
     80    ///  Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     81    /// </summary>
     82    /// <remarks>Calls <see cref="HeuristicLab.Core.StorableBase.GetXmlNode"/> of base
     83    /// class <see cref="ItemBase"/>. <br/>
     84    /// The operator is saved as child node having the tag name <c>Operator</c>.<br/>
     85    /// The scope is also saved as a child node having the tag name <c>Scope</c>.</remarks>
     86    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     87    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     88    /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     89    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    5390    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
    5491      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    5794      return node;
    5895    }
     96    /// <summary>
     97    /// Loads the persisted operation from the specified <paramref name="node"/>.
     98    /// </summary>
     99    /// <remarks>Calls <see cref="HeuristicLab.Core.StorableBase.Populate"/> of base class
     100    /// <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
     102    /// be saved as a child node having the tag name <c>Scope</c> (see <see cref="GetXmlNode"/>).</remarks>
     103    /// <param name="node">The <see cref="XmlNode"/> where the operation is saved.</param>
     104    /// <param name="restoredObjects">A dictionary of all already restored objects. (Needed to avoid cycles.)</param>
    59105    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    60106      base.Populate(node, restoredObjects);
  • trunk/sources/HeuristicLab.Core/Auxiliary.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Static helper class.
     30  /// </summary>
    2831  public static class Auxiliary {
    2932    #region Cloning
     33    /// <summary>
     34    /// Clones the given <paramref name="obj"/> (deep clone).
     35    /// </summary>
     36    /// <remarks>Checks before clone if object has not already been cloned.</remarks>
     37    /// <param name="obj">The object to clone.</param>
     38    /// <param name="clonedObjects">A dictionary of all already cloned objects. (Needed to avoid cycles.)</param>
     39    /// <returns>The cloned object.</returns>
    3040    public static object Clone(IStorable obj, IDictionary<Guid, object> clonedObjects) {
    3141      object clone;
     
    3848
    3949    #region Error Messages
     50    /// <summary>
     51    /// Shows an error message box with a given error <paramref name="message"/> and an OK-Button.
     52    /// </summary>
     53    /// <param name="message">The error message to display.</param>
    4054    public static void ShowErrorMessageBox(string message) {
    4155      MessageBox.Show(message,
     
    4458                      MessageBoxIcon.Error);
    4559    }
     60    /// <summary>
     61    /// Shows an error message box with a given exception <paramref name="ex"/> and an OK-Button.
     62    /// </summary>
     63    /// <param name="ex">The exception to display.</param>
    4664    public static void ShowErrorMessageBox(Exception ex) {
    4765      MessageBox.Show(BuildErrorMessage(ex),
     
    5068                      MessageBoxIcon.Error);
    5169    }
     70    /// <summary>
     71    /// Builds an error message out of an exception and formats it accordingly.
     72    /// </summary>
     73    /// <param name="ex">The exception to format.</param>
     74    /// <returns>The formated message.</returns>
    5275    private static string BuildErrorMessage(Exception ex) {
    5376      StringBuilder sb = new StringBuilder();
     
    6386
    6487    #region Constraint Violation Messages
     88    /// <summary>
     89    /// Shows a warning message box with an OK-Button, indicating that the given constraints were violated and so
     90    /// the operation could not be completed.
     91    /// </summary>
     92    /// <param name="violatedConstraints">The constraints that could not be fulfilled.</param>
    6593    public static void ShowConstraintViolationMessageBox(ICollection<IConstraint> violatedConstraints) {
    6694      string message = BuildConstraintViolationMessage(violatedConstraints);
     
    7098                      MessageBoxIcon.Warning);
    7199    }
     100    /// <summary>
     101    /// Shows a question message box with a yes-no option, where to choose whether to ignore
     102    /// the given violated constraints and to complete the operation or not.
     103    /// </summary>
     104    /// <param name="violatedConstraints">The constraints that could not be fulfilled.</param>
     105    /// <returns>The result of the choice ("Yes" = 6, "No" = 7).</returns>
    72106    public static DialogResult ShowIgnoreConstraintViolationMessageBox(ICollection<IConstraint> violatedConstraints) {
    73107      string message = BuildConstraintViolationMessage(violatedConstraints);
     
    77111                             MessageBoxIcon.Question);
    78112    }
     113    /// <summary>
     114    /// Builds a message out of a given collection of violated constraints,
     115    /// including the constraints type and description.
     116    /// </summary>
     117    /// <param name="violatedConstraints">The constraints that could not be fulfilled.</param>
     118    /// <returns>The message to display.</returns>
    79119    private static string BuildConstraintViolationMessage(ICollection<IConstraint> violatedConstraints) {
    80120      StringBuilder sb = new StringBuilder();
  • trunk/sources/HeuristicLab.Core/ChooseItemDialog.cs

    r42 r776  
    3131
    3232namespace HeuristicLab.Core {
     33  /// <summary>
     34  /// A dialog to select an item.
     35  /// </summary>
    3336  public partial class ChooseItemDialog : Form {
    3437    #region Inner Class TreeNodeSorter
     
    4649    #endregion
    4750
     51    /// <summary>
     52    /// Gets or sets the caption of the dialog.
     53    /// </summary>
     54    /// <remarks>Uses property <see cref="Form.Text"/> of base class <see cref="System.Windows.Forms.Form"/>.
     55    /// No own data storage present.</remarks>
    4856    public string Caption {
    4957      get { return Text; }
     
    5260
    5361    private IItem myItem;
     62    /// <summary>
     63    /// Gets the selected item.
     64    /// </summary>
    5465    public IItem Item {
    5566      get { return myItem; }
    5667    }
    5768
     69    /// <summary>
     70    /// Initializes a new instance of <see cref="ChooseItemDialog"/>.
     71    /// </summary>
     72    /// <remarks>Calls <see cref="ChooseItemDialog(System.Type)"/> with the type of <see cref="IItem"/>
     73    /// as parameter.</remarks>
    5874    public ChooseItemDialog()
    5975      : this(typeof(IItem)) {
    6076    }
    61 
     77    /// <summary>
     78    /// Initializes a new instance of <see cref="ChooseItemDialog"/> with
     79    /// the given <paramref name="itemType"/>.
     80    /// </summary>
     81    /// <param name="itemType">The type of the items to choose from.</param>
    6282    public ChooseItemDialog(Type itemType) {
    6383      InitializeComponent();
  • trunk/sources/HeuristicLab.Core/ChooseOperatorDialog.cs

    r2 r776  
    3131
    3232namespace HeuristicLab.Core {
     33  /// <summary>
     34  /// A dialog to select an operator out of a library.
     35  /// </summary>
    3336  public partial class ChooseOperatorDialog : Form {
    3437    #region Inner Class TreeNodeSorter
     
    4952
    5053    private IOperator myOperator;
     54    /// <summary>
     55    /// Gets the selected operator.
     56    /// </summary>
    5157    public IOperator Operator {
    5258      get { return myOperator; }
    5359    }
    5460
     61    /// <summary>
     62    /// Initializes a new instance of <see cref="ChooseOperatorDialog"/>.
     63    /// </summary>
    5564    public ChooseOperatorDialog() {
    5665      InitializeComponent();
  • trunk/sources/HeuristicLab.Core/ChooseTypeDialog.cs

    r2 r776  
    3131
    3232namespace HeuristicLab.Core {
     33  /// <summary>
     34  /// A dialog to select a specific type.
     35  /// </summary>
    3336  public partial class ChooseTypeDialog : Form {
    3437    #region Inner Class TreeNodeSorter
     
    4649    #endregion
    4750
     51    /// <summary>
     52    /// Gets or sets the caption of the dialog.
     53    /// </summary>
     54    /// <remarks>Uses property <see cref="Form.Text"/> of base class <see cref="Form"/>.
     55    /// No own data storage present.</remarks>
    4856    public string Caption {
    4957      get { return Text; }
     
    5260
    5361    private Type myType;
     62    /// <summary>
     63    /// Gets the selected type.
     64    /// </summary>
    5465    public Type Type {
    5566      get { return myType; }
    5667    }
    5768
     69    /// <summary>
     70    /// Initializes a new instance of <see cref="ChooseTypeDialog"/>.
     71    /// </summary>
     72    /// <remarks>Calls <see cref="ChooseTypeDialog(Type)"/> with the type of <see cref="IItem"/> as
     73    /// parameter.</remarks>
    5874    public ChooseTypeDialog()
    5975      : this(typeof(IItem)) {
    6076    }
    6177
     78    /// <summary>
     79    /// Initializes a new instance of <see cref="ChooseTypeDialog"/> with the given
     80    /// <paramref name="baseType"/>.
     81    /// </summary>
     82    /// <param name="baseType">The base type of all chooseable types.</param>
    6283    public ChooseTypeDialog(Type baseType) {
    6384      InitializeComponent();
  • 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);
  • trunk/sources/HeuristicLab.Core/ConstrainedItemBase.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Base class for all items that are subjects to restrictions.
     30  /// </summary>
    2831  public abstract class ConstrainedItemBase : ItemBase, IConstrainedItem {
    2932    private List<IConstraint> myConstraints;
     33    /// <summary>
     34    /// Gets all current constraints.
     35    /// <note type="caution"> The constraints are returned read-only.</note>
     36    /// </summary>
    3037    public virtual ICollection<IConstraint> Constraints {
    3138      get { return myConstraints.AsReadOnly(); }
    3239    }
    3340
     41    /// <summary>
     42    /// Initializes a new instance of <see cref="ConstrainedItemBase"/>.
     43    /// </summary>
    3444    protected ConstrainedItemBase() {
    3545      myConstraints = new List<IConstraint>();
    3646    }
    3747
     48    /// <summary>
     49    /// Clones the current instance (deep clone).
     50    /// </summary>
     51    /// <remarks>Calls <see cref="StorableBase.Clone
     52    /// (System.Collections.Generic.IDictionary&lt;System.Guid, object&gt;)"/>
     53    /// of base class <see cref="ItemBase"/>.<br/>
     54    /// Deep clone through <see cref="Auxiliary.Clone"/> method of helper class
     55    /// <see cref="Auxiliary"/>.</remarks>
     56    /// <param name="clonedObjects">Dictionary of all already cloned objects. (Needed to avoid cycles.)</param>
     57    /// <returns>The cloned object as <see cref="ConstrainedItemBase"/>.</returns>
    3858    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    3959      ConstrainedItemBase clone = (ConstrainedItemBase)base.Clone(clonedObjects);
     
    4464    }
    4565
     66    /// <summary>
     67    /// Adds the given <paramref name="constraint"/> to the current list.
     68    /// </summary>
     69    /// <remarks>Calls <see cref="OnConstraintAdded"/>.</remarks>
     70    /// <param name="constraint">The constraint to add.</param>
    4671    public virtual void AddConstraint(IConstraint constraint) {
    4772      myConstraints.Add(constraint);
    4873      OnConstraintAdded(constraint);
    4974    }
     75    /// <summary>
     76    /// Removes the given <paramref name="constraint"/> from the current list.
     77    /// </summary>
     78    /// <remarks>Calls <see cref="OnConstraintRemoved"/> if the constraint can be successfully removed.</remarks>
     79    /// <param name="constraint">The constraint to remove.</param>
    5080    public virtual void RemoveConstraint(IConstraint constraint) {
    5181      if (myConstraints.Remove(constraint))
     
    5383    }
    5484
     85    /// <summary>
     86    /// Checks all constraints of the current instance.
     87    /// </summary>
     88    /// <returns><c>true</c> if all constraints could be fulfilled, <c>false</c> otherwise.</returns>
    5589    public bool IsValid() {
    5690      bool result = true;
     
    5993      return result;
    6094    }
     95    /// <summary>
     96    /// Checks all constraints of the current instance.
     97    /// </summary>
     98    /// <param name="violatedConstraints">Output parameter; contains all constraints that could not be
     99    /// fulfilled.</param>
     100    /// <returns><c>true</c> if all constraints could be fulfilled, <c>false</c> otherwise.</returns>
    61101    public bool IsValid(out ICollection<IConstraint> violatedConstraints) {
    62102      bool result = true;
     
    71111    }
    72112
     113    /// <summary>
     114    /// Creates an instance of <see cref="ConstrainedItemBaseView"/>
     115    /// to represent the current instance visually.
     116    /// </summary>
     117    /// <returns>The created view as <see cref="ConstrainedItemBase"/>.</returns>
    73118    public override IView CreateView() {
    74119      return new ConstrainedItemBaseView(this);
    75120    }
    76121
     122    /// <summary>
     123    /// Occurs when a constraint is added.
     124    /// </summary>
    77125    public event EventHandler<ConstraintEventArgs> ConstraintAdded;
     126    /// <summary>
     127    /// Fires a new <c>ConstraintAdded</c> event.
     128    /// </summary>
     129    /// <param name="constraint">The constraint that was added.</param>
    78130    protected virtual void OnConstraintAdded(IConstraint constraint) {
    79131      if (ConstraintAdded != null)
    80132        ConstraintAdded(this, new ConstraintEventArgs(constraint));
    81133    }
     134    /// <summary>
     135    /// Occurs when a constraint is removed.
     136    /// </summary>
    82137    public event EventHandler<ConstraintEventArgs> ConstraintRemoved;
     138    /// <summary>
     139    /// Fires a new <c>ConstraintRemoved</c> event.
     140    /// </summary>
     141    /// <param name="constraint">The constraint that was removed.</param>
    83142    protected virtual void OnConstraintRemoved(IConstraint constraint) {
    84143      if (ConstraintRemoved != null)
     
    86145    }
    87146
    88     #region Persistence Methods
     147    #region Persistence Methods 
     148    /// <summary>
     149    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     150    /// </summary>
     151    /// <remarks>Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>. <br/>
     152    /// For saving the constraints a child node is created having the tag name <c>Constraints</c>. Beyond this
     153    /// child node all constraints are saved as child nodes themselves.</remarks>
     154    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     155    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     156    /// <param name="persistedObjects">The dictionary of all already persisted objects.
     157    /// (Needed to avoid cycles.)</param>
     158    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    89159    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    90160      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    97167      return node;
    98168    }
     169    /// <summary>
     170    ///  Loads the persisted item from the specified <paramref name="node"/>.
     171    /// </summary>
     172    /// <remarks>See <see cref="GetXmlNode"/> to get information about how the constrained item must
     173    /// be saved. <br/>
     174    /// Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.</remarks>
     175    /// <param name="node">The <see cref="XmlNode"/> where the constrained item is saved.</param>
     176    /// <param name="restoredObjects">The dictionary of all already restored objects.
     177    /// (Needed to avoid cycles.)</param>
    99178    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    100179      base.Populate(node, restoredObjects);
  • trunk/sources/HeuristicLab.Core/ConstrainedItemBaseView.cs

    r2 r776  
    2929
    3030namespace HeuristicLab.Core {
     31  /// <summary>
     32  /// The visual representation of an <see cref="IConstrainedItem"/>.
     33  /// </summary>
    3134  public partial class ConstrainedItemBaseView : ViewBase {
    3235    private ChooseItemDialog chooseItemDialog;
    3336
     37    /// <summary>
     38    /// Gets or sets the current item to represent visually.
     39    /// </summary>
    3440    public IConstrainedItem ConstrainedItem {
    3541      get { return (IConstrainedItem)Item; }
     
    3743    }
    3844
     45    /// <summary>
     46    /// Initializes a new instance of <see cref="ConstrainedItemBaseView"/>
     47    /// with the caption "Constrained Item".
     48    /// </summary>
    3949    public ConstrainedItemBaseView() {
    4050      InitializeComponent();
     
    4252      Caption = "Constrained Item";
    4353    }
     54    /// <summary>
     55    /// Initializes a new instance of <see cref="ConstrainedItemBaseView"/> with the given
     56    /// <paramref name="constraintItem"/>.
     57    /// </summary>
     58    /// <param name="constraintItem">The item to represent visually.</param>
    4459    public ConstrainedItemBaseView(IConstrainedItem constraintItem)
    4560      : this() {
     
    4762    }
    4863
     64    /// <summary>
     65    /// Removes the event handlers from the underlying <see cref="IConstrainedItem"/>.
     66    /// </summary>
     67    /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    4968    protected override void RemoveItemEvents() {
    5069      ConstrainedItem.ConstraintAdded -= new EventHandler<ConstraintEventArgs>(ConstrainedItemBase_ConstraintAdded);
     
    5271      base.RemoveItemEvents();
    5372    }
     73    /// <summary>
     74    /// Adds event handlers to the underlying <see cref="IConstrainedItem"/>.
     75    /// </summary>
     76    /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    5477    protected override void AddItemEvents() {
    5578      base.AddItemEvents();
     
    5881    }
    5982
     83    /// <summary>
     84    /// Updates all controls with the latest data of the model.
     85    /// </summary>
     86    /// <remarks>Calls <see cref="ViewBase.UpdateControls"/> of base class <see cref="ViewBase"/>.</remarks>
    6087    protected override void UpdateControls() {
    6188      base.UpdateControls();
  • trunk/sources/HeuristicLab.Core/ConstraintEventArgs.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Event arguments to be able to specify the affected constraint.
     29  /// </summary>
    2730  public class ConstraintEventArgs : ItemEventArgs {
     31    /// <summary>
     32    /// Gets the affected constraint.
     33    /// </summary>
     34    /// <remarks>Uses property <see cref="ItemEventArgs.Item"/> of base class <see cref="ItemEventArgs"/>.
     35    /// No own data storage present.</remarks>
    2836    public IConstraint Constraint {
    2937      get { return (IConstraint)Item; }
    3038    }
    3139
     40    /// <summary>
     41    /// Initializes a new instance of <see cref="ConstraintEventArgs"/> with the given
     42    /// <paramref name="constraint"/>.
     43    /// </summary>
     44    /// <remarks>Only calls the constructor of base class <see cref="ItemEventArgs"/>.</remarks>
     45    /// <param name="constraint">The affected constraint.</param>
    3246    public ConstraintEventArgs(IConstraint constraint)
    3347      : base(constraint) {
  • trunk/sources/HeuristicLab.Core/EditorBase.cs

    r2 r776  
    2929
    3030namespace HeuristicLab.Core {
     31  /// <summary>
     32  /// Base class for views that can load and save data.
     33  /// </summary>
    3134  public partial class EditorBase : ViewBase, IEditor {
    3235    private string myFilename;
     36    /// <summary>
     37    /// Gets or sets the filename of the current editor.
     38    /// </summary>
     39    /// <remarks>Calls <see cref="OnFilenameChanged"/> in the setter if the filename is new.</remarks>
    3340    public string Filename {
    3441      get { return myFilename; }
     
    4148    }
    4249
     50    /// <summary>
     51    /// Initializes a new instance of <see cref="EditorBase"/> with the caption "Editor".
     52    /// </summary>
    4353    public EditorBase() {
    4454      InitializeComponent();
     
    4656    }
    4757
     58    /// <summary>
     59    /// Updates all controls with the latest data of the model.
     60    /// </summary>
     61    /// <remarks>Calls <see cref="ViewBase.UpdateControls"/> of base class <see cref="ViewBase"/>.</remarks>
    4862    protected override void UpdateControls() {
    4963      base.UpdateControls();
     
    5468    }
    5569
     70    /// <summary>
     71    /// Occurs when the filename is changed.
     72    /// </summary>
    5673    public event EventHandler FilenameChanged;
     74    /// <summary>
     75    /// Fires a new <c>FilenameChanged</c> event.
     76    /// </summary>
    5777    protected virtual void OnFilenameChanged() {
    5878      if (FilenameChanged != null)
  • trunk/sources/HeuristicLab.Core/EngineBase.cs

    r47 r776  
    2727
    2828namespace HeuristicLab.Core {
     29  /// <summary>
     30  /// Base class to represent an engine, which is an interpreter, holding the code, the data and
     31  /// the actual state, which is the runtime stack and a pointer onto the next operation. It represents
     32  /// one execution and can handle parallel executions.
     33  /// </summary>
    2934  public abstract class EngineBase : ItemBase, IEngine {
     35    /// <summary>
     36    /// Field of the current instance that represent the operator graph.
     37    /// </summary>
    3038    protected IOperatorGraph myOperatorGraph;
     39    /// <summary>
     40    /// Gets the current operator graph.
     41    /// </summary>
    3142    public IOperatorGraph OperatorGraph {
    3243      get { return myOperatorGraph; }
    3344    }
     45    /// <summary>
     46    /// Field of the current instance that represent the global scope.
     47    /// </summary>
    3448    protected IScope myGlobalScope;
     49    /// <summary>
     50    /// Gets the current global scope.
     51    /// </summary>
    3552    public IScope GlobalScope {
    3653      get { return myGlobalScope; }
     
    3855
    3956    private TimeSpan myExecutionTime;
     57    /// <summary>
     58    /// Gets or sets the execution time.
     59    /// </summary>
     60    /// <remarks>Calls <see cref="OnExecutionTimeChanged"/> in the setter.</remarks>
    4061    public TimeSpan ExecutionTime {
    4162      get { return myExecutionTime; }
     
    4667    }
    4768
     69    /// <summary>
     70    /// Field of the current instance that represent the execution stack.
     71    /// </summary>
    4872    protected Stack<IOperation> myExecutionStack;
     73    /// <summary>
     74    /// Gets the current execution stack.
     75    /// </summary>
    4976    public Stack<IOperation> ExecutionStack {
    5077      get { return myExecutionStack; }
    5178    }
     79   
     80    /// <summary>
     81    /// Flag of the current instance whether it is currently running.
     82    /// </summary>
    5283    protected bool myRunning;
     84    /// <summary>
     85    /// Gets information whether the instance is currently running.
     86    /// </summary>
    5387    public bool Running {
    5488      get { return myRunning; }
    5589    }
     90
     91    /// <summary>
     92    /// Flag of the current instance whether it is canceled.
     93    /// </summary>
    5694    protected bool myCanceled;
     95    /// <summary>
     96    /// Gets information whether the instance is currently canceled.
     97    /// </summary>
    5798    public bool Canceled {
    5899      get { return myCanceled; }
    59100    }
     101    /// <summary>
     102    /// Gets information whether the instance has already terminated.
     103    /// </summary>
    60104    public virtual bool Terminated {
    61105      get { return ExecutionStack.Count == 0; }
    62106    }
    63107
     108    /// <summary>
     109    /// Initializes a new instance of <see cref="EngineBase"/> with a new global scope.
     110    /// </summary>
     111    /// <remarks>Calls <see cref="Reset"/>.</remarks>
    64112    protected EngineBase() {
    65113      myOperatorGraph = new OperatorGraph();
     
    69117    }
    70118
     119    /// <summary>
     120    /// Clones the current instance (deep clone).
     121    /// </summary>
     122    /// <remarks>Deep clone through <see cref="Auxiliary.Clone"/> method of helper class
     123    /// <see cref="Auxiliary"/>.</remarks>
     124    /// <param name="clonedObjects">Dictionary of all already clone objects. (Needed to avoid cycles.)</param>
     125    /// <returns>The cloned object as <see cref="EngineBase"/>.</returns>
    71126    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    72127      EngineBase clone = (EngineBase)base.Clone(clonedObjects);
     
    84139    }
    85140
     141    /// <inheritdoc/>
     142    /// <remarks>Calls <see cref="ThreadPool.QueueUserWorkItem(System.Threading.WaitCallback, object)"/>
     143    /// of class <see cref="ThreadPool"/>.</remarks>
    86144    public virtual void Execute() {
    87145      myRunning = true;
     
    89147      ThreadPool.QueueUserWorkItem(new WaitCallback(Run), null);
    90148    }
     149    /// <inheritdoc/>
     150    /// <remarks>Calls <see cref="ThreadPool.QueueUserWorkItem(System.Threading.WaitCallback, object)"/>
     151    /// of class <see cref="ThreadPool"/>.</remarks>
    91152    public virtual void ExecuteSteps(int steps) {
    92153      myRunning = true;
     
    94155      ThreadPool.QueueUserWorkItem(new WaitCallback(Run), steps);
    95156    }
     157    /// <inheritdoc/>
     158    /// <remarks>Calls <see cref="ThreadPool.QueueUserWorkItem(System.Threading.WaitCallback, object)"/>
     159    /// of class <see cref="ThreadPool"/>.</remarks>
    96160    public void ExecuteStep() {
    97161      ExecuteSteps(1);
    98162    }
     163    /// <inheritdoc/>
     164    /// <remarks>Sets the protected flag <c>myCanceled</c> to <c>true</c>.</remarks>
    99165    public virtual void Abort() {
    100166      myCanceled = true;
    101167    }
     168    /// <inheritdoc/>
     169    /// <remarks>Sets <c>myCanceled</c> and <c>myRunning</c> to <c>false</c>. The global scope is cleared,
     170    /// the execution time is reseted, the execution stack is cleared and a new <see cref="AtomicOperation"/>
     171    /// with the initial operator is added. <br/>
     172    /// Calls <see cref="OnInitialized"/>.</remarks>
    102173    public virtual void Reset() {
    103174      myCanceled = false;
     
    142213    }
    143214
     215    /// <summary>
     216    /// Performs the next operation.
     217    /// </summary>
    144218    protected abstract void ProcessNextOperation();
    145219
     220    /// <summary>
     221    /// Occurs when the current instance is initialized.
     222    /// </summary>
    146223    public event EventHandler Initialized;
     224    /// <summary>
     225    /// Fires a new <c>Initialized</c> event.
     226    /// </summary>
    147227    protected virtual void OnInitialized() {
    148228      if (Initialized != null)
    149229        Initialized(this, new EventArgs());
    150230    }
     231    /// <summary>
     232    /// Occurs when an operation is executed.
     233    /// </summary>
    151234    public event EventHandler<OperationEventArgs> OperationExecuted;
     235    /// <summary>
     236    /// Fires a new <c>OperationExecuted</c> event.
     237    /// </summary>
     238    /// <param name="operation">The operation that has been executed.</param>
    152239    protected virtual void OnOperationExecuted(IOperation operation) {
    153240      if (OperationExecuted != null)
    154241        OperationExecuted(this, new OperationEventArgs(operation));
    155242    }
     243    /// <summary>
     244    /// Occurs when an exception occured during the execution.
     245    /// </summary>
    156246    public event EventHandler<ExceptionEventArgs> ExceptionOccurred;
     247    /// <summary>
     248    /// Aborts the execution and fires a new <c>ExceptionOccurred</c> event.
     249    /// </summary>
     250    /// <param name="exception">The exception that was thrown.</param>
    157251    protected virtual void OnExceptionOccurred(Exception exception) {
    158252      Abort();
     
    160254        ExceptionOccurred(this, new ExceptionEventArgs(exception));
    161255    }
     256    /// <summary>
     257    /// Occurs when the execution time changed.
     258    /// </summary>
    162259    public event EventHandler ExecutionTimeChanged;
     260    /// <summary>
     261    /// Fires a new <c>ExecutionTimeChanged</c> event.
     262    /// </summary>
    163263    protected virtual void OnExecutionTimeChanged() {
    164264      if (ExecutionTimeChanged != null)
    165265        ExecutionTimeChanged(this, new EventArgs());
    166266    }
     267    /// <summary>
     268    /// Occurs when the execution is finished.
     269    /// </summary>
    167270    public event EventHandler Finished;
     271    /// <summary>
     272    /// Fires a new <c>Finished</c> event.
     273    /// </summary>
    168274    protected virtual void OnFinished() {
    169275      if (Finished != null)
     
    172278
    173279    #region Persistence Methods
     280    /// <summary>
     281    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     282    /// </summary>
     283    /// <remarks>Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>.<br/>
     284    /// A quick overview how the single elements of the current instance are saved:
     285    /// <list type="bullet">
     286    /// <item>
     287    /// <term>Operator graph: </term>
     288    /// <description>Saved as a child node with the tag name <c>OperatorGraph</c>.</description>
     289    /// </item>
     290    /// <item>
     291    /// <term>Global scope: </term>
     292    /// <description>Saved as a child node with the tag name <c>GlobalScope</c>.</description>
     293    /// </item>
     294    /// <item>
     295    /// <term>Execution stack: </term>
     296    /// <description>A child node is created with the tag name <c>ExecutionStack</c>. Beyond this child node
     297    /// all operations of the execution stack are saved as child nodes.</description>
     298    /// </item>
     299    /// <item>
     300    /// <term>Execution time: </term>
     301    /// <description>Saved as a child node with the tag name <c>ExecutionTime</c>, where the execution
     302    /// time is saved as string in the node's inner text.</description>
     303    /// </item>
     304    /// </list></remarks>
     305    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     306    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     307    /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     308    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    174309    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    175310      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    190325      return node;
    191326    }
     327    /// <summary>
     328    ///  Loads the persisted instance from the specified <paramref name="node"/>.
     329    /// </summary>
     330    /// <remarks>See <see cref="GetXmlNode"/> to get information on how the instance must be saved. <br/>
     331    /// Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.</remarks>
     332    /// <param name="node">The <see cref="XmlNode"/> where the engine is saved.</param>
     333    /// <param name="restoredObjects">The dictionary of all already restored objects.
     334    /// (Needed to avoid cycles.)</param>
    192335    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    193336      base.Populate(node, restoredObjects);
  • trunk/sources/HeuristicLab.Core/EngineBaseEditor.cs

    r2 r776  
    3030
    3131namespace HeuristicLab.Core {
     32  /// <summary>
     33  /// Base class for editors of engines.
     34  /// </summary>
    3235  public partial class EngineBaseEditor : EditorBase {
    3336    private int executionTimeCounter;
    3437
     38    /// <summary>
     39    /// Gets or sets the current engine.
     40    /// </summary>
     41    /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="EditorBase"/>.</remarks>
    3542    public IEngine Engine {
    3643      get { return (IEngine)Item; }
     
    3845    }
    3946
     47    /// <summary>
     48    /// Initializes a new instance of <see cref="EngineBaseEditor"/>.
     49    /// </summary>
    4050    public EngineBaseEditor() {
    4151      InitializeComponent();
    4252    }
    4353
     54    /// <summary>
     55    /// Removes the event handlers from the underlying <see cref="IEngine"/>.
     56    /// </summary>
     57    /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    4458    protected override void RemoveItemEvents() {
    4559      Engine.Initialized -= new EventHandler(Engine_Initialized);
     
    5165      base.RemoveItemEvents();
    5266    }
     67    /// <summary>
     68    /// Adds event handlers to the underlying <see cref="IEngine"/>.
     69    /// </summary>
     70    /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    5371    protected override void AddItemEvents() {
    5472      base.AddItemEvents();
     
    6179    }
    6280
     81    /// <summary>
     82    /// Updates all controls with the latest data of the model.
     83    /// </summary>
     84    /// <remarks>Calls <see cref="EditorBase.UpdateControls"/> of base class <see cref="EditorBase"/>.</remarks>
    6385    protected override void UpdateControls() {
    6486      base.UpdateControls();
  • trunk/sources/HeuristicLab.Core/ExceptionEventArgs.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Event arguments to be able to specify the affected exception.
     29  /// </summary>
    2730  public class ExceptionEventArgs : EventArgs {
    2831    private Exception myException;
     32    /// <summary>
     33    /// Gets the affected exception.
     34    /// </summary>
    2935    public Exception Exception {
    3036      get { return myException; }
    3137    }
    3238
     39    /// <summary>
     40    /// Initializes a new instance of <see cref="ExceptionEventArgs"/>
     41    /// with the given <paramref name="exception"/>.
     42    /// </summary>
     43    /// <param name="exception">The affected exception.</param>
    3344    public ExceptionEventArgs(Exception exception) {
    3445      myException = exception;
  • trunk/sources/HeuristicLab.Core/HeuristicLab.Core.csproj

    r582 r776  
    33    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    44    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    5     <ProductVersion>9.0.30729</ProductVersion>
     5    <ProductVersion>9.0.21022</ProductVersion>
    66    <SchemaVersion>2.0</SchemaVersion>
    77    <ProjectGuid>{F43B59AB-2B8C-4570-BC1E-15592086517C}</ProjectGuid>
  • trunk/sources/HeuristicLab.Core/HeuristicLabCorePlugin.cs

    r582 r776  
    2727
    2828namespace HeuristicLab.Core {
     29  /// <summary>
     30  /// Plugin class for HeuristicLab.Core plugin.
     31  /// </summary>
    2932  [ClassInfo(Name = "HeuristicLab.Core-3.2")]
    3033  [PluginFile(Filename = "HeuristicLab.Core-3.2.dll", Filetype = PluginFileType.Assembly)]
  • trunk/sources/HeuristicLab.Core/Interfaces/IConstrainedItem.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Interface to represent items that are subjects to restrictions.
     29  /// </summary>
    2730  public interface IConstrainedItem : IItem {
     31    /// <summary>
     32    /// All constraints of the current instance.
     33    /// </summary>
    2834    ICollection<IConstraint> Constraints { get; }
    2935
     36    /// <summary>
     37    /// Adds a constraint to the current instance.
     38    /// </summary>
     39    /// <param name="constraint">The constraint to add.</param>
    3040    void AddConstraint(IConstraint constraint);
     41    /// <summary>
     42    /// Removes a constraint from the current instance.
     43    /// </summary>
     44    /// <param name="constraint">The constraint to remove.</param>
    3145    void RemoveConstraint(IConstraint constraint);
    3246
     47    /// <summary>
     48    /// Checks whether the current instance fullfills all constraints.
     49    /// </summary>
     50    /// <returns><c>true</c> if all constraints are fullfilled, <c>false</c> otherwise.</returns>
    3351    bool IsValid();
     52    /// <summary>
     53    /// Checks whether the current instance fullfills all constraints.
     54    /// </summary>
     55    /// <param name="violatedConstraints">Output parameter, all constraints that could not be fullfilled.</param>
     56    /// <returns><c>true</c> if all constraints are fullfilled, <c>false</c> otherwise.</returns>
    3457    bool IsValid(out ICollection<IConstraint> violatedConstraints);
    3558
     59    /// <summary>
     60    /// An <see cref="EventHandler"/> for events when a new constraint is added.
     61    /// </summary>
    3662    event EventHandler<ConstraintEventArgs> ConstraintAdded;
     63    /// <summary>
     64    /// An <see cref="EventHandler"/> for events when a constraint is deleted.
     65    /// </summary>
    3766    event EventHandler<ConstraintEventArgs> ConstraintRemoved;
    3867  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IConstraint.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Interface to represent restrictions.
     29  /// </summary>
    2730  public interface IConstraint : IItem {
     31    /// <summary>
     32    /// Gets the description of the current instance.
     33    /// </summary>
    2834    string Description { get; }
    2935
     36    /// <summary>
     37    /// Checks whether the given <paramref name="data"/> fulfills the current constraint.
     38    /// </summary>
     39    /// <param name="data">The item to check.</param>
     40    /// <returns><c>true</c> if the current instance could be fulfilled, <c>false</c> otherwise.</returns>
    3041    bool Check(IItem data);
    3142  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IEditable.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Interface to represent editable items.
     29  /// </summary>
    2730  public interface IEditable : IViewable {
     31    /// <summary>
     32    /// Creates an editor.
     33    /// </summary>
     34    /// <returns>The created editor as <see cref="IEditor"/>.</returns>
    2835    IEditor CreateEditor();
    2936  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IEditor.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Interface to represent an editor.
     29  /// </summary>
    2730  public interface IEditor : IView {
     31
     32    /// <summary>
     33    /// Gets or sets the filename.
     34    /// </summary>
    2835    string Filename { get; set; }
    2936
     37    /// <summary>
     38    /// Occurs when the filename was changed.
     39    /// </summary>
    3040    event EventHandler FilenameChanged;
    3141  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IEngine.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Interface to represent one run. (An engine is an interpreter, holding the code,
     29  /// the data and the actual state, which is the runtime stack and a pointer onto the next operation.).
     30  /// It is responsible for operator execution and able to deal with parallelism.
     31  /// </summary>
    2732  public interface IEngine : IItem {
     33    /// <summary>
     34    /// Gets the operator graph of the current instance.
     35    /// </summary>
    2836    IOperatorGraph OperatorGraph { get; }
     37    /// <summary>
     38    /// Gets the global scope of the current instance.
     39    /// </summary>
    2940    IScope GlobalScope { get; }
    3041
     42    /// <summary>
     43    /// Gets the execution time of the current instance.
     44    /// </summary>
    3145    TimeSpan ExecutionTime { get; }
    3246
     47    /// <summary>
     48    /// Gets information whether the engine is currently running.
     49    /// </summary>
    3350    bool Running { get; }
     51    /// <summary>
     52    /// Gets information whether the engine is canceled.
     53    /// </summary>
    3454    bool Canceled { get; }
     55    /// <summary>
     56    /// Gets information whether the engine has already terminated.
     57    /// </summary>
    3558    bool Terminated { get; }
    3659
     60    /// <summary>
     61    /// Executes the whole run.
     62    /// </summary>
    3763    void Execute();
     64    /// <summary>
     65    /// Executes one step (one operation).
     66    /// </summary>
    3867    void ExecuteStep();
     68    /// <summary>
     69    /// Executes the given number of steps.
     70    /// </summary>
     71    /// <param name="steps">The number of steps to execute.</param>
    3972    void ExecuteSteps(int steps);
     73    /// <summary>
     74    /// Aborts the engine run.
     75    /// </summary>
    4076    void Abort();
     77    /// <summary>
     78    /// Resets the current instance.
     79    /// </summary>
    4180    void Reset();
    4281
     82    /// <summary>
     83    /// Occurs when the current instance is initialized.
     84    /// </summary>
    4385    event EventHandler Initialized;
     86    /// <summary>
     87    /// Occurs when an operation is executed.
     88    /// </summary>
    4489    event EventHandler<OperationEventArgs> OperationExecuted;
     90    /// <summary>
     91    /// Occurs when an exception was thrown.
     92    /// </summary>
    4593    event EventHandler<ExceptionEventArgs> ExceptionOccurred;
     94    /// <summary>
     95    /// Occurs when the execution time was changed.
     96    /// </summary>
    4697    event EventHandler ExecutionTimeChanged;
     98    /// <summary>
     99    /// Occurs when the engine is finished.
     100    /// </summary>
    47101    event EventHandler Finished;
    48102  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IItem.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Interface to represent (almost) every HeuristicLab object (an object, an operator,...).
     29  /// </summary>
    2730  public interface IItem : IStorable, IViewable {
     31    /// <summary>
     32    /// Fires a new <c>Changed</c> event.
     33    /// </summary>
    2834    void FireChanged();
    2935
     36    /// <summary>
     37    /// Occurs when the current instance has changed.
     38    /// </summary>
    3039    event EventHandler Changed;
    3140  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IOperation.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Interface to represent an operation (Executes a defined number of operators on a defined scope).
     29  /// </summary>
    2730  public interface IOperation : IItem {
    2831  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IOperator.cs

    r47 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Interface to represent an operator (e.g. GreaterThanComparator,...),
     29  /// a basic instruction of an algorithm.
     30  /// </summary>
    2731  public interface IOperator : IConstrainedItem {
     32    /// <summary>
     33    /// Gets or sets the name of the current instance.
     34    /// </summary>
    2835    string Name { get; set; }
     36    /// <summary>
     37    /// Gets or sets the description of the current instance.
     38    /// </summary>
    2939    string Description { get; }
    3040
     41    /// <summary>
     42    /// Gets information whether the current operator has been canceled.
     43    /// </summary>
    3144    bool Canceled { get; }
     45    /// <summary>
     46    /// Gets or sets a boolean value whether the engine should stop here during the run.
     47    /// </summary>
    3248    bool Breakpoint { get; set; }
    3349
     50    /// <summary>
     51    /// Gets a list of all sub operators.
     52    /// </summary>
    3453    IList<IOperator> SubOperators { get; }
     54    /// <summary>
     55    /// Gets a collection of all variable (parameter) infos.
     56    /// </summary>
    3557    ICollection<IVariableInfo> VariableInfos { get; }
     58    /// <summary>
     59    /// Gets a collection of all variables of the current operator.
     60    /// </summary>
    3661    ICollection<IVariable> Variables { get; }
    3762
     63    /// <summary>
     64    /// Adds the given sub operator to the current instance.
     65    /// </summary>
     66    /// <param name="op">The operator to add.</param>
    3867    void AddSubOperator(IOperator op);
     68    /// <summary>
     69    /// Adds the given sub operator to the current instance if all constraints can be fulfilled.
     70    /// </summary>
     71    /// <param name="op">The operator to add.</param>
     72    /// <returns><c>true</c> if the operator could be added without violating constraints,
     73    /// <c>false</c> otherwise.</returns>
    3974    bool TryAddSubOperator(IOperator op);
     75    /// <summary>
     76    /// Adds the given sub operator to the current instance if all constraints can be fulfilled.
     77    /// </summary>
     78    /// <param name="op">The operator to add.</param>
     79    /// <param name="violatedConstraints">Output parameter; contains all constraints that could not be
     80    /// fulfilled.</param>
     81    /// <returns><c>true</c> if the operator could be added without violating constraints,
     82    /// <c>false</c> otherwise.</returns>
    4083    bool TryAddSubOperator(IOperator op, out ICollection<IConstraint> violatedConstraints);
     84    /// <summary>
     85    /// Adds the given sub operator at a the specified <paramref name="index"/>.
     86    /// </summary>
     87    /// <param name="op">The operator to add.</param>
     88    /// <param name="index">The position where to add the operator.</param>
    4189    void AddSubOperator(IOperator op, int index);
     90    /// <summary>
     91    /// Adds the given operator at the specified <paramref name="index"/> to the current instance
     92    /// if all constraints can be fulfilled.
     93    /// </summary>
     94    /// <param name="op">The operator to add.</param>
     95    /// <param name="index">The position where to add the operator.</param>
     96    /// <returns><c>true</c> if the operator could be added without violating constraints,
     97    /// <c>false</c> otherwise.</returns>
    4298    bool TryAddSubOperator(IOperator op, int index);
     99    /// <summary>
     100    /// Adds the given operator at the specified <paramref name="index"/> to the current instance
     101    /// if all constraints can be fulfilled.
     102    /// </summary>
     103    /// <param name="op">The operator to add.</param>
     104    /// <param name="index">The position where to add the operator.</param>
     105    /// <param name="violatedConstraints">Output parameter; contains all constraints that could not be
     106    /// fulfilled.</param>
     107    /// <returns><c>true</c> if the operator could be added without violating constraints,
     108    /// <c>false</c> otherwise.</returns>
    43109    bool TryAddSubOperator(IOperator op, int index, out ICollection<IConstraint> violatedConstraints);
     110    /// <summary>
     111    /// Removes a sub operator at the specified <paramref name="index"/>.
     112    /// </summary>
     113    /// <param name="index">The position where to delete the operator.</param>
    44114    void RemoveSubOperator(int index);
     115    /// <summary>
     116    /// Removes a sub operator at the specified <paramref name="index"/> if all constraint can be fulfilled.
     117    /// </summary>
     118    /// <param name="index">The position where to delete the operator.</param>
     119    /// <returns><c>true</c> if the operator could be deleted without violating constraints,
     120    /// <c>false</c> otherwise.</returns>
    45121    bool TryRemoveSubOperator(int index);
     122    /// <summary>
     123    /// Deletes the operator at the specified <paramref name="index"/> 
     124    /// if all constraints can be fulfilled.
     125    /// </summary>
     126    /// <param name="index">The position where to delete the operator.</param>
     127    /// <param name="violatedConstraints">Output parameter; contains all constraints that could not be
     128    /// fulfilled.</param>
     129    /// <returns><c>true</c> if the operator could be deleted without violating constraints,
     130    /// <c>false</c> otherwise.</returns>
    46131    bool TryRemoveSubOperator(int index, out ICollection<IConstraint> violatedConstraints);
    47132
     133    /// <summary>
     134    /// Gets the variable info with the given <paramref name="formalName"/>.
     135    /// </summary>
     136    /// <param name="formalName">The formal name of the variable info.</param>
     137    /// <returns>The variable info with the specified formal name.</returns>
    48138    IVariableInfo GetVariableInfo(string formalName);
     139    /// <summary>
     140    /// Adds the specified variable info to the current instance.
     141    /// </summary>
     142    /// <param name="variableInfo">The variable info to add.</param>
    49143    void AddVariableInfo(IVariableInfo variableInfo);
     144    /// <summary>
     145    /// Adds the specified variable info to the current instance, if all constraints can be fulfilled.
     146    /// </summary>
     147    /// <param name="variableInfo">The variable info to add.</param>
     148    /// <returns><c>true</c> if the variable info could be added without violating constraints,
     149    /// <c>false</c> otherwise.</returns>
    50150    bool TryAddVariableInfo(IVariableInfo variableInfo);
     151    /// <summary>
     152    /// Adds the specified variable info to the current instance, if all constraints can be fulfilled.
     153    /// </summary>
     154    /// <param name="variableInfo">The variable info to add.</param>
     155    /// <param name="violatedConstraints">Output parameter; contains all constraints that could not be
     156    /// fulfilled.</param>
     157    /// <returns><c>true</c> if the variable info could be added without violating constraints,
     158    /// <c>false</c> otherwise.</returns>
    51159    bool TryAddVariableInfo(IVariableInfo variableInfo, out ICollection<IConstraint> violatedConstraints);
     160    /// <summary>
     161    /// Removes the variable info with the given formal name.
     162    /// </summary>
     163    /// <param name="formalName">The formal name of the variable info to remove.</param>
    52164    void RemoveVariableInfo(string formalName);
     165    /// <summary>
     166    /// Deletes the variable info with the given formal name,
     167    /// if all constraints can be fulfilled.
     168    /// </summary>
     169    /// <param name="formalName">The formal name of the variable info to remove.</param>
     170    /// <returns><c>true</c> if the variable info could be deleted without violating constraints,
     171    /// <c>false</c> otherwise.</returns>
    53172    bool TryRemoveVariableInfo(string formalName);
     173    /// <summary>
     174    /// Deletes the variable info with the given formal name,
     175    /// if all constraints can be fulfilled.
     176    /// </summary>
     177    /// <param name="formalName">The formal name of the variable info to remove.</param>
     178    /// <param name="violatedConstraints">Output parameter; contains all constraints that could not be
     179    /// fulfilled.</param>
     180    /// <returns><c>true</c> if the variable info could be deleted without violating constraints,
     181    /// <c>false</c> otherwise.</returns>
    54182    bool TryRemoveVariableInfo(string formalName, out ICollection<IConstraint> violatedConstraints);
    55183
     184    /// <summary>
     185    /// Gets a variable with the given <paramref name="name"/>.
     186    /// </summary>
     187    /// <param name="name">The name of the variable.</param>
     188    /// <returns>The variable with the specified name.</returns>
    56189    IVariable GetVariable(string name);
     190    /// <summary>
     191    /// Adds the specified <paramref name="variable"/> to the current instance.
     192    /// </summary>
     193    /// <param name="variable">The variable to add.</param>
    57194    void AddVariable(IVariable variable);
     195    /// <summary>
     196    /// Adds the specified <paramref name="variable"/> to the current instance if all constraints can
     197    /// be fulfilled.
     198    /// </summary>
     199    /// <param name="variable">The variable to add.</param>
     200    /// <returns><c>true</c> if the variable could be added without violating constraints,
     201    /// <c>false</c> otherwise.</returns>
    58202    bool TryAddVariable(IVariable variable);
     203    /// <summary>
     204    /// Adds the specified <paramref name="variable"/> to the current instance if all constraints can
     205    /// be fulfilled.
     206    /// </summary>
     207    /// <param name="variable">The variable to add.</param>
     208    /// <param name="violatedConstraints">Output parameter; contains all constraints that could
     209    /// not be fulfillled.</param>
     210    /// <returns><c>true</c> if the variable could be added without violating constraints,
     211    /// <c>false</c> otherwise.</returns>
    59212    bool TryAddVariable(IVariable variable, out ICollection<IConstraint> violatedConstraints);
     213    /// <summary>
     214    /// Deletes the variable with the specified <paramref name="name"/>.
     215    /// </summary>
     216    /// <param name="name">The name of the variable to delete.</param>
    60217    void RemoveVariable(string name);
     218    /// <summary>
     219    /// Deletes the variable with the specified <paramref name="name"/> if all constraints can be
     220    /// fulfilled.
     221    /// </summary>
     222    /// <param name="name">The name of the variable to remove.</param>
     223    /// <returns><c>true</c> if the variable could be deleted without violating constraints,
     224    /// <c>false</c> otherwise.</returns>
    61225    bool TryRemoveVariable(string name);
     226    /// <summary>
     227    /// Deletes the variable with the specified <paramref name="name"/> if all constraints can be
     228    /// fulfilled.
     229    /// </summary>
     230    /// <param name="name">The name of the variable to remove.</param>
     231    /// <param name="violatedConstraints">Output parameter; contains all constraints that could
     232    /// not be fulfilled.</param>
     233    /// <returns><c>true</c> if the variable could be deleted without violating constraints,
     234    /// <c>false</c> otherwise.</returns>
    62235    bool TryRemoveVariable(string name, out ICollection<IConstraint> violatedConstraints);
     236   
     237    /// <inheritdoc cref="GetVariableValue(string, HeuristicLab.Core.IScope, bool)"/>
     238    /// <typeparam name="T">The type of the value that is searched.</typeparam>       
    63239    T GetVariableValue<T>(string formalName, IScope scope, bool recursiveLookup) where T : class, IItem;
     240    /// <inheritdoc cref="GetVariableValue(string, HeuristicLab.Core.IScope, bool, bool)"/>
     241    /// <typeparam name="T">The type of the value that is searched.</typeparam>
    64242    T GetVariableValue<T>(string formalName, IScope scope, bool recursiveLookup, bool throwOnError) where T : class, IItem;
     243    /// <inheritdoc cref="GetVariableValue(System.String, IScope, bool, bool)"
     244    /// select="summary"/>
     245    /// <param name="formalName">The formal name of the variable info whose variable value is searched.</param>
     246    /// <param name="scope">The scope where to look for the variable.</param>
     247    /// <param name="recursiveLookup">Boolean value, whether also the parent scopes shall be searched if
     248    /// the variable is not found in the specified <paramref name="scope"/>.</param>
     249    /// <returns>The value of the searched variable or null if it is not found.</returns>
    65250    IItem GetVariableValue(string formalName, IScope scope, bool recursiveLookup);
     251    /// <summary>
     252    /// Gets the value of the variable in the specified <paramref name="scope"/>
     253    /// whose variable(parameter) info has the specified <paramref name="formalName"/>.
     254    /// </summary>
     255    /// <param name="formalName">The formal name of the variable info whose variable value is searched.</param>
     256    /// <param name="scope">The scope where to look for the variable.</param>
     257    /// <param name="recursiveLookup">Boolean value, whether also the parent scopes shall be searched if
     258    /// the variable is not found in the specified <paramref name="scope"/>.</param>
     259    /// <param name="throwOnError">Boolean value, whether an exception shall be thrown, if the variable
     260    /// cannot be found or just <c>null</c> shall be returned.</param>
     261    /// <returns>The value of the searched variable (or null if the variable is not
     262    /// found and <paramref name="throwOnError"/> is set to false).</returns>
    66263    IItem GetVariableValue(string formalName, IScope scope, bool recursiveLookup, bool throwOnError);
    67264
     265    /// <summary>
     266    /// Executes the current instance on the specified <paramref name="scope"/>.
     267    /// </summary>
     268    /// <param name="scope">The scope where to execute the current instance.</param>
     269    /// <returns>The next operation.</returns>
    68270    IOperation Execute(IScope scope);
     271    /// <summary>
     272    /// Aborts the current operator.
     273    /// </summary>
    69274    void Abort();
    70275
     276    /// <summary>
     277    /// Occurs when the name of the operator was changed.
     278    /// </summary>
    71279    event EventHandler NameChanged;
    72     event EventHandler BreakpointChanged;
     280    /// <summary>
     281    /// Occurs when the breakpoint flag of the current instance was changed.
     282    /// </summary>
     283    event EventHandler BreakpointChanged;
     284    /// <summary>
     285    /// Occurs when a sub operator has been added.
     286    /// </summary>
    73287    event EventHandler<OperatorIndexEventArgs> SubOperatorAdded;
     288    /// <summary>
     289    /// Occurs when a sub operator has been deleted.
     290    /// </summary>
    74291    event EventHandler<OperatorIndexEventArgs> SubOperatorRemoved;
     292    /// <summary>
     293    /// Occurs when a variable info has been added.
     294    /// </summary>
    75295    event EventHandler<VariableInfoEventArgs> VariableInfoAdded;
     296    /// <summary>
     297    /// Occurs when a variable info has been deleted.
     298    /// </summary>
    76299    event EventHandler<VariableInfoEventArgs> VariableInfoRemoved;
     300    /// <summary>
     301    /// Occurs when a variable has been added.
     302    /// </summary>
    77303    event EventHandler<VariableEventArgs> VariableAdded;
     304    /// <summary>
     305    /// Occurs when a variable has been deleted.
     306    /// </summary>
    78307    event EventHandler<VariableEventArgs> VariableRemoved;
     308    /// <summary>
     309    /// Occurs when the current instance is executed.
     310    /// </summary>
    79311    event EventHandler Executed;
    80312  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IOperatorGraph.cs

    r47 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Interface to represent an operator graph.
     30  /// </summary>
    2831  public interface IOperatorGraph : IItem {
     32    /// <summary>
     33    /// Gets all operators of the current instance.
     34    /// </summary>
    2935    ICollection<IOperator> Operators { get; }
     36    /// <summary>
     37    /// Gets or sets the initial operator (the starting one) of the current instance.
     38    /// </summary>
    3039    IOperator InitialOperator { get; set; }
    3140
     41    /// <summary>
     42    /// Adds the given operator to the current instance.
     43    /// </summary>
     44    /// <param name="op">The operator to add.</param>
    3245    void AddOperator(IOperator op);
     46    /// <summary>
     47    /// Removes an operator with the specified <paramref name="guid"/> from the current instance.
     48    /// </summary>
     49    /// <param name="guid">The unique id of the operator to remove.</param>
    3350    void RemoveOperator(Guid guid);
     51    /// <summary>
     52    /// Gets the operator with the specified <paramref name="guid"/>.
     53    /// </summary>
     54    /// <param name="guid">The unique id of the operator.</param>
     55    /// <returns>The searched operator.</returns>
    3456    IOperator GetOperator(Guid guid);
     57    /// <summary>
     58    /// Clears the current instance.
     59    /// </summary>
    3560    void Clear();
    3661
     62    /// <summary>
     63    /// Occurs when a new operator has been added to the current instance.
     64    /// </summary>
    3765    event EventHandler<OperatorEventArgs> OperatorAdded;
     66    /// <summary>
     67    /// Occurs when an operator has been deleted from the current instance.
     68    /// </summary>
    3869    event EventHandler<OperatorEventArgs> OperatorRemoved;
     70    /// <summary>
     71    /// Occurs when the initial operator (the starting one) has been changed.
     72    /// </summary>
    3973    event EventHandler InitialOperatorChanged;
    4074  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IOperatorGroup.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Interface to represent a group of operators.
     30  /// </summary>
    2831  public interface IOperatorGroup : IStorable {
     32    /// <summary>
     33    /// Gets or sets the name of the current instance.
     34    /// </summary>
    2935    string Name { get; set; }
     36    /// <summary>
     37    /// Gets all sub groups of operators of the current instance.
     38    /// </summary>
    3039    ICollection<IOperatorGroup> SubGroups { get; }
     40    /// <summary>
     41    /// Gets all operators of the current operator group.
     42    /// </summary>
    3143    ICollection<IOperator> Operators { get; }
    3244
     45    /// <summary>
     46    /// Adds the specified sub group of operators to the current operator group.
     47    /// </summary>
     48    /// <param name="group">The operator group to add.</param>
    3349    void AddSubGroup(IOperatorGroup group);
     50    /// <summary>
     51    /// Deletes the specified sub group of operators from the current instance.
     52    /// </summary>
     53    /// <param name="group">The sub group to delete.</param>
    3454    void RemoveSubGroup(IOperatorGroup group);
     55    /// <summary>
     56    /// Adds the specified operator to the current instance.
     57    /// </summary>
     58    /// <param name="op">The operator to add.</param>
    3559    void AddOperator(IOperator op);
     60    /// <summary>
     61    /// Deletes the specified operator from the current instance.
     62    /// </summary>
     63    /// <param name="op">The operator to remove.</param>
    3664    void RemoveOperator(IOperator op);
    3765
     66    /// <summary>
     67    /// Occurs when the name of the operator group has been changed.
     68    /// </summary>
    3869    event EventHandler NameChanged;
    3970  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IOperatorLibrary.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Interface to represent a library of operators.
     30  /// </summary>
    2831  public interface IOperatorLibrary : IItem {
     32    /// <summary>
     33    /// Gets the operator group of the current instance.
     34    /// </summary>
    2935    IOperatorGroup Group { get; }
    3036  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IRandom.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Represents an interface for random number generators.
     30  /// </summary>
    2831  public interface IRandom : IItem {
     32    /// <summary>
     33    /// Resets the random number generator.
     34    /// </summary>
    2935    void Reset();
     36    /// <summary>
     37    /// Resets the random number generator with the given <paramref name="seed"/>.
     38    /// </summary>
     39    /// <param name="seed">The new seed.</param>
    3040    void Reset(int seed);
    3141
     42    /// <summary>
     43    /// Gets a new random number.
     44    /// </summary>
     45    /// <returns>A random integer number.</returns>
    3246    int Next();
     47    /// <summary>
     48    /// Gets a new random number between 0 and <paramref name="maxVal"/>.
     49    /// </summary>
     50    /// <param name="maxVal">The maximal value of the random number.</param>
     51    /// <returns>A random integer number smaller than or equal to <paramref name="maxVal"/>.</returns>
    3352    int Next(int maxVal);
     53    /// <summary>
     54    /// Gets a new random number between <paramref name="minVal"/> and <paramref name="maxVal"/>.
     55    /// </summary>
     56    /// <param name="maxVal">The maximal value of the random number.</param>
     57    /// <param name="minVal">The minimal value of the random number.</param>
     58    /// <returns>A random integer number. (<paramref name="minVal"/> &lt;= x &lt;= <paramref name="maxVal"/>.</returns>
    3459    int Next(int minVal, int maxVal);
     60    /// <summary>
     61    /// Gets a new double random number.
     62    /// </summary>
     63    /// <returns>A random double number.</returns>
    3564    double NextDouble();
    3665  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IScope.cs

    r63 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Interface for a hierarchical container of variables (containing variables and subscopes).
     30  /// </summary>
    2831  public interface IScope : IItem {
     32    /// <summary>
     33    /// Gets the name of the current instance.
     34    /// </summary>
    2935    string Name { get; }
    3036
     37    /// <summary>
     38    /// Gets the varibles of the current scope.
     39    /// </summary>
    3140    ICollection<IVariable> Variables { get; }
     41    /// <summary>
     42    /// Gets all aliases of the current scope.
     43    /// </summary>
    3244    IEnumerable<KeyValuePair<string, string>> Aliases { get; }
     45    /// <summary>
     46    /// Gets all subscopes in the current scope.
     47    /// </summary>
    3348    IList<IScope> SubScopes { get; }
    3449
     50    /// <summary>
     51    /// Sets the parent scope for the current instance.
     52    /// </summary>
     53    /// <param name="scope">The parent scope of the current instance.</param>
    3554    void SetParent(IScope scope);
    3655
     56    /// <summary>
     57    /// Gets a variable with the given <paramref name="name"/>.
     58    /// </summary>
     59    /// <param name="name">The name of the variable.</param>
     60    /// <returns>The variable with the specified name.</returns>
    3761    IVariable GetVariable(string name);
     62    /// <summary>
     63    /// Adds the specified variable to the curent instance.
     64    /// </summary>
     65    /// <param name="variable">The variable to add.</param>
    3866    void AddVariable(IVariable variable);
     67    /// <summary>
     68    /// Deletes a variable with the specified <paramref name="name"/> from the current instance.
     69    /// </summary>
     70    /// <param name="name">The name of the variable to delete.</param>
    3971    void RemoveVariable(string name);
     72   
     73    /// <inheritdoc cref="GetVariableValue(string, bool)"/>
     74    /// <typeparam name="T">The type of the value that is searched.</typeparam>
    4075    T GetVariableValue<T>(string name, bool recursiveLookup) where T : class, IItem;
     76    /// <inheritdoc cref="GetVariableValue(string, bool, bool)"/>
     77    /// <typeparam name="T">The type of the value that is searched.</typeparam>
    4178    T GetVariableValue<T>(string name, bool recursiveLookup, bool throwOnError) where T : class, IItem;
     79    /// <inheritdoc cref="GetVariableValue(string, bool, bool)" select="summary"/>
     80    /// <param name="name">The name of the variable.</param>
     81    /// <param name="recursiveLookup">Boolean value, whether the parent scopes shall be searched
     82    /// when the variable is not found in the current instance.</param>
     83    /// <returns>The value of the variable or <c>null</c> if it was not found.</returns>
    4284    IItem GetVariableValue(string name, bool recursiveLookup);
     85    /// <summary>
     86    /// Gets the value of the variable with the given <paramref name="name"/>.
     87    /// </summary>
     88    /// <param name="name">The name of the variable.</param>
     89    /// <param name="recursiveLookup">Boolean value, whether the parent scopes shall be searched
     90    /// when the variable is not found in the current instance.</param>
     91    /// <param name="throwOnError">Boolean value, whether an exception shall be thrown when the searched
     92    /// variable cannot be found, or only <c>null</c> shall be returned.</param>
     93    /// <returns>The value of the searched variable or <c>null</c> if <paramref name="throwOnError"/>
     94    /// is set to <c>false</c>.</returns>
    4395    IItem GetVariableValue(string name, bool recursiveLookup, bool throwOnError);
    4496
     97    /// <summary>
     98    /// Gets the actual name the given alias.
     99    /// </summary>
     100    /// <param name="name">The alias whose actual name is searched.</param>
     101    /// <returns>The actual name.</returns>
    45102    string TranslateName(string name);
     103    /// <summary>
     104    /// Adds an alias to the current instance.
     105    /// </summary>
     106    /// <param name="alias">The alias to add.</param>
     107    /// <param name="name">The actual name of the alias.</param>
    46108    void AddAlias(string alias, string name);
     109    /// <summary>
     110    /// Deletes the specified <paramref name="alias"/> from the current instance.
     111    /// </summary>
     112    /// <param name="alias">The alias to delete.</param>
    47113    void RemoveAlias(string alias);
    48114
     115    /// <summary>
     116    /// Adds the specified sub scope to the current instance.
     117    /// </summary>
     118    /// <param name="scope">The sub scope to add.</param>
    49119    void AddSubScope(IScope scope);
     120    /// <summary>
     121    /// Deletes the specified sub scope from the current instance.
     122    /// </summary>
     123    /// <param name="scope">The sub scope to delete.</param>
    50124    void RemoveSubScope(IScope scope);
     125    /// <summary>
     126    /// Reorders all sub scopes according to the specified chronology.
     127    /// </summary>
     128    /// <param name="sequence">The chronology how to order the sub scopes.</param>
    51129    void ReorderSubScopes(int[] sequence);
     130    /// <summary>
     131    /// Gets the sub scope with the given <paramref name="guid"/>.
     132    /// </summary>
     133    /// <param name="guid">The unique identifier of the sub scope.</param>
     134    /// <returns>The sub scope with the given <paramref name="guid"/>.</returns>
    52135    IScope GetScope(Guid guid);
     136    /// <summary>
     137    /// Gets the sub scope with the given <paramref name="name"/>.
     138    /// </summary>
     139    /// <param name="name">The name of the sub scope.</param>
     140    /// <returns>The sub scope with the given <paramref name="name"/>.</returns>
    53141    IScope GetScope(string name);
    54142
     143    /// <summary>
     144    /// Clears the current instance.
     145    /// </summary>
    55146    void Clear();
    56147
     148    /// <summary>
     149    /// Occurs when a variable has been added to the current instance.
     150    /// </summary>
    57151    event EventHandler<VariableEventArgs> VariableAdded;
     152    /// <summary>
     153    /// Occurs when a variable has been deleted from the current instance.
     154    /// </summary>
    58155    event EventHandler<VariableEventArgs> VariableRemoved;
     156    /// <summary>
     157    /// Occurs when an alias has been added to the current instance.
     158    /// </summary>
    59159    event EventHandler<AliasEventArgs> AliasAdded;
     160    /// <summary>
     161    /// Occurs when an alias has been removed from the current instance.
     162    /// </summary>
    60163    event EventHandler<AliasEventArgs> AliasRemoved;
     164    /// <summary>
     165    /// Occurs when a sub scope has been added to the current instance.
     166    /// </summary>
    61167    event EventHandler<ScopeIndexEventArgs> SubScopeAdded;
     168    /// <summary>
     169    /// Occurs when a sub scope has been deleted from the current instance.
     170    /// </summary>
    62171    event EventHandler<ScopeIndexEventArgs> SubScopeRemoved;
     172    /// <summary>
     173    /// Occurs when the sub scopes have been reordered.
     174    /// </summary>
    63175    event EventHandler SubScopesReordered;
    64176  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IStorable.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Interface to represent objects that are de- and serializeable.
     30  /// </summary>
    2831  public interface IStorable {
     32    /// <summary>
     33    /// Gets the objects unique identifier.
     34    /// </summary>
    2935    Guid Guid { get; }
    3036
     37    /// <summary>
     38    /// Clones the current instance (deep clone).
     39    /// </summary>
     40    /// <returns>The cloned object.</returns>
    3141    object Clone();
     42    /// <summary>
     43    /// Clones the current instance, considering already cloned objects.
     44    /// </summary>
     45    /// <param name="clonedObjects">All already cloned objects. (Needed to avoid cycles.)</param>
     46    /// <returns>The cloned object.</returns>
    3247    object Clone(IDictionary<Guid, object> clonedObjects);
    3348
     49    /// <summary>
     50    /// Saves the current instance as <see cref="XmlNode"/> in the specified
     51    /// <typeparamref name="document"/>.
     52    /// </summary>
     53    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     54    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     55    /// <param name="persistedObjects">The dictionary of all already persisted objects.
     56    /// (Needed to avoid cycles.)</param>
     57    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    3458    XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects);
     59    /// <summary>
     60    /// Loads the persisted object from the specified <paramref name="node"/>.
     61    /// </summary>
     62    /// <param name="node">The <see cref="XmlNode"/> where the object is saved.</param>
     63    /// <param name="restoredObjects">A dictionary of all already restored objects. (Needed to avoid
     64    /// cycles.)</param>
    3565    void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects);
    3666  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IVariable.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Interface to represent a variable (of an operator) having a name and a value.
     30  /// </summary>
    2831  public interface IVariable : IItem {
     32    /// <summary>
     33    /// Gets or sets the name of the variable.
     34    /// </summary>
    2935    string Name { get; set; }
     36    /// <summary>
     37    /// Gets or sets the value of the variable.
     38    /// </summary>
    3039    IItem Value { get; set; }
    3140
     41    /// <summary>
     42    /// Gets the value of the variable.
     43    /// </summary>
     44    /// <typeparam name="T">The type of the variable's value.</typeparam>
     45    /// <returns>The value of the current instance.</returns>
    3246    T GetValue<T>() where T : class, IItem;
    3347
     48    /// <summary>
     49    /// Occurs when the name of the variable is currently changing.
     50    /// </summary>
    3451    event EventHandler<NameChangingEventArgs> NameChanging;
     52    /// <summary>
     53    /// Occurs when the name of the current instance has been changed.
     54    /// </summary>
    3555    event EventHandler NameChanged;
     56    /// <summary>
     57    /// Occurs when the value of the current instance has been changed.
     58    /// </summary>
    3659    event EventHandler ValueChanged;
    3760  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IVariableInfo.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Interface to store meta-information about variables/parameters of operators.
     30  /// </summary>
    2831  public interface IVariableInfo : IItem {
     32    /// <summary>
     33    /// Gets or sets the actual name of the variable info.
     34    /// </summary>
    2935    string ActualName { get; set; }
     36    /// <summary>
     37    /// Gets or sets the formal name of the current instance.
     38    /// </summary>
    3039    string FormalName { get; }
     40    /// <summary>
     41    /// Gets the description of the current instance.
     42    /// </summary>
    3143    string Description { get; }
     44    /// <summary>
     45    /// Gets the data type of the current instance.
     46    /// </summary>
    3247    Type DataType { get; }
     48    /// <summary>
     49    /// Gets the kind of the variable info (in, out, new,...).
     50    /// </summary>
    3351    VariableKind Kind { get; }
     52    /// <summary>
     53    /// Gets or sets a boolean value whether the current instance is a local variable info.
     54    /// </summary>
    3455    bool Local { get; set; }
    3556
     57    /// <summary>
     58    /// Occurs when the actual name of the current instance has been changed.
     59    /// </summary>
    3660    event EventHandler ActualNameChanged;
     61    /// <summary>
     62    /// Occurs when the local flag has been changed.
     63    /// </summary>
    3764    event EventHandler LocalChanged;
    3865  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IView.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// An interface for all kinds visual representations of items (objects, operators...).
     30  /// </summary>
    2831  public interface IView : IControl {
     32    /// <summary>
     33    /// Gets the current item instance.
     34    /// </summary>
    2935    IItem Item { get; }
     36    /// <summary>
     37    /// Gets or sets the caption of the current instance.
     38    /// </summary>
    3039    string Caption { get; set; }
    3140
     41    /// <summary>
     42    /// Occurs when the item was changed.
     43    /// </summary>
    3244    event EventHandler ItemChanged;
     45    /// <summary>
     46    /// Occurs when the caption was changed.
     47    /// </summary>
    3348    event EventHandler CaptionChanged;
    3449  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IViewable.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Interface to represent items that can displayed visually.
     29  /// </summary>
    2730  public interface IViewable {
     31    /// <summary>
     32    /// Creates a view to display the current instance.
     33    /// </summary>
     34    /// <returns>The created view.</returns>
    2835    IView CreateView();
    2936  }
  • trunk/sources/HeuristicLab.Core/Interfaces/IVisualizationItem.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Marker interface for items that can be visualized.
     29  /// </summary>
    2730  public interface IVisualizationItem : IItem { }
    2831}
  • trunk/sources/HeuristicLab.Core/ItemBase.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Represents the base class for all basic item types.
     30  /// </summary>
    2831  public abstract class ItemBase : StorableBase, IItem {
     32    /// <summary>
     33    /// Creates a new instance of <see cref="ItemBaseView"/> for
     34    /// visual representation of the current instance.
     35    /// </summary>
     36    /// <returns>The created instance as <see cref="ItemBaseView"/>.</returns>
    2937    public virtual IView CreateView() {
    3038      return new ItemBaseView(this);
    3139    }
    3240
     41    /// <summary>
     42    /// Gets the string representation of the current instance.
     43    /// </summary>
     44    /// <returns>The type name of the current instance.</returns>
    3345    public override string ToString() {
    3446      return GetType().Name;
    3547    }
    3648
     49    /// <summary>
     50    /// Fires a new <c>Changed</c> event.
     51    /// </summary>
     52    /// <remarks>Calls <see cref="OnChanged"/>.</remarks>
    3753    public void FireChanged() {
    3854      OnChanged();
    3955    }
    4056
     57    /// <summary>
     58    /// Occurs when the current item was changed.
     59    /// </summary>
    4160    public event EventHandler Changed;
     61    /// <summary>
     62    /// Fires a new <c>Changed</c> event.
     63    /// </summary>
    4264    protected virtual void OnChanged() {
    4365      if (Changed != null)
  • trunk/sources/HeuristicLab.Core/ItemBaseView.cs

    r2 r776  
    2828using System.Windows.Forms;
    2929
    30 namespace HeuristicLab.Core {
     30namespace HeuristicLab.Core {
     31  /// <summary>
     32  /// The base class for visual representations of items.
     33  /// </summary>
    3134  public partial class ItemBaseView : ViewBase {
     35    /// <summary>
     36    /// Initializes a new instance of <see cref="ItemBaseView"/>.
     37    /// </summary>
    3238    public ItemBaseView() {
    3339      InitializeComponent();
    3440    }
     41    /// <summary>
     42    /// Intializes a new instance of <see cref="ItemBaseView"/> with the given <paramref name="item"/>.
     43    /// </summary>
     44    /// <param name="item">The item that should be displayed.</param>
    3545    public ItemBaseView(IItem item)
    3646      : this() {
  • trunk/sources/HeuristicLab.Core/ItemEventArgs.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Event arguments to be able to specify the affected item.
     29  /// </summary>
    2730  public class ItemEventArgs : EventArgs {
    2831    private IItem myItem;
     32    /// <summary>
     33    /// Gets the affected item.
     34    /// </summary>
    2935    public IItem Item {
    3036      get { return myItem; }
    3137    }
    3238
     39    /// <summary>
     40    /// Initializes a new instance of <see cref="ItemEventArgs"/> with the given <paramref name="item"/>.
     41    /// </summary>
     42    /// <param name="item">The affected item.</param>
    3343    public ItemEventArgs(IItem item) {
    3444      myItem = item;
  • trunk/sources/HeuristicLab.Core/ItemIndexEventArgs.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Event arguments to be able to specify the affected item at a specified index.
     29  /// </summary>
    2730  public class ItemIndexEventArgs : ItemEventArgs {
    2831    private int myIndex;
     32    /// <summary>
     33    /// Gets the affected index.
     34    /// </summary>
    2935    public int Index {
    3036      get { return myIndex; }
    3137    }
    3238
     39    /// <summary>
     40    /// Initializes a new instance of <see cref="ItemIndexEventArgs"/> with the given <paramref name="item"/>
     41    /// and the given <paramref name="index"/>.
     42    /// </summary>
     43    /// <remarks>Calls constructor of base class <see cref="ItemEventArgs"/>.</remarks>
     44    /// <param name="item">The affected item.</param>
     45    /// <param name="index">The affected index.</param>
    3346    public ItemIndexEventArgs(IItem item, int index)
    3447      : base(item) {
  • trunk/sources/HeuristicLab.Core/KeyValueEventArgs.cs

    r187 r776  
    44
    55namespace HeuristicLab.Core {
     6  /// <summary>
     7  /// Event arguments to be able to specify the affected key-value pair.
     8  /// </summary>
    69  public class KeyValueEventArgs : EventArgs {
    710
    811    private IItem key;
     12    /// <summary>
     13    /// Gets the affected key.
     14    /// </summary>
    915    public IItem Key {
    1016      get { return key; }
     
    1218
    1319    private IItem value;
     20    /// <summary>
     21    /// Gets the affected value.
     22    /// </summary>
    1423    public IItem Value {
    1524      get { return value; }
    1625    }
    1726
     27    /// <summary>
     28    /// Initializes a new instance of <see cref="KeyValueEventArgs"/> with the given <paramref name="key"/>
     29    /// and <paramref name="value"/>.
     30    /// </summary>
     31    /// <param name="key">The affected key.</param>
     32    /// <param name="value">The affected value.</param>
    1833    public KeyValueEventArgs(IItem key, IItem value) {
    1934      this.key = key;
  • trunk/sources/HeuristicLab.Core/NameChangingEventArgs.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Event arguments to be able to specify the affected name.
     30  /// </summary>
    2831  public class NameChangingEventArgs : CancelEventArgs {
    2932    private string myName;
     33    /// <summary>
     34    /// Gets the affected name.
     35    /// </summary>
    3036    public string Name {
    3137      get { return myName; }
    3238    }
    3339
     40    /// <summary>
     41    /// Initializes a new instance of <see cref="NameChangingEventArgs"/>
     42    /// with the specified <paramref name="name"/>.
     43    /// </summary>
     44    /// <param name="name">The affected name.</param>
    3445    public NameChangingEventArgs(string name)
    3546      : base() {
    3647      myName = name;
    3748    }
     49    /// <summary>
     50    /// Initializes a new instance of <see cref="NameChangingEventArgs"/>
     51    /// with the specified <paramref name="name"/> and a flag whether the event has been canceled.
     52    /// </summary>
     53    /// <remarks>Calls constructor of base class <see cref="CancelEventArgs"/>.</remarks>
     54    /// <param name="name">The affected name.</param>
     55    /// <param name="cancel">Flag, whether the event has been canceled.</param>
    3856    public NameChangingEventArgs(string name, bool cancel)
    3957      : base(cancel) {
  • trunk/sources/HeuristicLab.Core/OperationEventArgs.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Event arguments to be able to specify the affected operation.
     29  /// </summary>
    2730  public class OperationEventArgs : EventArgs {
    2831    private IOperation myOperation;
     32    /// <summary>
     33    /// Gets the affected operation.
     34    /// </summary>
    2935    public IOperation Operation {
    3036      get { return myOperation; }
    3137    }
    3238
     39    /// <summary>
     40    /// Initializes a new instance of <see cref="OperationEventArgs"/> with the given
     41    /// <paramref name="operation"/>.
     42    /// </summary>
     43    /// <param name="operation">The affected operation.</param>
    3344    public OperationEventArgs(IOperation operation) {
    3445      myOperation = operation;
  • trunk/sources/HeuristicLab.Core/OperatorBase.cs

    r76 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// The base class for all operators.
     30  /// </summary>
    2831  public abstract class OperatorBase : ConstrainedItemBase, IOperator {
    2932    private string myName;
     33    /// <summary>
     34    /// Gets or sets the name of the operator.
     35    /// </summary>
     36    /// <remarks>Calls <see cref="OnNameChanged"/> in the setter.</remarks>
    3037    public string Name {
    3138      get { return myName; }
     
    3744      }
    3845    }
     46    /// <summary>
     47    /// Gets the description of the current operator.
     48    /// </summary>
     49    /// <remarks>Returns "No operator description available" if the method is not overriden.</remarks>
    3950    public virtual string Description {
    4051      get { return "No operator description available."; }
    4152    }
    42 
     53    /// <summary>
     54    /// Flag whether the current instance has been canceled.
     55    /// </summary>
    4356    protected bool myCanceled;
     57    /// <inheritdoc/>
    4458    public bool Canceled {
    4559      get { return myCanceled; }
    4660    }
    4761    private bool myBreakpoint;
     62    /// <inheritdoc/>
     63    /// <remarks>Calls <see cref="OnBreakpointChanged"/> in the setter.</remarks>
    4864    public bool Breakpoint {
    4965      get { return myBreakpoint; }
     
    5773
    5874    private List<IOperator> mySubOperators;
     75    /// <summary>
     76    /// Gets a list of all suboperators.
     77    /// <note type="caution"> Returns the suboperators read-only!</note>
     78    /// </summary>
    5979    public virtual IList<IOperator> SubOperators {
    6080      get { return mySubOperators.AsReadOnly(); }
    6181    }
    6282    private Dictionary<string, IVariableInfo> myVariableInfos;
     83    /// <inheritdoc/>
    6384    public virtual ICollection<IVariableInfo> VariableInfos {
    6485      get { return myVariableInfos.Values; }
    6586    }
    6687    private Dictionary<string, IVariable> myVariables;
     88    /// <inheritdoc/>
    6789    public virtual ICollection<IVariable> Variables {
    6890      get { return myVariables.Values; }
    6991    }
    7092
     93    /// <summary>
     94    /// Initializes a new instance of <see cref="OperatorBase"/> setting the breakpoint flag and
     95    /// the canceled flag to <c>false</c> and the name of the operator to the type name.
     96    /// </summary>
    7197    protected OperatorBase() {
    7298      myName = this.GetType().Name;
     
    78104    }
    79105
     106    /// <summary>
     107    /// Clones the current instance (deep clone).
     108    /// </summary>
     109    /// <remarks>Clones also sub operators, variables and variable infos.</remarks>
     110    /// <param name="clonedObjects">Dictionary of all already cloned objects. (Needed to avoid cycles.)</param>
     111    /// <returns>The cloned object as <see cref="OperatorBase"/>.</returns>
    80112    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    81113      OperatorBase clone = (OperatorBase)base.Clone(clonedObjects);
     
    93125    }
    94126
     127    /// <summary>
     128    /// Creates a new instance of <see cref="OperatorBaseView"/> to represent the current operator
     129    /// visually.
     130    /// </summary>
     131    /// <returns>The created view as <see cref="OperatorBaseView"/>.</returns>
    95132    public override IView CreateView() {
    96133      return new OperatorBaseView(this);
     
    98135
    99136    #region SubOperator Methods
     137    /// <inheritdoc cref="HeuristicLab.Core.IOperator.AddSubOperator(HeuristicLab.Core.IOperator)"/>
     138    /// <param name="subOperator">The sub operator to add.</param>
     139    /// <remarks>Calls <see cref="OnSubOperatorAdded"/>.</remarks>
    100140    public virtual void AddSubOperator(IOperator subOperator) {
    101141      mySubOperators.Add(subOperator);
    102142      OnSubOperatorAdded(subOperator, mySubOperators.Count - 1);
    103143    }
     144    /// <inheritdoc cref="IOperator.TryAddSubOperator(HeuristicLab.Core.IOperator)"/>
     145    /// <param name="subOperator">The sub operator to add.</param>
     146    /// <remarks>Calls <see cref="OnSubOperatorAdded"/>.</remarks>
    104147    public virtual bool TryAddSubOperator(IOperator subOperator) {
    105148      mySubOperators.Add(subOperator);
     
    112155      }
    113156    }
     157    /// <inheritdoc cref="HeuristicLab.Core.IOperator.TryAddSubOperator(HeuristicLab.Core.IOperator,
     158    /// out System.Collections.Generic.ICollection&lt;HeuristicLab.Core.IConstraint&gt;)"/>
     159    /// <param name="subOperator">The sub operator to add.</param>
     160    /// <remarks>Calls <see cref="OnSubOperatorAdded"/>.</remarks>
    114161    public virtual bool TryAddSubOperator(IOperator subOperator, out ICollection<IConstraint> violatedConstraints) {
    115162      mySubOperators.Add(subOperator);
     
    122169      }
    123170    }
     171    /// <inheritdoc cref="HeuristicLab.Core.IOperator.AddSubOperator(HeuristicLab.Core.IOperator, int)"/>
     172    /// <param name="subOperator">The sub operator to add.</param>
     173    /// <remarks>Calls <see cref="OnSubOperatorAdded"/>.</remarks>
    124174    public virtual void AddSubOperator(IOperator subOperator, int index) {
    125175      mySubOperators.Insert(index, subOperator);
    126176      OnSubOperatorAdded(subOperator, index);
    127177    }
     178    /// <inheritdoc cref="IOperator.TryAddSubOperator(HeuristicLab.Core.IOperator, int)"/>
     179    /// <param name="subOperator">The sub operator to add.</param>
     180    /// <remarks>Calls <see cref="OnSubOperatorAdded"/>.</remarks>
    128181    public virtual bool TryAddSubOperator(IOperator subOperator, int index) {
    129182      mySubOperators.Insert(index, subOperator);
     
    136189      }
    137190    }
     191    /// <inheritdoc cref="IOperator.TryAddSubOperator(HeuristicLab.Core.IOperator, int, out
     192    /// System.Collections.Generic.ICollection&lt;HeuristicLab.Core.IConstraint&gt;)"/>
     193    /// <param name="subOperator">The sub operator to add.</param>
     194    /// <remarks>Calls <see cref="OnSubOperatorAdded"/>.</remarks>
    138195    public virtual bool TryAddSubOperator(IOperator subOperator, int index, out ICollection<IConstraint> violatedConstraints) {
    139196      mySubOperators.Insert(index, subOperator);
     
    146203      }
    147204    }
     205    /// <inheritdoc/>
     206    /// <remarks>Calls <see cref="OnSubOperatorRemoved"/>.</remarks>
    148207    public virtual void RemoveSubOperator(int index) {
    149208      IOperator op = mySubOperators[index];
     
    151210      OnSubOperatorRemoved(op, index);
    152211    }
     212    /// <inheritdoc/>
     213    /// <remarks>Calls <see cref="OnSubOperatorRemoved"/>.</remarks>
    153214    public virtual bool TryRemoveSubOperator(int index) {
    154215      IOperator op = mySubOperators[index];
     
    162223      }
    163224    }
     225    /// <inheritdoc/>
     226    /// <remarks>Calls <see cref="OnSubOperatorRemoved"/>.</remarks>
    164227    public virtual bool TryRemoveSubOperator(int index, out ICollection<IConstraint> violatedConstraints) {
    165228      IOperator op = mySubOperators[index];
     
    176239
    177240    #region VariableInfo Methods
     241    /// <inheritdoc/>
    178242    public virtual IVariableInfo GetVariableInfo(string formalName) {
    179243      IVariableInfo info;
     
    183247        return null;
    184248    }
     249    /// <inheritdoc/>
     250    /// <remarks>Calls <see cref="OnVariableInfoAdded"/>.</remarks>
    185251    public virtual void AddVariableInfo(IVariableInfo variableInfo) {
    186252      myVariableInfos.Add(variableInfo.FormalName, variableInfo);
    187253      OnVariableInfoAdded(variableInfo);
    188254    }
     255    /// <inheritdoc/>
     256    /// <remarks>Calls <see cref="OnVariableInfoAdded"/>.</remarks>
    189257    public virtual bool TryAddVariableInfo(IVariableInfo variableInfo) {
    190258      myVariableInfos.Add(variableInfo.FormalName, variableInfo);
     
    197265      }
    198266    }
     267    /// <inheritdoc/>
     268    /// <remarks>Calls <see cref="OnVariableInfoAdded"/>.</remarks>
    199269    public virtual bool TryAddVariableInfo(IVariableInfo variableInfo, out ICollection<IConstraint> violatedConstraints) {
    200270      myVariableInfos.Add(variableInfo.FormalName, variableInfo);
     
    207277      }
    208278    }
     279    /// <inheritdoc/>
     280    /// <remarks>Calls <see cref="OnVariableInfoRemoved"/>.</remarks>
    209281    public virtual void RemoveVariableInfo(string formalName) {
    210282      IVariableInfo variableInfo;
     
    214286      }
    215287    }
     288    /// <inheritdoc/>
     289    /// <remarks>Calls <see cref="OnVariableInfoRemoved"/>.</remarks>
    216290    public virtual bool TryRemoveVariableInfo(string formalName) {
    217291      IVariableInfo variableInfo;
     
    228302      return true;
    229303    }
     304    /// <inheritdoc/>
     305    /// <remarks>Calls <see cref="OnVariableInfoRemoved"/>.</remarks>
    230306    public virtual bool TryRemoveVariableInfo(string formalName, out ICollection<IConstraint> violatedConstraints) {
    231307      IVariableInfo variableInfo;
     
    246322
    247323    #region Variable Methods
     324    /// <inheritdoc/>
    248325    public virtual IVariable GetVariable(string name) {
    249326      IVariable variable;
     
    253330        return null;
    254331    }
     332    /// <inheritdoc/>
     333    /// <remarks>Calls <see cref="OnVariableAdded"/> and adds <c>NameChanging</c> and <c>NameChanged</c>
     334    /// event handlers.</remarks>
    255335    public virtual void AddVariable(IVariable variable) {
    256336      myVariables.Add(variable.Name, variable);
     
    259339      OnVariableAdded(variable);
    260340    }
     341    /// <inheritdoc/>
     342    /// <remarks>Calls <see cref="OnVariableAdded"/> and adds <c>NameChanging</c> and <c>NameChanged</c>
     343    /// event handlers.</remarks>
    261344    public virtual bool TryAddVariable(IVariable variable) {
    262345      myVariables.Add(variable.Name, variable);
     
    271354      }
    272355    }
     356    /// <inheritdoc/>
     357    /// <remarks>Calls <see cref="OnVariableAdded"/> and adds <c>NameChanging</c> and <c>NameChanged</c>
     358    /// event handlers.</remarks>
    273359    public virtual bool TryAddVariable(IVariable variable, out ICollection<IConstraint> violatedConstraints) {
    274360      myVariables.Add(variable.Name, variable);
     
    283369      }
    284370    }
     371    /// <inheritdoc/>
     372    /// <remarks>Calls <see cref="OnVariableRemoved"/> and removes <c>NameChanging</c> and <c>NameChanged</c>
     373    /// event handlers.</remarks>
    285374    public virtual void RemoveVariable(string name) {
    286375      IVariable variable;
     
    292381      }
    293382    }
     383    /// <inheritdoc/>
     384    /// <remarks>Calls <see cref="OnVariableRemoved"/> and removes <c>NameChanging</c> and <c>NameChanged</c>
     385    /// event handlers.</remarks>
    294386    public virtual bool TryRemoveVariable(string name) {
    295387      IVariable variable;
     
    308400      return true;
    309401    }
     402    /// <inheritdoc/>
     403    /// <remarks>Calls <see cref="OnVariableRemoved"/> and removes <c>NameChanging</c> and <c>NameChanged</c>
     404    /// event handlers.</remarks>
    310405    public virtual bool TryRemoveVariable(string name, out ICollection<IConstraint> violatedConstraints) {
    311406      IVariable variable;
     
    338433      myVariables.Add(variable.Name, variable);
    339434    }
     435    /// <inheritdoc cref="IOperator.GetVariableValue&lt;T&gt;(string, HeuristicLab.Core.IScope, bool)"/>
     436    ///  <remarks>Calls <see cref="GetVariableValue&lt;T&gt;(string, HeuristicLab.Core.IScope, bool, bool)"/>
     437    /// with <c>throwOnError</c> set to <c>false</c>.</remarks>
    340438    public T GetVariableValue<T>(string formalName, IScope scope, bool recursiveLookup) where T : class, IItem {
    341439      return GetVariableValue<T>(formalName, scope, recursiveLookup, true);
    342440    }
     441    /// <inheritdoc cref="IOperator.GetVariableValue&lt;T&gt;(string, HeuristicLab.Core.IScope, bool, bool)"/>
     442    /// <remarks>Calls
     443    /// <see cref="GetVariableValue(string, HeuristicLab.Core.IScope, bool, bool)"/>.</remarks>
    343444    public T GetVariableValue<T>(string formalName, IScope scope, bool recursiveLookup, bool throwOnError) where T : class, IItem {
    344445      return (T)GetVariableValue(formalName, scope, recursiveLookup, throwOnError);
    345446    }
     447    /// <inheritdoc cref="IOperator.GetVariableValue(string, HeuristicLab.Core.IScope, bool)"/>
     448    /// <remarks>Calls <see cref="GetVariableValue(string, HeuristicLab.Core.IScope, bool, bool)"/>
     449    /// with <c>throwOnError</c> set to <c>false</c>.</remarks>
    346450    public IItem GetVariableValue(string formalName, IScope scope, bool recursiveLookup) {
    347451      return GetVariableValue(formalName, scope, recursiveLookup, true);
    348452    }
     453    /// <inheritdoc cref="IOperator.GetVariableValue(string, HeuristicLab.Core.IScope, bool, bool)"/>
    349454    public virtual IItem GetVariableValue(string formalName, IScope scope, bool recursiveLookup, bool throwOnError) {
    350455      IVariableInfo info = GetVariableInfo(formalName);
     
    364469    }
    365470    #endregion
    366 
     471    /// <inheritdoc/>
    367472    public virtual IOperation Execute(IScope scope) {
    368473      myCanceled = false;
     
    379484      return next;
    380485    }
     486    /// <inheritdoc/>
     487    /// <remarks>Sets property <see cref="Canceled"/> to <c>true</c>.</remarks>
    381488    public virtual void Abort() {
    382489      myCanceled = true;
    383490    }
    384 
     491    /// <summary>
     492    /// Performs the current operator on the specified <paramref name="scope"/>.
     493    /// </summary>
     494    /// <param name="scope">The scope where to execute the operator</param>
     495    /// <returns><c>null</c>.</returns>
    385496    public virtual IOperation Apply(IScope scope) {
    386497      return null;
    387498    }
    388 
     499    /// <inheritdoc/>
    389500    public event EventHandler NameChanged;
     501    /// <summary>
     502    /// Fires a new <c>NameChanged</c> event.
     503    /// </summary>
    390504    protected virtual void OnNameChanged() {
    391505      if (NameChanged != null) {
     
    393507      }
    394508    }
     509    /// <inheritdoc/>
    395510    public event EventHandler BreakpointChanged;
     511    /// <summary>
     512    /// Fires a new <c>BreakpointChanged</c> event.
     513    /// </summary>
    396514    protected virtual void OnBreakpointChanged() {
    397515      if (BreakpointChanged != null) {
     
    399517      }
    400518    }
     519    /// <inheritdoc/>
    401520    public event EventHandler<OperatorIndexEventArgs> SubOperatorAdded;
     521    /// <summary>
     522    /// Fires a new <c>SubOperatorAdded</c> event.
     523    /// </summary>
     524    /// <param name="subOperator">The sub operator that has been added.</param>
     525    /// <param name="index">The position where the operator has been added.</param>
    402526    protected virtual void OnSubOperatorAdded(IOperator subOperator, int index) {
    403527      if (SubOperatorAdded != null)
    404528        SubOperatorAdded(this, new OperatorIndexEventArgs(subOperator, index));
    405529    }
     530    /// <inheritdoc/>
    406531    public event EventHandler<OperatorIndexEventArgs> SubOperatorRemoved;
     532    /// <summary>
     533    /// Fires a new <c>SubOperatorRemoved</c> event.
     534    /// </summary>
     535    /// <param name="subOperator">The sub operator that has been removed.</param>
     536    /// <param name="index">The position where the operator has been removed.</param>
    407537    protected virtual void OnSubOperatorRemoved(IOperator subOperator, int index) {
    408538      if (SubOperatorRemoved != null)
    409539        SubOperatorRemoved(this, new OperatorIndexEventArgs(subOperator, index));
    410540    }
     541    /// <inheritdoc/>
    411542    public event EventHandler<VariableInfoEventArgs> VariableInfoAdded;
     543    /// <summary>
     544    /// Fires a new <c>VariableInfoAdded</c> event.
     545    /// </summary>
     546    /// <param name="variableInfo">The variable info that has been added.</param>
    412547    protected virtual void OnVariableInfoAdded(IVariableInfo variableInfo) {
    413548      if (VariableInfoAdded != null)
    414549        VariableInfoAdded(this, new VariableInfoEventArgs(variableInfo));
    415550    }
     551    /// <inheritdoc/>
    416552    public event EventHandler<VariableInfoEventArgs> VariableInfoRemoved;
     553    /// <summary>
     554    /// Fires a new <c>VariableInfoRemoved</c> event.
     555    /// </summary>
     556    /// <param name="variableInfo">The variable info that has been removed.</param>
    417557    protected virtual void OnVariableInfoRemoved(IVariableInfo variableInfo) {
    418558      if (VariableInfoRemoved != null)
    419559        VariableInfoRemoved(this, new VariableInfoEventArgs(variableInfo));
    420560    }
     561    /// <inheritdoc/>
    421562    public event EventHandler<VariableEventArgs> VariableAdded;
     563    /// <summary>
     564    /// Fires a new <c>VariableAdded</c> event.
     565    /// </summary>
     566    /// <param name="variable">The variable that has been added.</param>
    422567    protected virtual void OnVariableAdded(IVariable variable) {
    423568      if (VariableAdded != null)
    424569        VariableAdded(this, new VariableEventArgs(variable));
    425570    }
     571    /// <inheritdoc/>
    426572    public event EventHandler<VariableEventArgs> VariableRemoved;
     573    /// <summary>
     574    /// Fires a new <c>VariableRemoved</c> event.
     575    /// </summary>
     576    /// <param name="variable">The variable that has been removed</param>
    427577    protected virtual void OnVariableRemoved(IVariable variable) {
    428578      if (VariableRemoved != null)
    429579        VariableRemoved(this, new VariableEventArgs(variable));
    430580    }
     581    /// <inheritdoc/>
    431582    public event EventHandler Executed;
     583    /// <summary>
     584    /// Fires a new <c>Executed</c> event.
     585    /// </summary>
    432586    protected virtual void OnExecuted() {
    433587      if (Executed != null) {
     
    437591
    438592    #region Persistence Methods
     593    /// <summary>
     594    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     595    /// </summary>
     596    /// <remarks>
     597    /// Calls <see cref="ConstrainedItemBase.GetXmlNode"/> of base class <see cref="ConstrainedItemBase"/>.
     598    /// <br/>A quick overview how the single elements of the current instance are saved:
     599    /// <list type="bullet">
     600    /// <item>
     601    /// <term>Name: </term>
     602    /// <description>Saved as an <see cref="XmlAttribute"/> with the name <c>Name</c>.</description>
     603    /// </item>
     604    /// <item>
     605    /// <term>Breakpoint: </term>
     606    /// <description>Is only saved if it set to <c>true</c>.
     607    /// Saved as an <see cref="XmlAttribute"/> with the name <c>Breakpoint</c>.</description>
     608    /// </item>
     609    /// <item>
     610    /// <term>Sub operators: </term>
     611    /// <description>Saved as child node with tag name <c>SubOperators</c>. All sub operators are themselves
     612    /// saved as child nodes.</description>
     613    /// </item>
     614    /// <item>
     615    /// <term>Variable infos: </term>
     616    /// <description>Saved as child node with tag name <c>VariableInfos</c>. All variable infos are themselves
     617    /// saved as child nodes.</description>
     618    /// </item>
     619    /// <item>
     620    /// <term>Variables: </term>
     621    /// <description>Saved as child node with tag name <c>Variables</c>. All variables are themselves
     622    /// saved as child nodes.</description>
     623    /// </item>
     624    /// </list>
     625    /// </remarks>
     626    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     627    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     628    /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     629    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    439630    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    440631      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    461652      return node;
    462653    }
     654    /// <summary>
     655    /// Loads the persisted operation from the specified <paramref name="node"/>.
     656    /// </summary>
     657    /// <remarks>Calls <see cref="ConstrainedItemBase.Populate"/> of base class
     658    /// <see cref="ConstrainedItemBase"/>.
     659    /// For informations how the different elements must be saved please see <see cref="GetXmlNode"/>.</remarks>
     660    /// <param name="node">The <see cref="XmlNode"/> where the operation is saved.</param>
     661    /// <param name="restoredObjects">A dictionary of all already restored objects. (Needed to avoid cycles.)</param>
    463662    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    464663      base.Populate(node, restoredObjects);
  • trunk/sources/HeuristicLab.Core/OperatorBaseDescriptionView.cs

    r2 r776  
    2929
    3030namespace HeuristicLab.Core {
     31  /// <summary>
     32  /// The visual representation of the description of operators.
     33  /// </summary>
    3134  public partial class OperatorBaseDescriptionView : ViewBase {
     35    /// <summary>
     36    /// Gets or sets the operator whose description should be displayed.
     37    /// </summary>
     38    /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>.</remarks>
    3239    public IOperator Operator {
    3340      get { return (IOperator)Item; }
    3441      set { base.Item = value; }
    3542    }
    36 
     43    /// <summary>
     44    /// Initializes a new instance of <see cref="OperatorBaseDescriptionView"/> with caption "Operator".
     45    /// </summary>
    3746    public OperatorBaseDescriptionView() {
    3847      InitializeComponent();
    3948      Caption = "Operator";
    4049    }
     50    /// <summary>
     51    /// Initializes a new instance of <see cref="OperatorBaseDescriptionView"/>
     52    /// with the operator <paramref name="op"/>.
     53    /// </summary>
     54    /// <remarks>Calls <see cref="OperatorBaseDescriptionView()"/>.</remarks>
     55    /// <param name="op">The operator whose description to display.</param>
    4156    public OperatorBaseDescriptionView(IOperator op)
    4257      : this() {
     
    4459    }
    4560
     61    /// <summary>
     62    /// Updates all controls with the latest data of the model.
     63    /// </summary>
     64    /// <remarks>Calls <see cref="ViewBase.UpdateControls"/> of base class <see cref="ViewBase"/>.</remarks>
    4665    protected override void UpdateControls() {
    4766      base.UpdateControls();
  • trunk/sources/HeuristicLab.Core/OperatorBaseVariableInfosView.cs

    r2 r776  
    2929
    3030namespace HeuristicLab.Core {
     31  /// <summary>
     32  /// The visual representation of the information of the variables of an operator.
     33  /// </summary>
    3134  public partial class OperatorBaseVariableInfosView : ViewBase {
     35    /// <summary>
     36    /// Gets or sets the operator whose variable infos should be represented visually.
     37    /// </summary>
     38    /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>.
     39    /// No own data storage present.</remarks>
    3240    public IOperator Operator {
    3341      get { return (IOperator)Item; }
    3442      set { base.Item = value; }
    3543    }
     44    /// <summary>
     45    /// Gets all selected variable infos.
     46    /// <note type="caution"> Variable infos are returned read-only!</note>
     47    /// </summary>
    3648    public ICollection<IVariableInfo> SelectedVariableInfos {
    3749      get {
     
    4355    }
    4456
     57    /// <summary>
     58    /// Initializes a new instance of <see cref="OperatorBaseVariableInfosView"/> with caption "Operator".
     59    /// </summary>
    4560    public OperatorBaseVariableInfosView() {
    4661      InitializeComponent();
     
    4863      Caption = "Operator";
    4964    }
     65    /// <summary>
     66    /// Initializes a new instance of <see cref="OperatorBaseVariableInfosView"/> with the given operator
     67    /// <paramref name="op"/>.
     68    /// </summary>
     69    /// <remarks>Calls <see cref="OperatorBaseVariableInfosView()"/>.</remarks>
     70    /// <param name="op">The operator whose variable infos should be displayed.</param>
    5071    public OperatorBaseVariableInfosView(IOperator op)
    5172      : this() {
     
    5374    }
    5475
     76    /// <summary>
     77    /// Removes the eventhandlers from the underlying <see cref="IOperator"/>.
     78    /// </summary>
     79    /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    5580    protected override void RemoveItemEvents() {
    5681      Operator.VariableInfoAdded -= new EventHandler<VariableInfoEventArgs>(OperatorBase_VariableInfoAdded);
     
    5883      base.RemoveItemEvents();
    5984    }
     85    /// <summary>
     86    /// Adds eventhandlers to the underlying <see cref="IOperator"/>.
     87    /// </summary>
     88    /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    6089    protected override void AddItemEvents() {
    6190      base.AddItemEvents();
     
    6493    }
    6594
     95    /// <summary>
     96    /// Updates all controls with the latest data of the model.
     97    /// </summary>
     98    /// <remarks>Calls <see cref="ViewBase.UpdateControls"/> of base class <see cref="ViewBase"/>.</remarks>
    6699    protected override void UpdateControls() {
    67100      base.UpdateControls();
     
    105138    }
    106139
     140    /// <summary>
     141    /// Occurs when the variables were changed, whose infos should be displayed.
     142    /// </summary>
    107143    public event EventHandler SelectedVariableInfosChanged;
     144    /// <summary>
     145    /// Fires a new <c>SelectedVariableInfosChanged</c>.
     146    /// </summary>
    108147    protected virtual void OnSelectedVariableInfosChanged() {
    109148      if (SelectedVariableInfosChanged != null)
  • trunk/sources/HeuristicLab.Core/OperatorBaseVariablesView.cs

    r2 r776  
    2929
    3030namespace HeuristicLab.Core {
     31  /// <summary>
     32  /// The visual representation of the variables of an operator.
     33  /// </summary>
    3134  public partial class OperatorBaseVariablesView : ViewBase {
    3235    private ChooseItemDialog chooseItemDialog;
    3336
     37    /// <summary>
     38    /// Gets or sets the operator whose variables to represent.
     39    /// </summary>
     40    /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>.
     41    /// No own data storage present.</remarks>
    3442    public IOperator Operator {
    3543      get { return (IOperator)Item; }
     
    3745    }
    3846
     47    /// <summary>
     48    /// Initializes a new instance of <see cref="OperatorBaseVariablesView"/> with caption "Operator".
     49    /// </summary>
    3950    public OperatorBaseVariablesView() {
    4051      InitializeComponent();
     
    4253      Caption = "Operator";
    4354    }
     55    /// <summary>
     56    /// Initializes a new instance of <see cref="OperatorBaseVariablesView"/> with the given
     57    /// operator <paramref name="op"/>.
     58    /// </summary>
     59    /// <remarks>Calls <see cref="OperatorBaseVariablesView"/>.</remarks>
     60    /// <param name="op">The operator whose variables should be represented visually.</param>
    4461    public OperatorBaseVariablesView(IOperator op)
    4562      : this() {
     
    4764    }
    4865
     66    /// <summary>
     67    /// Removes the eventhandlers from the unterlying <see cref="IOperator"/>.
     68    /// </summary>
     69    /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    4970    protected override void RemoveItemEvents() {
    5071      Operator.VariableAdded -= new EventHandler<VariableEventArgs>(OperatorBase_VariableAdded);
     
    5273      base.RemoveItemEvents();
    5374    }
     75    /// <summary>
     76    /// Adds eventhandlers to the underlying <see cref="IOperator"/>.
     77    /// </summary>
     78    /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    5479    protected override void AddItemEvents() {
    5580      base.AddItemEvents();
     
    5883    }
    5984
     85    /// <summary>
     86    /// Updates all controls with the latest data of the model.
     87    /// </summary>
     88    /// <remarks>Calls <see cref="ViewBase.UpdateControls"/> of base class <see cref="ViewBase"/>.</remarks>
    6089    protected override void UpdateControls() {
    6190      base.UpdateControls();
  • trunk/sources/HeuristicLab.Core/OperatorBaseView.cs

    r2 r776  
    2929
    3030namespace HeuristicLab.Core {
     31  /// <summary>
     32  /// The base class for visual representation of operators (contains description view, variable view,
     33  /// variable info view,...).
     34  /// </summary>
    3135  public partial class OperatorBaseView : ViewBase {
     36    /// <summary>
     37    /// Gets or sets the operator to represent visually.
     38    /// </summary>
     39    /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>.
     40    /// No own data storage present.</remarks>
    3241    public IOperator Operator {
    3342      get { return (IOperator)Item; }
     
    3544    }
    3645
     46    /// <summary>
     47    /// Initializes a new instance of <see cref="OperatorBaseView"/> with caption "Operator".
     48    /// </summary>
    3749    public OperatorBaseView() {
    3850      InitializeComponent();
    3951      Caption = "Operator";
    4052    }
     53    /// <summary>
     54    /// Initializes a new instance of <see cref="OperatorBaseView"/>
     55    /// with the given operator <paramref name="op"/>.
     56    /// </summary>
     57    /// <remarks>Calls <see cref="OperatorBaseView()"/>.</remarks>
     58    /// <param name="op">The operator to represent visually.</param>
    4159    public OperatorBaseView(IOperator op)
    4260      : this() {
     
    4462    }
    4563
     64    /// <summary>
     65    /// Removes event handlers in all children.
     66    /// </summary>
    4667    protected override void RemoveItemEvents() {
    4768      operatorBaseVariableInfosView.Operator = null;
     
    5172      base.RemoveItemEvents();
    5273    }
     74    /// <summary>
     75    /// Adds event handlers in all children.
     76    /// </summary>
    5377    protected override void AddItemEvents() {
    5478      base.AddItemEvents();
     
    5983    }
    6084
     85    /// <summary>
     86    /// Updates all controls with the latest data of the model.
     87    /// </summary>
     88    /// <remarks>Calls <see cref="ViewBase.UpdateControls"/> of base class <see cref="ViewBase"/>.</remarks>
    6189    protected override void UpdateControls() {
    6290      base.UpdateControls();
  • trunk/sources/HeuristicLab.Core/OperatorEventArgs.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Event arguments to be able to specify the affected operator.
     29  /// </summary>
    2730  public class OperatorEventArgs : ItemEventArgs {
     31    /// <summary>
     32    /// Gets the affected operator.
     33    /// </summary>
     34    /// <remarks>Uses property <see cref="ItemEventArgs.Item"/> of base class <see cref="ItemEventArgs"/>.
     35    /// No own data storage present.</remarks>
    2836    public IOperator Operator {
    2937      get { return (IOperator)Item; }
    3038    }
    3139
     40    /// <summary>
     41    /// Initializes a new instance of <see cref="OperatorEventArgs"/> with the specified operator.
     42    /// </summary>
     43    /// <remarks>Calls constructor of base class <see cref="ItemEventArgs"/>.</remarks>
     44    /// <param name="op">The affected operator.</param>
    3245    public OperatorEventArgs(IOperator op)
    3346      : base(op) {
  • trunk/sources/HeuristicLab.Core/OperatorGraph.cs

    r47 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Represents a graph of operators.
     30  /// </summary>
    2831  public class OperatorGraph : ItemBase, IOperatorGraph {
    2932    private IDictionary<Guid, IOperator> myOperators;
     33    /// <summary>
     34    /// Gets all operators of the current instance.
     35    /// </summary>
    3036    public ICollection<IOperator> Operators {
    3137      get { return myOperators.Values; }
    3238    }
    3339    private IOperator myInitialOperator;
     40    /// <summary>
     41    /// Gets or sets the initial operator (the starting one).
     42    /// </summary>
     43    /// <remarks>Calls <see cref="OnInitialOperatorChanged"/> in the setter.</remarks>
    3444    public IOperator InitialOperator {
    3545      get { return myInitialOperator; }
     
    4252    }
    4353
     54    /// <summary>
     55    /// Initializes a new instance of <see cref="OperatorGraph"/>.
     56    /// </summary>
    4457    public OperatorGraph() {
    4558      myOperators = new Dictionary<Guid, IOperator>();
    4659    }
    4760
     61    /// <summary>
     62    /// Creates a new instance of <see cref="OperatorGraphView"/> to represent the current instance
     63    /// visually.
     64    /// </summary>
     65    /// <returns>The created view as <see cref="OperatorGraphView"/>.</returns>
    4866    public override IView CreateView() {
    4967      return new OperatorGraphView(this);
    5068    }
    5169
     70    /// <summary>
     71    /// Clones the current instance (deep clone).
     72    /// </summary>
     73    /// <remarks>Deep clone through <see cref="Auxiliary.Clone"/> method of helper class
     74    /// <see cref="Auxiliary"/>.</remarks>
     75    /// <param name="clonedObjects">Dictionary of all already cloned objects. (Needed to avoid cycles.)</param>
     76    /// <returns>The cloned object as <see cref="OperatorGraph"/>.</returns>
    5277    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    5378      OperatorGraph clone = new OperatorGraph();
     
    6085    }
    6186
     87    /// <inheritdoc/>
     88    /// <remarks>Calls <see cref="OnOperatorAdded"/>.</remarks>
    6289    public void AddOperator(IOperator op) {
    6390      if (!myOperators.ContainsKey(op.Guid)) {
     
    6996      }
    7097    }
     98    /// <inheritdoc/>
     99    /// <remarks>Calls <see cref="OnOperatorRemoved"/>.</remarks>
    71100    public void RemoveOperator(Guid guid) {
    72101      IOperator op = GetOperator(guid);
     
    87116      }
    88117    }
     118    /// <inheritdoc/>
    89119    public IOperator GetOperator(Guid guid) {
    90120      IOperator op;
     
    94124        return null;
    95125    }
     126    /// <inheritdoc/>
    96127    public void Clear() {
    97128      Guid[] guids = new Guid[Operators.Count];
     
    105136    }
    106137
     138    /// <inheritdoc/>
    107139    public event EventHandler<OperatorEventArgs> OperatorAdded;
     140    /// <summary>
     141    /// Fires a new <c>OperatorAdded</c> event.
     142    /// </summary>
     143    /// <param name="op">The operator that has been added.</param>
    108144    protected virtual void OnOperatorAdded(IOperator op) {
    109145      if (OperatorAdded != null)
    110146        OperatorAdded(this, new OperatorEventArgs(op));
    111147    }
     148    /// <inheritdoc/>
    112149    public event EventHandler<OperatorEventArgs> OperatorRemoved;
     150    /// <summary>
     151    /// Fires a new <c>OperatorRemoved</c> event.
     152    /// </summary>
     153    /// <param name="op">The operator that has been removed.</param>
    113154    protected virtual void OnOperatorRemoved(IOperator op) {
    114155      if (OperatorRemoved != null)
    115156        OperatorRemoved(this, new OperatorEventArgs(op));
    116157    }
     158    /// <inheritdoc/>
    117159    public event EventHandler InitialOperatorChanged;
     160    /// <summary>
     161    /// Fires a new <c>InitialOperatorChanged</c> event.
     162    /// </summary>
    118163    protected virtual void OnInitialOperatorChanged() {
    119164      if (InitialOperatorChanged != null)
     
    122167
    123168    #region Persistence Methods
     169    /// <summary>
     170    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     171    /// </summary>
     172    /// <remarks>Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>.<br/>
     173    /// To save the operators of the current instance a child node is created with the tag name
     174    /// <c>Operators</c>. Beyond this child node all operators are saved as child nodes themselves.<br/>
     175    /// The initial operator is saved as child node with the tag name <c>InitialOperator</c>.</remarks>
     176    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     177    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     178    /// <param name="persistedObjects">The dictionary of all already persisted objects.
     179    /// (Needed to avoid cycles.)</param>
     180    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    124181    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    125182      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    132189      return node;
    133190    }
     191    /// <summary>
     192    /// Loads the persisted operator graph from the specified <paramref name="node"/>.
     193    /// </summary>
     194    /// <remarks>See <see cref="GetXmlNode"/> to get more information about how the graph must be saved. <br/>
     195    /// Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.</remarks>
     196    /// <param name="node">The <see cref="XmlNode"/> where the operator graph is saved.</param>
     197    /// <param name="restoredObjects">The dictionary of all already restored objects.
     198    /// (Needed to avoid cycles.)</param>
    134199    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    135200      base.Populate(node, restoredObjects);
  • trunk/sources/HeuristicLab.Core/OperatorGraphView.cs

    r2 r776  
    3030
    3131namespace HeuristicLab.Core {
     32  /// <summary>
     33  /// The visual representation of an <see cref="IOperatorGraph"/>.
     34  /// </summary>
    3235  public partial class OperatorGraphView : ViewBase {
    3336    private ChooseOperatorDialog chooseOperatorDialog;
    3437    private Dictionary<IOperator, IList<TreeNode>> operatorNodeTable;
    3538
     39    /// <summary>
     40    /// Gets or sets the operator graph to represent visually.
     41    /// </summary>
     42    /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>.
     43    /// No own data storage present.</remarks>
    3644    public IOperatorGraph OperatorGraph {
    3745      get { return (IOperatorGraph)Item; }
     
    3947    }
    4048
     49    /// <summary>
     50    /// Initializes a new instance of <see cref="OperatorGraphView"/> with caption "Operator Graph".
     51    /// </summary>
    4152    public OperatorGraphView() {
    4253      InitializeComponent();
     
    4556      Caption = "Operator Graph";
    4657    }
     58    /// <summary>
     59    /// Initializes a new instance of <see cref="OperatorGraphView"/>
     60    /// with the given <paramref name="operatorGraph"/>.
     61    /// </summary>
     62    /// <remarks>Calls <see cref="OperatorGraphView()"/>.</remarks>
     63    /// <param name="operatorGraph">The operator graph to represent visually.</param>
    4764    public OperatorGraphView(IOperatorGraph operatorGraph)
    4865      : this() {
     
    5067    }
    5168
     69    /// <summary>
     70    /// Removes the eventhandlers from the underlying <see cref="IOperatorGraph"/>.
     71    /// </summary>
     72    /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    5273    protected override void RemoveItemEvents() {
    5374      OperatorGraph.OperatorAdded -= new EventHandler<OperatorEventArgs>(OperatorGraph_OperatorAdded);
     
    5677      base.RemoveItemEvents();
    5778    }
     79    /// <summary>
     80    /// Adds eventhandlers to the underlying <see cref="IOperatorGraph"/>.
     81    /// </summary>
     82    /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    5883    protected override void AddItemEvents() {
    5984      base.AddItemEvents();
     
    6388    }
    6489
     90    /// <summary>
     91    /// Updates all controls with the latest data of the model.
     92    /// </summary>
     93    /// <remarks>Calls <see cref="ViewBase.UpdateControls"/> of base class <see cref="ViewBase"/>.</remarks>
    6594    protected override void UpdateControls() {
    6695      base.UpdateControls();
  • trunk/sources/HeuristicLab.Core/OperatorGroup.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Representation of a group of operators (can also include subgroups).
     30  /// </summary>
    2831  public class OperatorGroup : StorableBase, IOperatorGroup {
    2932    private string myName;
     33    /// <summary>
     34    /// Gets or sets the name of the current operator group.
     35    /// </summary>
     36    /// <remarks>Calls <see cref="OnNameChanged"/> in the setter.</remarks>
    3037    public string Name {
    3138      get { return myName; }
     
    3845    }
    3946    private List<IOperatorGroup> mySubGroups;
     47    /// <summary>
     48    /// Gets all subgroups of the current instance.
     49    /// <note type="caution"> The subgroups are returned read-only.</note>
     50    /// </summary>
    4051    public ICollection<IOperatorGroup> SubGroups {
    4152      get { return mySubGroups.AsReadOnly(); }
    4253    }
    4354    private List<IOperator> myOperators;
     55    /// <summary>
     56    /// Gets all operators of the current instance.
     57    /// <note type="caution"> The operators are returned read-only.</note>
     58    /// </summary>
    4459    public ICollection<IOperator> Operators {
    4560      get { return myOperators.AsReadOnly(); }
    4661    }
    4762
     63    /// <summary>
     64    /// Initializes a new instance of <see cref="OperatorGroup"/> having "Anonymous" as name.
     65    /// </summary>
    4866    public OperatorGroup() {
    4967      myName = "Anonymous";
     
    5270    }
    5371
     72    /// <summary>
     73    /// Clones the current instance (deep clone).
     74    /// </summary>
     75    /// <remarks>Deep clone with <see cref="Auxiliary.Clone"/> method of helper class
     76    /// <see cref="Auxiliary"/>.</remarks>
     77    /// <param name="clonedObjects">Dictionary of all already cloned objects. (Needed to avoid cycles.)</param>
     78    /// <returns>The cloned object as <see cref="OperatorGroup"/>.</returns>
    5479    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    5580      OperatorGroup clone = (OperatorGroup)base.Clone(clonedObjects);
     
    6287    }
    6388
     89    /// <summary>
     90    /// Adds the given subgroup (<paramref name="group"/>) to the current instance.
     91    /// </summary>
     92    /// <param name="group">The subgroup to add.</param>
    6493    public virtual void AddSubGroup(IOperatorGroup group) {
    6594      mySubGroups.Add(group);
    6695    }
     96    /// <summary>
     97    /// Removes the given subgroup (<paramref name="group"/>) from the current instance.
     98    /// </summary>
     99    /// <param name="group">The subgroup to remove.</param>
    67100    public virtual void RemoveSubGroup(IOperatorGroup group) {
    68101      mySubGroups.Remove(group);
    69102    }
     103    /// <summary>
     104    /// Ads the given operator <paramref name="op"/> to the current instance.
     105    /// </summary>
     106    /// <param name="op">The operator to add.</param>
    70107    public virtual void AddOperator(IOperator op) {
    71108      myOperators.Add(op);
    72109    }
     110    /// <summary>
     111    /// Removes the given operator <paramref name="op"/> from the current instance.
     112    /// </summary>
     113    /// <param name="op">The operator to remove.</param>
    73114    public virtual void RemoveOperator(IOperator op) {
    74115      myOperators.Remove(op);
    75116    }
    76117
     118    /// <summary>
     119    /// Occurs when the name of the operator was changed.
     120    /// </summary>
    77121    public event EventHandler NameChanged;
     122    /// <summary>
     123    /// Fires a new <c>NameChanged</c> event.
     124    /// </summary>
    78125    protected virtual void OnNameChanged() {
    79126      if (NameChanged != null) {
     
    83130
    84131    #region Persistence Methods
     132    /// <summary>
     133    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     134    /// </summary>
     135    /// <remarks>Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>.<br/>
     136    /// A quick overview how the single elements of the current instance are saved:
     137    /// <list type="bullet">
     138    /// <item>
     139    /// <term>Name: </term>
     140    /// <description>Saved as an <see cref="XmlAttribute"/> with attribute name <c>Name</c>.</description>
     141    /// </item>
     142    /// <item>
     143    /// <term>Sub groups: </term>
     144    /// <description>A child node is created with tag name <c>SubGroups</c>. Beyond this child node
     145    /// all sub operator groups are saved as child nodes themselves.</description>
     146    /// </item>
     147    /// <item>
     148    /// <term>Operators: </term>
     149    /// <description>A child node is created with tag name <c>Operators</c>. Beyond this child node
     150    /// all operators are saved as child nodes themselves.</description>
     151    /// </item>
     152    /// </list>
     153    /// </remarks>
     154    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     155    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     156    /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     157    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    85158    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    86159      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    98171      return node;
    99172    }
     173    /// <summary>
     174    /// Loads the persisted operator group from the specified <paramref name="node"/>.
     175    /// </summary>
     176    /// <remarks>See <see cref="GetXmlNode"/> to get information about how the data must be saved. <br/>
     177    /// Calls <see cref="StorableBase.Populate"/> of base class <see cref="StorableBase"/>.</remarks>
     178    /// <param name="node">The <see cref="XmlNode"/> where the boolean value is saved.</param>
     179    /// <param name="restoredObjects">The dictionary of all already restored objects.
     180    /// (Needed to avoid cycles.)</param>
    100181    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    101182      base.Populate(node, restoredObjects);
  • trunk/sources/HeuristicLab.Core/OperatorIndexEventArgs.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Event arguments to be able to specify the affected operator at the specified index.
     29  /// </summary>
    2730  public class OperatorIndexEventArgs : ItemIndexEventArgs {
     31    /// <summary>
     32    /// Gets the affected operator.
     33    /// </summary>
     34    /// <remarks>Uses property <see cref="ItemEventArgs.Item"/> of base class
     35    /// <see cref="ItemIndexEventArgs"/>. No own data storage present.</remarks>
    2836    public IOperator Operator {
    2937      get { return (IOperator)Item; }
    3038    }
    3139
     40    /// <summary>
     41    /// Initializes a new instance of <see cref="OperatorIndexEventArgs"/> with the given operator
     42    /// and the specified <paramref name="index"/>.
     43    /// </summary>
     44    /// <remarks>Calls constructor of base class <see cref="ItemIndexEventArgs"/>.</remarks>
     45    /// <param name="op">The affected operator.</param>
     46    /// <param name="index">The affected index.</param>
    3247    public OperatorIndexEventArgs(IOperator op, int index)
    3348      : base(op, index) {
  • trunk/sources/HeuristicLab.Core/OperatorLibrary.cs

    r2 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Represents a library of operators consisting of one <see cref="IOperatorGroup"/>.
     30  /// </summary>
    2831  public class OperatorLibrary : ItemBase, IOperatorLibrary, IEditable {
    2932    private IOperatorGroup myGroup;
     33    /// <summary>
     34    /// Gets the operator group of the current instance.
     35    /// </summary>
    3036    public IOperatorGroup Group {
    3137      get { return myGroup; }
    3238    }
    3339
     40    /// <summary>
     41    /// Initializes a new instance of <see cref="OperatorLibrary"/>.
     42    /// </summary>
    3443    public OperatorLibrary() {
    3544      myGroup = new OperatorGroup();
    3645    }
    3746
     47    /// <summary>
     48    /// Creates a new instance of <see cref="OperatorLibraryEditor"/> to display the current instance.
     49    /// </summary>
     50    /// <returns>The created view as <see cref="OperatorLibraryEditor"/>.</returns>
    3851    public override IView CreateView() {
    3952      return new OperatorLibraryEditor(this);
    4053    }
     54    /// <summary>
     55    /// Creates a new instance of <see cref="OperatorLibraryEditor"/> to display the current instance.
     56    /// </summary>
     57    /// <returns>The created editor as <see cref="OperatorLibraryEditor"/>.</returns>
    4158    public virtual IEditor CreateEditor() {
    4259      return new OperatorLibraryEditor(this);
    4360    }
    4461
     62    /// <summary>
     63    /// Clones the current instance (deep clone).
     64    /// </summary>
     65    /// <remarks>Deep clone through <see cref="Auxiliary.Clone"/> method of helper class
     66    /// <see cref="Auxiliary"/>.</remarks>
     67    /// <param name="clonedObjects">Dictionary of all already cloned objects. (Needed to avoid cycles.)</param>
     68    /// <returns>The cloned object as <see cref="OperatorLibrary"/>.</returns>
    4569    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    4670      OperatorLibrary clone = new OperatorLibrary();
     
    5175
    5276    #region Persistence Methods
     77    /// <summary>
     78    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     79    /// </summary>
     80    /// <remarks>Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>.<br/>
     81    /// The operator group is saved as a child node with the tag name <c>OperatorGroup</c>.</remarks>
     82    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     83    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     84    /// <param name="persistedObjects">The dictionary of all already persisted objects.
     85    /// (Needed to avoid cycles.)</param>
     86    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    5387    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    5488      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    5690      return node;
    5791    }
     92    /// <summary>
     93    /// Loads the persisted operator library from the specified <paramref name="node"/>.
     94    /// </summary>
     95    /// <remarks>Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.<br/>
     96    /// See <see cref="GetXmlNode"/> for further information on how the data must be saved.</remarks>
     97    /// <param name="node">The <see cref="XmlNode"/> where the operator library is saved.</param>
     98    /// <param name="restoredObjects">The dictionary of all already restored objects.
     99    /// (Needed to avoid cycles.)</param>
    58100    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    59101      base.Populate(node, restoredObjects);
  • trunk/sources/HeuristicLab.Core/OperatorLibraryEditor.cs

    r2 r776  
    3131
    3232namespace HeuristicLab.Core {
     33  /// <summary>
     34  /// Visual representation of the class <see cref="IOperatorLibrary"/>.
     35  /// </summary>
    3336  public partial class OperatorLibraryEditor : EditorBase {
    3437    private ChooseOperatorDialog chooseOperatorDialog;
    3538
     39    /// <summary>
     40    /// Gets or sets the operator library that should be displayed.
     41    /// </summary>
     42    /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="EditorBase"/>.</remarks>
    3643    public IOperatorLibrary OperatorLibrary {
    3744      get { return (IOperatorLibrary)Item; }
     
    3946    }
    4047
     48    /// <summary>
     49    /// Initializes a new instance of <see cref="OperatorLibraryEditor"/> with caption
     50    /// <c>Operator Library</c>.
     51    /// </summary>
    4152    public OperatorLibraryEditor() {
    4253      InitializeComponent();
     
    4455      Caption = "Operator Library";
    4556    }
     57    /// <summary>
     58    /// Initializes a new instance of <see cref="OperatorLibraryEditor"/> with the
     59    /// specified <paramref name="operatorLibrary"/>.
     60    /// </summary>
     61    /// <param name="operatorLibrary">The operator library to display.</param>
    4662    public OperatorLibraryEditor(IOperatorLibrary operatorLibrary)
    4763      : this() {
     
    6177    }
    6278
     79    /// <summary>
     80    /// Updates all controls with the latest data of the model.
     81    /// </summary>
     82    /// <remarks>Calls <see cref="EditorBase.UpdateControls"/> of base class <see cref="EditorBase"/>.</remarks>
    6383    protected override void UpdateControls() {
    6484      base.UpdateControls();
  • trunk/sources/HeuristicLab.Core/PersistenceManager.cs

    r750 r776  
    2929
    3030namespace HeuristicLab.Core {
     31  /// <summary>
     32  /// Static class for serializing and deserializing objects.
     33  /// </summary>
    3134  public static class PersistenceManager {
     35    /// <summary>
     36    /// Creates an <see cref="XmlDocument"/> to persist an object with xml declaration.
     37    /// </summary>
     38    /// <returns>The created <see cref="XmlDocument"/>.</returns>
    3239    public static XmlDocument CreateXmlDocument() {
    3340      XmlDocument document = new XmlDocument();
     
    3542      return document;
    3643    }
     44    /// <summary>
     45    /// Saves the specified <paramref name="instance"/> in the specified <paramref name="document"/>
     46    /// if it has not already been serialized.
     47    /// </summary>
     48    /// <remarks>The tag name of the saved instance is its type name.<br/>
     49    /// The guid is saved as an <see cref="XmlAttribute"/> with tag name <c>GUID</c>.</remarks>
     50    /// <param name="instance">The object that should be saved.</param>
     51    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     52    /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     53    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    3754    public static XmlNode Persist(IStorable instance, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
    3855      string name = instance.GetType().Name;
     
    4057      return Persist(name, instance, document, persistedObjects);
    4158    }
     59    /// <summary>
     60    /// Saves the specified <paramref name="instance"/> in the specified <paramref name="document"/>
     61    /// if it has not already been serialized.
     62    /// </summary>
     63    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     64    /// <param name="instance">The object that should be saved.</param>
     65    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     66    /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     67    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    4268    public static XmlNode Persist(string name, IStorable instance, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
    4369      if(persistedObjects.ContainsKey(instance.Guid)) {
     
    5379      }
    5480    }
    55     public static IStorable Restore(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     81    /// <summary>
     82    /// Loads a persisted object from the specified <paramref name="node"/>.
     83    /// </summary>
     84    /// <remarks>The guid is saved as an attribute with tag name <c>GUID</c>. The type of the
     85    /// persisted object is saved as attribute with tag name <c>Type</c>.<br/>
     86    /// Calls <c>instance.Populate</c>.</remarks>
     87    /// <param name="node">The <see cref="XmlNode"/> where the object is saved.</param>
     88    /// <param name="restoredObjects">A dictionary of all already restored objects.
     89    /// (Needed to avoid cycles.)</param>
     90    /// <returns>The loaded object.</returns>
     91    public static IStorable Restore(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    5692      Guid guid = new Guid(node.Attributes["GUID"].Value);
    5793      if(restoredObjects.ContainsKey(guid)) {
     
    65101      }
    66102    }
     103    /// <summary>
     104    /// Saves the specified <paramref name="instance"/> in the specified file through creating an
     105    /// <see cref="XmlDocument"/>.
     106    /// </summary>
     107    /// <param name="instance">The object that should be saved.</param>
     108    /// <param name="filename">The name of the file where the <paramref name="object"/> should be saved.</param>
    67109    public static void Save(IStorable instance, string filename) {
    68110      using(FileStream stream = File.Create(filename)) {
     
    71113      }
    72114    }
     115    /// <summary>
     116    /// Saves the specified <paramref name="instance"/> in the specified <paramref name="stream"/>
     117    /// through creating an <see cref="XmlDocument"/>.
     118    /// </summary>
     119    /// <param name="instance">The object that should be saved.</param>
     120    /// <param name="stream">The (file) stream where the object should be saved.</param>
    73121    public static void Save(IStorable instance, Stream stream) {
    74122      XmlDocument document = PersistenceManager.CreateXmlDocument();
     
    98146      document.Save(stream);
    99147    }
     148    /// <summary>
     149    /// Loads an object from a file with the specified <paramref name="filename"/>.
     150    /// </summary>
     151    /// <remarks>The object must be saved as an <see cref="XmlDocument"/>. <br/>
     152    /// Calls <see cref="Restore"/>.</remarks>
     153    /// <param name="filename">The filename of the file where the data is saved.</param>
     154    /// <returns>The loaded object.</returns>
    100155    public static IStorable Load(string filename) {
    101156      using(FileStream stream = File.OpenRead(filename)) {
     
    105160      }
    106161    }
     162    /// <summary>
     163    /// Loads an object from the specified <paramref name="stream"/>.
     164    /// </summary>
     165    /// <remarks>The object must be saved as an <see cref="XmlDocument"/>. <br/>
     166    /// Calls <see cref="Restore"/>.</remarks>
     167    /// <param name="stream">The stream from where to load the data.</param>
     168    /// <returns>The loaded object.</returns>
    107169    public static IStorable Load(Stream stream) {
    108170      XmlDocument doc = new XmlDocument();
     
    118180    }
    119181
     182    /// <summary>
     183    /// Loads an object from a zip file.
     184    /// </summary>
     185    /// <param name="serializedStorable">The zip file from where to load as byte array.</param>
     186    /// <returns>The loaded object.</returns>
    120187    public static IStorable RestoreFromGZip(byte[] serializedStorable) {
    121188      GZipStream stream = new GZipStream(new MemoryStream(serializedStorable), CompressionMode.Decompress);
     
    123190    }
    124191
     192    /// <summary>
     193    /// Saves the specified <paramref name="storable"/> in a zip file.
     194    /// </summary>
     195    /// <remarks>Calls <see cref="Save(HeuristicLab.Core.IStorable, Stream)"/>.</remarks>
     196    /// <param name="storable">The object to save.</param>
     197    /// <returns>The zip stream as byte array.</returns>
    125198    public static byte[] SaveToGZip(IStorable storable) {
    126199      MemoryStream memStream = new MemoryStream();
     
    131204    }
    132205
     206    /// <summary>
     207    /// Builds a meaningful string for the given <paramref name="type"/> with the namespace information,
     208    /// all its arguments, the assembly name...
     209    /// </summary>
     210    /// <param name="type">The type for which a string should be created.</param>
     211    /// <returns>A string value of this type containing different additional information.</returns>
    133212    public static string BuildTypeString(Type type) {
    134213      string assembly = type.Assembly.FullName;
  • trunk/sources/HeuristicLab.Core/Scope.cs

    r261 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Hierarchical container of variables (and of subscopes).
     30  /// </summary>
    2831  public class Scope : ItemBase, IScope {
    2932    private IScope parent;
    3033
    31     private string myName;
     34    private string myName;
     35    /// <summary>
     36    /// Gets the name of the current scope.
     37    /// </summary>
    3238    public string Name {
    3339      get { return myName; }
     
    3541
    3642    private IDictionary<string, IVariable> myVariables;
     43    /// <inheritdoc/>
    3744    public ICollection<IVariable> Variables {
    3845      get { return myVariables.Values; }
    3946    }
    4047    private IDictionary<string, string> myAliases;
     48    /// <inheritdoc/>
    4149    public IEnumerable<KeyValuePair<string, string>> Aliases {
    4250      get { return myAliases; }
    4351    }
    4452    private List<IScope> mySubScopes;
     53    /// <summary>
     54    /// Gets all subscopes of the current instance.
     55    /// <note type="caution"> The subscopes are returned as read-only.</note>
     56    /// </summary>
    4557    public IList<IScope> SubScopes {
    4658      get { return mySubScopes.AsReadOnly(); }
    4759    }
    4860
     61    /// <summary>
     62    /// Initializes a new instance of <see cref="Scope"/> having "Anonymous" as default name.
     63    /// </summary>
    4964    public Scope() {
    5065      myName = "Anonymous";
     
    5368      mySubScopes = new List<IScope>();
    5469    }
     70    /// <summary>
     71    /// Initializes a new instance of <see cref="Scope"/> with the given <paramref name="name"/>.
     72    /// </summary>
     73    /// <param name="name">The name of the scope.</param>
    5574    public Scope(string name)
    5675      : this() {
     
    5877    }
    5978
     79    /// <inheritdoc/>
    6080    public void SetParent(IScope scope) {
    6181      parent = scope;
    6282    }
    6383
     84    /// <summary>
     85    /// Creates a new instance of <see cref="ScopeView"/> to represent the current instance visually.
     86    /// </summary>
     87    /// <returns>The created view as <see cref="ScopeView"/>.</returns>
    6488    public override IView CreateView() {
    6589      return new ScopeView(this);
    6690    }
    6791
     92    /// <inheritdoc/>
    6893    public IVariable GetVariable(string name) {
    6994      IVariable variable;
     
    7398        return null;
    7499    }
     100    /// <inheritdoc/>
    75101    public void AddVariable(IVariable variable) {
    76102      myVariables.Add(variable.Name, variable);
     
    80106    }
    81107
     108    /// <inheritdoc/>
    82109    public void RemoveVariable(string name) {
    83110      IVariable variable;
     
    102129      myVariables.Add(variable.Name, variable);
    103130    }
     131    /// <inheritdoc cref="IScope.GetVariableValue&lt;T&gt;(string, bool)"/>
    104132    public T GetVariableValue<T>(string name, bool recursiveLookup) where T : class, IItem {
    105133      return GetVariableValue<T>(name, recursiveLookup, true);
    106134    }
     135    /// <inheritdoc cref="IScope.GetVariableValue&lt;T&gt;(string, bool, bool)"/>
    107136    public T GetVariableValue<T>(string name, bool recursiveLookup, bool throwOnError) where T : class, IItem {
    108137      return (T)GetVariableValue(name, recursiveLookup, throwOnError);
    109138    }
     139    /// <inheritdoc cref="IScope.GetVariableValue(string, bool)"/>
    110140    public IItem GetVariableValue(string name, bool recursiveLookup) {
    111141      return GetVariableValue(name, recursiveLookup, true);
    112142    }
     143    /// <inheritdoc cref="IScope.GetVariableValue(string, bool, bool)"/>
    113144    public IItem GetVariableValue(string name, bool recursiveLookup, bool throwOnError) {
    114145      IVariable variable;
     
    127158      }
    128159    }
    129 
     160    /// <inheritdoc/>
    130161    public string TranslateName(string name) {
    131162      while (myAliases.ContainsKey(name))
     
    135166      return name;
    136167    }
     168    /// <inheritdoc/>
    137169    public void AddAlias(string alias, string name) {
    138170      RemoveAlias(alias);
     
    142174      }
    143175    }
     176    /// <inheritdoc/>
    144177    public void RemoveAlias(string alias) {
    145178      if (myAliases.ContainsKey(alias)) {
     
    149182    }
    150183
     184    /// <inheritdoc/>
    151185    public void AddSubScope(IScope scope) {
    152186      scope.SetParent(this);
     
    154188      OnSubScopeAdded(scope, mySubScopes.Count - 1);
    155189    }
     190    /// <inheritdoc/>
    156191    public void RemoveSubScope(IScope scope) {
    157192      int index = mySubScopes.IndexOf(scope);
     
    161196      }
    162197    }
     198    /// <inheritdoc/>
    163199    public void ReorderSubScopes(int[] sequence) {
    164200      IScope[] scopes = mySubScopes.ToArray();
     
    168204      OnSubScopesReordered();
    169205    }
     206    /// <inheritdoc/>
    170207    public IScope GetScope(Guid guid) {
    171208      if (Guid == guid) return this;
     
    178215      return null;
    179216    }
     217    /// <inheritdoc/>
    180218    public IScope GetScope(string name) {
    181219      if (Name == name) return this;
     
    189227    }
    190228
     229    /// <inheritdoc/>
    191230    public void Clear() {
    192231      string[] variableNames = new string[Variables.Count];
     
    208247    }
    209248
     249    /// <inheritdoc/>
    210250    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    211251      Scope clone = (Scope)base.Clone(clonedObjects);
     
    222262    }
    223263
     264    /// <inheritdoc />
    224265    public event EventHandler<VariableEventArgs> VariableAdded;
     266    /// <summary>
     267    /// Fires a new <c>VariableAdded</c> event.
     268    /// </summary>
     269    /// <param name="variable">The variable that has been added.</param>
    225270    protected virtual void OnVariableAdded(IVariable variable) {
    226271      if (VariableAdded != null)
    227272        VariableAdded(this, new VariableEventArgs(variable));
    228273    }
     274    /// <inheritdoc />
    229275    public event EventHandler<VariableEventArgs> VariableRemoved;
     276    /// <summary>
     277    /// Fires a new <c>VariableRemoved</c>.
     278    /// </summary>
     279    /// <param name="variable">The variable that has been deleted.</param>
    230280    protected virtual void OnVariableRemoved(IVariable variable) {
    231281      if (VariableRemoved != null)
    232282        VariableRemoved(this, new VariableEventArgs(variable));
    233283    }
     284    /// <inheritdoc />
    234285    public event EventHandler<AliasEventArgs> AliasAdded;
     286    /// <summary>
     287    /// Fires a new <c>AliasAdded</c> event.
     288    /// </summary>
     289    /// <param name="alias">The alias that has been added.</param>
    235290    protected virtual void OnAliasAdded(string alias) {
    236291      if (AliasAdded != null)
    237292        AliasAdded(this, new AliasEventArgs(alias));
    238293    }
     294    /// <inheritdoc/>
    239295    public event EventHandler<AliasEventArgs> AliasRemoved;
     296    /// <summary>
     297    /// Fires a new <c>AliasRemoved</c> event.
     298    /// </summary>
     299    /// <param name="alias">The alias that has been deleted.</param>
    240300    protected virtual void OnAliasRemoved(string alias) {
    241301      if (AliasRemoved != null)
    242302        AliasRemoved(this, new AliasEventArgs(alias));
    243303    }
     304    /// <inheritdoc/>
    244305    public event EventHandler<ScopeIndexEventArgs> SubScopeAdded;
     306    /// <summary>
     307    /// Fires a new <c>SubScopeAdded</c> event.
     308    /// </summary>
     309    /// <param name="scope">The sub scope that has been added.</param>
     310    /// <param name="index">The index where the scope has been added.</param>
    245311    protected virtual void OnSubScopeAdded(IScope scope, int index) {
    246312      if (SubScopeAdded != null)
    247313        SubScopeAdded(this, new ScopeIndexEventArgs(scope, index));
    248314    }
     315    /// <inheritdoc/>
    249316    public event EventHandler<ScopeIndexEventArgs> SubScopeRemoved;
     317    /// <summary>
     318    /// Fires a new <c>SubScopeRemoved</c> event.
     319    /// </summary>
     320    /// <param name="scope">The sub scope that has been deleted.</param>
     321    /// <param name="index">The position of the sub scope.</param>
    250322    protected virtual void OnSubScopeRemoved(IScope scope, int index) {
    251323      if (SubScopeRemoved != null)
    252324        SubScopeRemoved(this, new ScopeIndexEventArgs(scope, index));
    253325    }
     326    /// <inheritdoc />
    254327    public event EventHandler SubScopesReordered;
     328    /// <summary>
     329    /// Fires a new <c>SubScopesReordered</c> event
     330    /// </summary>
    255331    protected virtual void OnSubScopesReordered() {
    256332      if (SubScopesReordered != null)
     
    259335
    260336    #region Persistence Methods
     337    /// <summary>
     338    /// Saves the current instance as <see cref="XmlNode"/> in the given <paramref name="document"/>.
     339    /// </summary>
     340    /// <remarks>
     341    /// Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>.<br/>
     342    /// A quick overview how the single elements of the current instance are saved:
     343    /// <list type="bullet">
     344    /// <item>
     345    /// <term>Name: </term>
     346    /// <description>Saved as an <see cref="XmlAttribute"/> having the tag name <c>Name</c>.</description>
     347    /// </item>
     348    /// <item>
     349    /// <term>Variables: </term>
     350    /// <description>A child node is created with the tag name <c>Variables</c>. Beyond this child node,
     351    /// all variables are saved as child nodes.</description>
     352    /// </item>
     353    /// <item>
     354    /// <term>Aliases: </term>
     355    /// <description>A child node is created with the tag name <c>Aliases</c>. Beyond this child node,
     356    /// all aliases are saved as child nodes with the tag name <c>Alias</c>. Each alias has an
     357    /// <see cref="XmlAttribute"/> with the tag name "Alias", holding the alias, and an attribute
     358    /// with the tag name <c>Name</c>, holding the name of the alias.</description>
     359    /// </item>
     360    /// <item>
     361    /// <term>Sub scopes: </term>
     362    /// <description>A child node is created with the tag name <c>SubScopes</c>. Beyond this child node,
     363    /// all sub scopes are saved as child nodes.</description>
     364    /// </item>
     365    /// </list>
     366    /// </remarks>
     367    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     368    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     369    /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     370    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    261371    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    262372      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    290400      return node;
    291401    }
     402    /// <summary>
     403    /// Loads the persisted scope from the specified <paramref name="node"/>.
     404    /// </summary>
     405    /// <remarks>See <see cref="GetXmlNode"/> to get further information on how the current instance must
     406    /// be saved. <br/>
     407    /// Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.</remarks>
     408    /// <param name="node">The <see cref="XmlNode"/> where the boolean value is saved.</param>
     409    /// <param name="restoredObjects">The dictionary of all already restored objects.
     410    /// (Needed to avoid cycles.)</param>
    292411    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    293412      base.Populate(node, restoredObjects);
  • trunk/sources/HeuristicLab.Core/ScopeEventArgs.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Event arguments to be able to specify the affected scope.
     29  /// </summary>
    2730  public class ScopeEventArgs : ItemEventArgs {
     31    /// <summary>
     32    /// Gets the affected scope.
     33    /// </summary>
     34    /// <remarks>Uses property <see cref="ItemEventArgs.Item"/> of base class <see cref="ItemEventArgs"/>.
     35    /// No own data storage present.</remarks>
    2836    public IScope Scope {
    2937      get { return (IScope)Item; }
    3038    }
    3139
     40    /// <summary>
     41    /// Initializes a new instance of <see cref="ScopeEventArgs"/> with the specified scope.
     42    /// </summary>
     43    /// <param name="scope">The affected scope.</param>
    3244    public ScopeEventArgs(IScope scope)
    3345      : base(scope) {
  • trunk/sources/HeuristicLab.Core/ScopeIndexEventArgs.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Event arguments to be able to specify the affected scope at the specified index.
     29  /// </summary>
    2730  public class ScopeIndexEventArgs : ItemIndexEventArgs {
     31    /// <summary>
     32    /// Gets the affected scope.
     33    /// </summary>
     34    /// <remarks>Uses property <see cref="ItemEventArgs.Item"/> of base class
     35    /// <see cref="ItemIndexEventArgs"/>. No own data storage present.</remarks>
    2836    public IScope Scope {
    2937      get { return (IScope)Item; }
    3038    }
    3139
     40    /// <summary>
     41    /// Initializes a new instance of <see cref="ScopeIndexEventArgs"/> with the specified
     42    /// <paramref name="scope"/> and <paramref name="index"/>.
     43    /// </summary>
     44    /// <remarks>Calls constructor of base class <see cref="ItemIndexEventArgs"/>.</remarks>
     45    /// <param name="scope">The affected scope.</param>
     46    /// <param name="index">The affected index.</param>
    3247    public ScopeIndexEventArgs(IScope scope, int index)
    3348      : base(scope, index) {
  • trunk/sources/HeuristicLab.Core/ScopeView.cs

    r2 r776  
    3030
    3131namespace HeuristicLab.Core {
     32  /// <summary>
     33  /// The visual represenation of <see cref="IScope"/>.
     34  /// </summary>
    3235  public partial class ScopeView : ViewBase {
    3336    private Dictionary<IScope, TreeNode> scopeNodeTable;
    3437    private Dictionary<IScope, bool> scopeExpandedTable;
    3538
     39    /// <summary>
     40    /// Gets or sets the scope to represent visually.
     41    /// </summary>
     42    /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>.
     43    /// No own data storage present.</remarks>
    3644    public IScope Scope {
    3745      get { return (IScope)Item; }
     
    3947    }
    4048    private bool myAutomaticUpdating;
     49    /// <summary>
     50    /// Gets information whether the scope is automatically updating.
     51    /// </summary>
    4152    public bool AutomaticUpdating {
    4253      get { return myAutomaticUpdating; }
    4354    }
    4455
     56    /// <summary>
     57    /// Initializes a new instance of <see cref="ScopeView"/> with caption "Scope" and
     58    /// property <see cref="AutomaticUpdating"/> set to <c>false</c>.
     59    /// </summary>
    4560    public ScopeView() {
    4661      InitializeComponent();
     
    5065      myAutomaticUpdating = false;
    5166    }
     67    /// <summary>
     68    /// Initializes a new instance of <see cref="ScopeView"/> with the given <paramref name="scope"/>.
     69    /// </summary>
     70    /// <remarks>Calls <see cref="ScopeView()"/>.</remarks>
     71    /// <param name="scope">The scope to represent visually.</param>
    5272    public ScopeView(IScope scope)
    5373      : this() {
     
    5575    }
    5676
     77    /// <summary>
     78    /// Updates all controls with the latest data of the model.
     79    /// </summary>
     80    /// <remarks>Calls <see cref="ViewBase.UpdateControls"/> of base class <see cref="ViewBase"/>.</remarks>
    5781    protected override void UpdateControls() {
    5882      base.UpdateControls();
  • trunk/sources/HeuristicLab.Core/StorableBase.cs

    r40 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// The base class for all storable objects.
     30  /// </summary>
    2831  public abstract class StorableBase : IStorable {
    2932    private Guid myGuid;
     33    /// <summary>
     34    /// Gets the Guid of the item.
     35    /// </summary>
    3036    public Guid Guid {
    3137      get { return myGuid; }
    3238    }
    3339
     40    /// <summary>
     41    /// Initializes a new instance of the class <see cref="StorableBase"/> with a new <see cref="Guid"/>.
     42    /// </summary>
    3443    protected StorableBase() {
    3544      myGuid = Guid.NewGuid();
    3645    }
    3746
     47    /// <summary>
     48    /// Clones the current instance (deep clone).
     49    /// </summary>
     50    /// <remarks>Uses the <see cref="Auxiliary.Clone"/> method of the class <see cref="Auxiliary"/>.</remarks>
     51    /// <returns>The clone.</returns>
    3852    public object Clone() {
    3953      return Auxiliary.Clone(this, new Dictionary<Guid, object>());
    4054    }
     55    /// <summary>
     56    /// Clones the current instance with the <see cref="M:Activator.CreateInstance"/>
     57    /// method of <see cref="Activator"/>.
     58    /// </summary>
     59    /// <param name="clonedObjects">All already cloned objects.</param>
     60    /// <returns>The clone.</returns>
    4161    public virtual object Clone(IDictionary<Guid, object> clonedObjects) {
    4262      object clone = Activator.CreateInstance(this.GetType());
     
    4565    }
    4666
     67    /// <summary>
     68    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     69    /// </summary>
     70    /// <remarks>The type of the current instance is saved as <see cref="XmlAttribute"/> with tag name
     71    /// <c>Type</c>, the guid is also saved as an attribute with the tag name <c>GUID</c>.</remarks>
     72    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     73    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     74    /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     75    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    4776    public virtual XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    4877      XmlNode node = document.CreateNode(XmlNodeType.Element, name, null);
     
    5584      return node;
    5685    }
     86    /// <summary>
     87    /// Loads the persisted object from the specified <paramref name="node"/>.
     88    /// </summary>
     89    /// <remarks>Loads only guid; type,... already loaded by the <see cref="PersistenceManager"/>.</remarks>
     90    /// <param name="node">The <see cref="XmlNode"/> where the object is saved.</param>
     91    /// <param name="restoredObjects">The dictionary of all already restored objects.
     92    /// (Needed to avoid cycles.)</param>
    5793    public virtual void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    5894      myGuid = new Guid(node.Attributes["GUID"].Value);
  • trunk/sources/HeuristicLab.Core/Variable.cs

    r701 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Represents a variable of an operator having a name and a value.
     30  /// </summary>
    2831  public class Variable : ItemBase, IVariable {
    2932    private string myName;
     33    /// <inheritdoc/>
     34    /// <remarks>Calls <see cref="OnNameChanging"/> and also <see cref="OnNameChanged"/>
     35    /// eventually in the setter.</remarks>
    3036    public string Name {
    3137      get { return myName; }
     
    4248    }
    4349    private IItem myValue;
     50    /// <inheritdoc/>
     51    /// <remarks>Calls <see cref="OnValueChanged"/> in the setter.</remarks>
    4452    public IItem Value {
    4553      get { return myValue; }
     
    5159      }
    5260    }
    53 
     61   
     62    /// <summary>
     63    /// Initializes a new instance of <see cref="Variable"/> with name <c>Anonymous</c>
     64    /// and value <c>null</c>.
     65    /// </summary>
    5466    public Variable() {
    5567      myName = "Anonymous";
    5668      myValue = null;
    5769    }
     70    /// <summary>
     71    /// Initializes a new instance of <see cref="Variable"/> with the specififed <paramref name="name"/>
     72    /// and the specified <paramref name="value"/>.
     73    /// </summary>
     74    /// <param name="name">The name of the current instance.</param>
     75    /// <param name="value">The value of the current instance.</param>
    5876    public Variable(string name, IItem value) {
    5977      myName = name;
     
    6179    }
    6280
     81    /// <inheritdoc cref="IVariable.GetValue&lt;T&gt;"/>
    6382    public T GetValue<T>() where T : class, IItem {
    6483      return (T)Value;
    6584    }
    6685
     86    /// <summary>
     87    /// Creates a new instance of <see cref="VariableView"/> to represent the current instance visually.
     88    /// </summary>
     89    /// <returns>The created view as <see cref="VariableView"/>.</returns>
    6790    public override IView CreateView() {
    6891      return new VariableView(this);
    6992    }
    7093
     94    /// <summary>
     95    /// Clones the current instance (deep clone).
     96    /// </summary>
     97    /// <param name="clonedObjects">Dictionary of all already cloned objects. (Needed to avoid cycles.)</param>
     98    /// <returns>The cloned object as <see cref="Variable"/>.</returns>
    7199    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    72100      Variable clone = new Variable();
     
    78106    }
    79107
     108    /// <summary>
     109    /// Gets the string representation of the current instance in the format: <c>Name: [null|Value]</c>.
     110    /// </summary>
     111    /// <returns>The current instance as a string.</returns>
    80112    public override string ToString() {
    81113      return Name + ": " + ((Value == null) ? ("null") : (Value.ToString()));
    82114    }
    83115
     116    /// <inheritdoc/>
    84117    public event EventHandler<NameChangingEventArgs> NameChanging;
     118    /// <summary>
     119    /// Fires a new <c>NameChanging</c> event.
     120    /// </summary>
     121    /// <param name="e">The event arguments of the changing.</param>
    85122    protected virtual void OnNameChanging(NameChangingEventArgs e) {
    86123      if (NameChanging != null)
    87124        NameChanging(this, e);
    88125    }
     126    /// <inheritdoc/>
    89127    public event EventHandler NameChanged;
     128    /// <summary>
     129    /// Fires a new <c>NameChanged</c> event.
     130    /// </summary>
     131    /// <remarks>Calls <see cref="ItemBase.OnChanged"/>.</remarks>
    90132    protected virtual void OnNameChanged() {
    91133      if (NameChanged != null)
     
    93135      OnChanged();
    94136    }
     137    /// <inheritdoc/>
    95138    public event EventHandler ValueChanged;
     139    /// <summary>
     140    /// Fires a new <c>ValueChanged</c> even.
     141    /// </summary>
    96142    protected virtual void OnValueChanged() {
    97143      if (ValueChanged != null)
     
    101147
    102148    #region Persistence Methods
     149    /// <summary>
     150    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     151    /// </summary>
     152    /// <remarks>Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>.<br/>
     153    /// The name of the current instance is saved as an <see cref="XmlAttribute"/> with the
     154    /// tag name <c>Name</c>, the value is saved as child node with the tag name <c>Value</c>.</remarks>
     155    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     156    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     157    /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     158    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    103159    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    104160      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    110166      return node;
    111167    }
     168    /// <summary>
     169    /// Loads the persisted variable from the specified <paramref name="node"/>.
     170    /// </summary>
     171    /// <remarks>See <see cref="GetXmlNode"/> to get information on how the variable must be saved.<br/>
     172    /// Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.</remarks>
     173    /// <param name="node">The <see cref="XmlNode"/> where the variable is saved.</param>
     174    /// <param name="restoredObjects">The dictionary of all already restored objects.
     175    /// (Needed to avoid cycles.)</param>
    112176    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    113177      base.Populate(node, restoredObjects);
  • trunk/sources/HeuristicLab.Core/VariableEventArgs.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Event arguments to be able to specify the affected variable.
     29  /// </summary>
    2730  public class VariableEventArgs : ItemEventArgs {
     31    /// <summary>
     32    /// Gets the affected variable.
     33    /// </summary>
     34    /// <remarks>Uses property <see cref="ItemEventArgs.Item"/> of base class <see cref="ItemEventArgs"/>.
     35    /// No own data storage present.</remarks>
    2836    public IVariable Variable {
    2937      get { return (IVariable)Item; }
    3038    }
    3139
     40    /// <summary>
     41    /// Initializes a new instance of <see cref="VariableEventArgs"/> with the specified
     42    /// <paramref name="variable"/>.
     43    /// </summary>
     44    /// <remarks>Calls constructor of base class <see cref="ItemEventArgs"/>.</remarks>
     45    /// <param name="variable">The affected variable.</param>
    3246    public VariableEventArgs(IVariable variable)
    3347      : base(variable) {
  • trunk/sources/HeuristicLab.Core/VariableInfo.cs

    r533 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Class for storing meta-information about variables/parameters of an operator.
     30  /// </summary>
    2831  public class VariableInfo : ItemBase, IVariableInfo {
    2932    private string myActualName;
     33    /// <summary>
     34    /// Gets or sets the actual name of the current instance.
     35    /// </summary>
     36    /// <remarks>Calls <see cref="OnActualNameChanged"/> in the setter.</remarks>
    3037    public string ActualName {
    3138      get { return myActualName; }
     
    3845    }
    3946    private string myFormalName;
     47    /// <summary>
     48    /// Gets the formal name of the current instance.
     49    /// </summary>
    4050    public string FormalName {
    4151      get { return myFormalName; }
    4252    }
    4353    private string myDescription;
     54    /// <summary>
     55    /// Gets the description of the current instance.
     56    /// </summary>
    4457    public string Description {
    4558      get { return myDescription; }
    4659    }
    4760    private Type myDataType;
     61    /// <summary>
     62    /// Gets the data type of the parameter.
     63    /// </summary>
    4864    public Type DataType {
    4965      get { return myDataType; }
    5066    }
    5167    private VariableKind myKind;
     68    /// <summary>
     69    /// Gets the kind of the parameter (input parameter, output parameter,...).
     70    /// </summary>
    5271    public VariableKind Kind {
    5372      get { return myKind; }
    5473    }
    5574    private bool myLocal;
     75    /// <summary>
     76    /// Gets or sets a boolean value, whether the variable is a local one.
     77    /// </summary>
     78    /// <remarks>Calls <see cref="OnLocalChanged"/> in the setter.</remarks>
    5679    public bool Local {
    5780      get { return myLocal; }
     
    6487    }
    6588
     89    /// <summary>
     90    /// Initializes a new instance of <see cref="VariableInfo"/> with actual and formal name "Anonymous",
     91    /// no description, a <c>null</c> data type and the <c>local</c> flag set to <c>false</c>. The type of
     92    /// the variable is an input parameter.
     93    /// </summary>
    6694    public VariableInfo() {
    6795      myActualName = "Anonymous";
     
    72100      myLocal = false;
    73101    }
     102    /// <summary>
     103    /// Initializes a new instance of <see cref="VariableInfo"/> with the given parameters.
     104    /// </summary>
     105    /// <remarks>Calls <see cref="VariableInfo()"/>.<br/>
     106    /// The formal name is assigned to the actual name, too.</remarks>
     107    /// <param name="formalName">The formal name of the current instance.</param>
     108    /// <param name="description">The description of the current instance.</param>
     109    /// <param name="dataType">The data type of the parameter.</param>
     110    /// <param name="kind">The type of the parameter.</param>
    74111    public VariableInfo(string formalName, string description, Type dataType, VariableKind kind)
    75112      : this() {
     
    81118    }
    82119
     120    /// <summary>
     121    /// Creates a new instance of <see cref="VariableInfoView"/> to represent the current instance
     122    /// visually.
     123    /// </summary>
     124    /// <returns>The created view as <see cref="VariableInfoView"/>.</returns>
    83125    public override IView CreateView() {
    84126      return new VariableInfoView(this);
    85127    }
    86128
     129    /// <summary>
     130    /// Clones the current instance (deep clone).
     131    /// </summary>
     132    /// <param name="clonedObjects">Dictionary of all already cloned objects. (Needed to avoid cycles.)</param>
     133    /// <returns>The cloned object as <see cref="VariableInfo"/>.</returns>
    87134    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    88135      VariableInfo clone = new VariableInfo();
     
    97144    }
    98145
     146    /// <inheritdoc/>
    99147    public event EventHandler ActualNameChanged;
     148    /// <summary>
     149    /// Fires a new <c>ActualNameChanged</c> event.
     150    /// </summary>
    100151    protected virtual void OnActualNameChanged() {
    101152      if (ActualNameChanged != null)
    102153        ActualNameChanged(this, new EventArgs());
    103154    }
     155    /// <inheritdoc />
    104156    public event EventHandler LocalChanged;
     157    /// <summary>
     158    /// Fires a new <c>LocalChanged</c> event.
     159    /// </summary>
    105160    protected virtual void OnLocalChanged() {
    106161      if (LocalChanged != null)
     
    109164
    110165    #region Persistence Methods
     166    /// <summary>
     167    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     168    /// </summary>
     169    /// <remarks>Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>. <br/>
     170    /// A quick overview how the single elements of the current instance are saved:
     171    /// <list type="bullet">
     172    /// <item>
     173    /// <term>Actual name: </term>
     174    /// <description>Saved as <see cref="XmlAttribute"/> with tag name <c>ActualName</c>.</description>
     175    /// </item>
     176    /// <item>
     177    /// <term>Formal name: </term>
     178    /// <description>Saves as <see cref="XmlAttribute"/> with tag name <c>FormalName</c>.</description>
     179    /// </item>
     180    /// <item>
     181    /// <term>Description: </term>
     182    /// <description>Saved as <see cref="XmlAttribute"/> with tag name <c>Description</c>.</description>
     183    /// </item>
     184    /// <item><term>Data type: </term>
     185    /// <description>Saved as <see cref="XmlAttribute"/> with tag name <c>DataType</c>.</description>
     186    /// </item>
     187    /// <item>
     188    /// <term>Kind: </term>
     189    /// <description>Saved as <see cref="XmlAttribute"/> with tag name <c>Kind</c>.</description>
     190    /// </item>
     191    /// <item>
     192    /// <term>Local: </term>
     193    /// <description>Saved as <see cref="XmlAttribute"/> with tag name <c>Local</c>.</description>
     194    /// </item>
     195    /// </list></remarks>
     196    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     197    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     198    /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     199    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    111200    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    112201      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    137226      return node;
    138227    }
     228    /// <summary>
     229    /// Loads the persisted variable info from the specified <paramref name="node"/>.
     230    /// </summary>
     231    /// <remarks>See <see cref="GetXmlNode"/> for further information on how the variable info must be
     232    /// saved. <br/>
     233    /// Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.</remarks>
     234    /// <param name="node">The <see cref="XmlNode"/> where the variable info is saved.</param>
     235    /// <param name="restoredObjects">The dictionary of all already restored objects.
     236    /// (Needed to avoid cycles.)</param>
    139237    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    140238      base.Populate(node, restoredObjects);
  • trunk/sources/HeuristicLab.Core/VariableInfoEventArgs.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Event arguments to be able to specify the affected variable info.
     29  /// </summary>
    2730  public class VariableInfoEventArgs : ItemEventArgs {
     31    /// <summary>
     32    /// Gets the affected variable info.
     33    /// </summary>
     34    /// <remarks>Uses property <see cref="ItemEventArgs.Item"/> of base class <see cref="ItemEventArgs"/>.
     35    /// No own data storage present.</remarks>
    2836    public IVariableInfo VariableInfo {
    2937      get { return (IVariableInfo)Item; }
    3038    }
    3139
     40    /// <summary>
     41    /// Initializes a new instance of <see cref="VariableInfoEventArgs"/> with the specified
     42    /// <paramref name="variableInfo"/>.
     43    /// </summary>
     44    /// <remarks>Calls constructor of base class <see cref="ItemEventArgs"/>.</remarks>
     45    /// <param name="variableInfo">The affected variable info.</param>
    3246    public VariableInfoEventArgs(IVariableInfo variableInfo)
    3347      : base(variableInfo) {
  • trunk/sources/HeuristicLab.Core/VariableInfoView.cs

    r2 r776  
    2929
    3030namespace HeuristicLab.Core {
     31  /// <summary>
     32  /// The visual representation of <see cref="IVariableInfo"/>.
     33  /// </summary>
    3134  public partial class VariableInfoView : ViewBase {
     35    /// <summary>
     36    /// Gets or sets the variable information to represent visually.
     37    /// </summary>
     38    /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>.
     39    /// No own data storage present.</remarks>
    3240    public IVariableInfo VariableInfo {
    3341      get { return (IVariableInfo)Item; }
     
    3543    }
    3644
     45    /// <summary>
     46    /// Initializes a new instance of <see cref="VariableInfoView"/> with caption "Variable Info".
     47    /// </summary>
    3748    public VariableInfoView() {
    3849      InitializeComponent();
    3950      Caption = "Variable Info";
    4051    }
     52    /// <summary>
     53    /// Initializes a new instance of <see cref="VariableInfoView"/>
     54    /// with the given <paramref name="variableInfo"/>.
     55    /// </summary>
     56    /// <remarks>Calls <see cref="VariableInfoView()"/>.</remarks>
     57    /// <param name="variableInfo">The variable info to represent visually.</param>
    4158    public VariableInfoView(IVariableInfo variableInfo)
    4259      : this() {
     
    4461    }
    4562
     63    /// <summary>
     64    /// Removes the eventhandlers from the underlying <see cref="IVariableInfo"/>.
     65    /// </summary>
     66    /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class
     67    /// <see cref="ViewBase"/>.</remarks>
    4668    protected override void RemoveItemEvents() {
    4769      VariableInfo.ActualNameChanged -= new EventHandler(VariableInfo_ActualNameChanged);
     
    4971      base.RemoveItemEvents();
    5072    }
     73    /// <summary>
     74    /// Adds eventhandlers to the underlying <see cref="IVariableInfo"/>.
     75    /// </summary>
     76    /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    5177    protected override void AddItemEvents() {
    5278      base.AddItemEvents();
     
    5480      VariableInfo.LocalChanged += new EventHandler(VariableInfo_LocalChanged);
    5581    }
    56 
     82    /// <summary>
     83    /// Updates all controls with the latest data of the model.
     84    /// </summary>
     85    /// <remarks>Calls <see cref="ViewBase.UpdateControls"/> of base class <see cref="ViewBase"/>.</remarks>
    5786    protected override void UpdateControls() {
    5887      base.UpdateControls();
  • trunk/sources/HeuristicLab.Core/VariableKind.cs

    r2 r776  
    2525
    2626namespace HeuristicLab.Core {
     27  /// <summary>
     28  /// Represents the type of a variable (input, output,...).
     29  /// </summary>
    2730  [FlagsAttribute]
    2831  public enum VariableKind {
     32    /// <summary>
     33    /// Flag for doing nothing with the variable.
     34    /// </summary>
    2935    None = 0,
     36    /// <summary>
     37    /// Flag for creating a new variable.
     38    /// </summary>
    3039    New = 1,
     40    /// <summary>
     41    /// Flag for changing value of a variable.
     42    /// </summary>
    3143    Out = 2,
     44    /// <summary>
     45    /// Flag for reading value of a variable.
     46    /// </summary>
    3247    In = 4,
     48    /// <summary>
     49    /// Flag for deleting a variable.
     50    /// </summary>
    3351    Deleted = 8
    3452  }
  • trunk/sources/HeuristicLab.Core/VariableView.cs

    r2 r776  
    2929
    3030namespace HeuristicLab.Core {
     31  /// <summary>
     32  /// The visual representation of an <see cref="IVariable"/>.
     33  /// </summary>
    3134  public partial class VariableView : ViewBase {
    3235    private ChooseItemDialog chooseItemDialog;
    3336
     37    /// <summary>
     38    /// Gets or sets the variable to represent visually.
     39    /// </summary>
     40    /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>.
     41    /// No own data storage present.</remarks>
    3442    public IVariable Variable {
    3543      get { return (IVariable)Item; }
     
    3745    }
    3846
     47    /// <summary>
     48    /// Initializes a new instance of <see cref="VariableView"/> with caption "Variable".
     49    /// </summary>
    3950    public VariableView() {
    4051      InitializeComponent();
    4152      Caption = "Variable";
    4253    }
     54    /// <summary>
     55    /// Initializes a new instance of <see cref="VariableView"/> with the given <paramref name="variable"/>.
     56    /// </summary>
     57    /// <remarks>Calls <see cref="VariableView()"/>.</remarks>
     58    /// <param name="variable">The variable to represent visually.</param>
    4359    public VariableView(IVariable variable)
    4460      : this() {
     
    4662    }
    4763
     64    /// <summary>
     65    /// Removes the eventhandlers from the underlying <see cref="IVariable"/>.
     66    /// </summary>
     67    /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    4868    protected override void RemoveItemEvents() {
    4969      Variable.NameChanged -= new EventHandler(Variable_NameChanged);
     
    5171      base.RemoveItemEvents();
    5272    }
     73    /// <summary>
     74    /// Adds eventhandlers to the underlying <see cref="IVariable"/>.
     75    /// </summary>
     76    /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    5377    protected override void AddItemEvents() {
    5478      base.AddItemEvents();
     
    5781    }
    5882
     83    /// <summary>
     84    /// Updates all controls with the latest data of the model.
     85    /// </summary>
     86    /// <remarks>Calls <see cref="ViewBase.UpdateControls"/> of base class <see cref="ViewBase"/>.</remarks>
    5987    protected override void UpdateControls() {
    6088      base.UpdateControls();
  • trunk/sources/HeuristicLab.Core/VariablesScopeView.cs

    r2 r776  
    2929
    3030namespace HeuristicLab.Core {
     31  /// <summary>
     32  /// The visual representation of all variables in a specified scope.
     33  /// </summary>
    3134  public partial class VariablesScopeView : ViewBase {
    3235    private ChooseItemDialog chooseItemDialog;
    3336
     37    /// <summary>
     38    /// Gets or sets the scope whose variables to represent visually.
     39    /// </summary>
     40    /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>.
     41    /// No won data storage present.</remarks>
    3442    public IScope Scope {
    3543      get { return (IScope)Item; }
     
    3745    }
    3846
     47    /// <summary>
     48    /// Initializes a new instance of <see cref="VariablesScopeView"/> with caption "Variables Scope View".
     49    /// </summary>
    3950    public VariablesScopeView() {
    4051      InitializeComponent();
    4152      Caption = "Variables Scope View";
    4253    }
     54    /// <summary>
     55    /// Initializes a new instance of <see cref="VariablesScopeView"/> with
     56    /// the given <paramref name="scope"/>.
     57    /// </summary>
     58    /// <remarks>Calls <see cref="VariablesScopeView()"/>.</remarks>
     59    /// <param name="scope">The scope whose variables should be represented visually.</param>
    4360    public VariablesScopeView(IScope scope)
    4461      : this() {
     
    4663    }
    4764
     65    /// <summary>
     66    /// Removes the eventhandlers from the underlying <see cref="IScope"/>.
     67    /// </summary>
     68    /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    4869    protected override void RemoveItemEvents() {
    4970      Scope.VariableAdded -= new EventHandler<VariableEventArgs>(Scope_VariableAdded);
     
    5172      base.RemoveItemEvents();
    5273    }
     74    /// <summary>
     75    /// Adds eventhandlers to the underlying <see cref="IScope"/>.
     76    /// </summary>
     77    /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    5378    protected override void AddItemEvents() {
    5479      base.AddItemEvents();
     
    5782    }
    5883
     84    /// <summary>
     85    /// Updates all controls with the latest data of the model.
     86    /// </summary>
     87    /// <remarks>Calls <see cref="ViewBase.UpdateControls"/> of base class <see cref="ViewBase"/>.</remarks>
    5988    protected override void UpdateControls() {
    6089      base.UpdateControls();
  • trunk/sources/HeuristicLab.Core/ViewBase.cs

    r2 r776  
    3030
    3131namespace HeuristicLab.Core {
     32  /// <summary>
     33  /// Base class for all visual representations.
     34  /// </summary>
    3235  public partial class ViewBase : UserControl, IView {
    3336    private IItem myItem;
     37    /// <summary>
     38    /// Gets or sets the item to represent visually.
     39    /// </summary>
     40    /// <remarks>Calls <see cref="OnItemChanged"/>, <see cref="Refresh"/>,
     41    /// <see cref="RemoveItemEvents"/> (if the current item is not null) and
     42    /// <see cref="AddItemEvents"/> (if the new item is not null) in the setter.</remarks>
    3443    public IItem Item {
    3544      get { return myItem; }
     
    4756    }
    4857    private string myCaption;
     58    /// <summary>
     59    /// Gets or sets the caption of the current instance.
     60    /// </summary>
     61    /// <remarks>Call <see cref="OnCaptionChanged"/> in the setter if a new item is set.</remarks>
    4962    public string Caption {
    5063      get { return myCaption; }
     
    5770    }
    5871
     72    /// <summary>
     73    /// Initializes a new instance of <see cref="ViewBase"/> with the caption "View".
     74    /// </summary>
    5975    public ViewBase() {
    6076      InitializeComponent();
     
    6278    }
    6379
     80    /// <summary>
     81    /// Removes the eventhandlers from the current instance.
     82    /// </summary>
    6483    protected virtual void RemoveItemEvents() { }
     84    /// <summary>
     85    /// Adds eventhandlers to the current instance.
     86    /// </summary>
    6587    protected virtual void AddItemEvents() { }
    6688
     89    /// <summary>
     90    /// Refreshes the current view.
     91    /// </summary>
     92    /// <remarks>Creates a new <see cref="MethodInvoker"/> if an invoke is required
     93    /// (see <see cref="Control.InvokeRequired"/>.<br/>
     94    /// Otherwise calls <see cref="UpdateControls"/> and <see cref="Control.Refresh"/> of base class
     95    /// <see cref="System.Windows.Forms.UserControl"/>.</remarks>
    6796    public override void Refresh() {
    6897      if (InvokeRequired) {
     
    73102      }
    74103    }
     104    /// <summary>
     105    /// Updates the controls with the latest values of the model.
     106    /// </summary>
    75107    protected virtual void UpdateControls() {
    76108      if (Item == null)
     
    81113    }
    82114
     115    /// <summary>
     116    /// Occurs when the current item was changed.
     117    /// </summary>
    83118    public event EventHandler ItemChanged;
     119    /// <summary>
     120    /// Fires a new <c>ItemChanged</c> event.
     121    /// </summary>
    84122    protected virtual void OnItemChanged() {
    85123      if (ItemChanged != null)
    86124        ItemChanged(this, new EventArgs());
    87125    }
     126    /// <summary>
     127    /// Occurs when the current caption was changed.
     128    /// </summary>
    88129    public event EventHandler CaptionChanged;
     130    /// <summary>
     131    /// Fires a new <c>CaptionChanged</c> event.
     132    /// </summary>
    89133    protected virtual void OnCaptionChanged() {
    90134      if (CaptionChanged != null)
     
    92136    }
    93137
     138    /// <summary>
     139    /// Asynchron call of GUI updating.
     140    /// </summary>
     141    /// <param name="method">The delegate to invoke.</param>
    94142    protected new void Invoke(Delegate method) {
    95143      // enforce context switch to improve GUI response time
     
    101149      if (!IsDisposed) EndInvoke(result);
    102150    }
     151    /// <summary>
     152    /// Asynchron call of GUI updating.
     153    /// </summary>
     154    /// <param name="method">The delegate to invoke.</param>
     155    /// <param name="args">The invoke arguments.</param>
    103156    protected new void Invoke(Delegate method, params object[] args) {
    104157      // enforce context switch to improve GUI response time
  • trunk/sources/HeuristicLab.Data/BoolData.cs

    r763 r776  
    9393    /// (see <see cref="GetXmlNode"/>).</remarks>
    9494    /// <param name="node">The <see cref="XmlNode"/> where the boolean value is saved.</param>
    95     /// <param name="restoredObjects">The dictionary of all already restored objects. (Needed to avoid cycles.)</param>
     95    /// <param name="restoredObjects">The dictionary of all already restored objects.
     96    /// (Needed to avoid cycles.)</param>
    9697    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    9798      base.Populate(node, restoredObjects);
Note: See TracChangeset for help on using the changeset viewer.