Free cookie consent management tool by TermsFeed Policy Generator

Changeset 737 for trunk/sources


Ignore:
Timestamp:
11/12/08 13:10:09 (15 years ago)
Author:
vdorfer
Message:

Created API documentation for HeuristLab.Data namespace (#331)

Location:
trunk/sources/HeuristicLab.Data
Files:
44 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Data/ArrayDataBase.cs

    r2 r737  
    2727
    2828namespace HeuristicLab.Data {
     29  /// <summary>
     30  /// An abstract base class for all kinds of arrays.
     31  /// </summary>
    2932  public abstract class ArrayDataBase : ObjectData {
     33    /// <summary>
     34    /// Gets or sets the elements of the array.
     35    /// </summary>
     36    /// <remarks>Uses property <see cref="ObjectData.Data"/> of base class <see cref="ObjectData"/>.
     37    /// No own data storage present.</remarks>
    3038    public new virtual Array Data {
    3139      get { return (Array)base.Data; }
     
    3341    }
    3442
     43    /// <summary>
     44    /// The string representation of the array.
     45    /// </summary>
     46    /// <returns>The elements of the array as a string seperated by a semicolon.</returns>
    3547    public override string ToString() {
    3648      if (Data.Length <= 0) return "Empty Array";
  • trunk/sources/HeuristicLab.Data/ArrayDataBaseView.cs

    r344 r737  
    3030
    3131namespace HeuristicLab.Data {
     32  /// <summary>
     33  /// The visual representation of the class <see cref="ArrayDataBase"/>.
     34  /// </summary>
    3235  public partial class ArrayDataBaseView : ViewBase {
     36    /// <summary>
     37    /// Gets or sets the instance of the array to represent.
     38    /// </summary>
     39    /// <remarks>Uses property <see cref="HeuristicLab.Core.ViewBase.Item"/> of base class <see cref="ViewBase"/>.
     40    /// No own data storage present.</remarks>
    3341    public ArrayDataBase ArrayDataBase {
    3442      get { return (ArrayDataBase)Item; }
     
    3644    }
    3745
     46    /// <summary>
     47    /// Initializes a new instance of <see cref="ArrayDataBaseView"/>.
     48    /// </summary>
    3849    public ArrayDataBaseView() {
    3950      InitializeComponent();
    4051    }
    4152
     53    /// <summary>
     54    /// Removes the eventhandler from the underlying <see cref="ArrayDataBase"/>.
     55    /// </summary>
     56    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.
     57    /// </remarks>
    4258    protected override void RemoveItemEvents() {
    4359      ArrayDataBase.Changed -= new EventHandler(ArrayDataBase_Changed);
    4460      base.RemoveItemEvents();
    4561    }
     62    /// <summary>
     63    /// Adds an eventhandler to the underlying <see cref="ArrayDataBase"/>.
     64    /// </summary>
     65    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.
     66    /// </remarks>
    4667    protected override void AddItemEvents() {
    4768      base.AddItemEvents();
     
    4970    }
    5071
     72    /// <summary>
     73    /// Validates the given data.
     74    /// <note type="caution"> Needs to be overridden in each inherited class!</note>
     75    /// </summary>
     76    /// <exception cref="InvalidOperationException">Thrown when method is not
     77    /// overridden in inherited class.</exception>
     78    /// <param name="element">The data to validate.</param>
     79    /// <returns><c>true</c> if the data is valid, <c>false</c> otherwise.</returns>
    5180    protected virtual bool ValidateData(string element) {
    5281      throw new InvalidOperationException("ValidateData has to be overridden in each inherited class");
    5382    }
     83    /// <summary>
     84    /// Replaces an element at the given <paramref name="index"/>
     85    /// with the given <paramref name="element"/>.
     86    /// <note type="caution"> Needs to be overridden in each inherited class!</note>
     87    /// </summary>
     88    /// <exception cref="InvalidOperationException">Thrown when method is not
     89    /// overridden in inherited class.</exception>
     90    /// <param name="index">The position where to substitute the element.</param>
     91    /// <param name="element">The element to insert.</param>
    5492    protected virtual void SetArrayElement(int index, string element) {
    5593      throw new InvalidOperationException("SetArrayElement has to be overridden in each inherited class");
    5694    }
    5795
     96    /// <summary>
     97    /// Updates all controls and the elements of the table with the latest values.
     98    /// </summary>
    5899    protected override void UpdateControls() {
    59100      base.UpdateControls();
     
    90131    }
    91132
     133    /// <summary>
     134    /// Creates a new array having the specified number (<paramref name="newLength"/>) of elements of the
     135    /// current instance (starting from the beginning).
     136    /// </summary>
     137    /// <param name="newLength">The size/number of elements of the new array.</param>
    92138    private void CreateAndCopyArray(int newLength) {
    93139      Array newArray = Array.CreateInstance(ArrayDataBase.Data.GetType().GetElementType(), newLength);
  • trunk/sources/HeuristicLab.Data/BoolArrayData.cs

    r2 r737  
    2727
    2828namespace HeuristicLab.Data {
     29  /// <summary>
     30  /// An array consisting of boolean values.
     31  /// </summary>
    2932  public class BoolArrayData : ArrayDataBase {
     33    /// <summary>
     34    /// Gets or sets the boolean elements of the array.
     35    /// </summary>
     36    /// <remarks>Uses property <see cref="ArrayDataBase.Data"/> of base class <see cref="ArrayDataBase"/>.
     37    /// No own data storage present.</remarks>
    3038    public new bool[] Data {
    3139      get { return (bool[])base.Data; }
     
    3341    }
    3442
     43    /// <summary>
     44    /// Initializes a new instance of the <see cref="BoolArrayData"/> class.
     45    /// </summary>
    3546    public BoolArrayData() {
    3647      Data = new bool[0];
    3748    }
     49    /// <summary>
     50    /// Initializes a new instance of the <see cref="BoolArrayData"/> class.
     51    /// <note type="caution"> No CopyConstructor! <paramref name="data"/> is not copied!</note>
     52    /// </summary>
     53    /// <param name="data">The boolean array the instance should represent.</param>
    3854    public BoolArrayData(bool[] data) {
    3955      Data = data;
    4056    }
    4157
     58    /// <summary>
     59    /// Creates a new instance of the <see cref="BoolArrayDataView"/> class.
     60    /// </summary>
     61    /// <returns>The created instance of the <see cref="BoolArrayDataView"/>.</returns>
    4262    public override IView CreateView() {
    4363      return new BoolArrayDataView(this);
    4464    }
    4565
     66    /// <summary>
     67    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     68    /// </summary>
     69    /// <remarks>The boolean elements of the array are saved as string in the node's inner text, each element separated by a semicolon.</remarks>
     70    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     71    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     72    /// <param name="persistedObjects">A dictionary of all already persisted objects.
     73    /// (Needed to avoid cycles.)</param>
     74    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    4675    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    4776      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    4978      return node;
    5079    }
     80    /// <summary>
     81    /// Loads the persisted boolean array from the specified <paramref name="node"/>.
     82    /// </summary>
     83    /// <remarks> The elements of the boolean array must be saved in the node's inner
     84    /// text as a string, each element separated by a semicolon
     85    /// (see <see cref="GetXmlNode"/>).</remarks>
     86    /// <param name="node">The <see cref="XmlNode"/> where the instance is saved.</param>
     87    /// <param name="restoredObjects">A Dictionary of all already restored objects.
     88    /// (Needed to avoid cycles.)</param>
    5189    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    5290      base.Populate(node, restoredObjects);
     
    5795      Data = data;
    5896    }
    59 
     97    /// <summary>
     98    /// The point of intersection where an <see cref="IObjectDataVisitor"/>
     99    /// can change the elements of the array.
     100    /// </summary>
     101    /// <param name="visitor">The visitor that changes the element.</param>
    60102    public override void Accept(IObjectDataVisitor visitor) {
    61103      visitor.Visit(this);
  • trunk/sources/HeuristicLab.Data/BoolArrayDataView.cs

    r2 r737  
    2929
    3030namespace HeuristicLab.Data {
     31  /// <summary>
     32  /// The visual representation of the class <see cref="BoolArrayData"/>,
     33  /// symbolizing an array of boolean values.
     34  /// </summary>
    3135  public partial class BoolArrayDataView : ArrayDataBaseView {
     36    /// <summary>
     37    /// Gets or sets the instance of the boolean array to represent visually.
     38    /// </summary>
     39    /// <remarks>Uses property <see cref="ArrayDataBase"/> of
     40    /// base class <see cref="ArrayDataBaseView"/>. No own data storage present.</remarks>
    3241    public BoolArrayData BoolArrayData {
    33       get { return (BoolArrayData)base.Item; }
     42      get { return (BoolArrayData)base.ArrayDataBase; }
    3443      set { base.ArrayDataBase = value; }
    3544    }
    3645
     46    /// <summary>
     47    /// Initializes a new instance of the class <see cref="BoolArrayDataView"/>.
     48    /// </summary>
    3749    public BoolArrayDataView() {
    3850      InitializeComponent();
    3951    }
     52    /// <summary>
     53    /// Initializes a new instance of the class <see cref="BoolArrayDataView"/>
     54    /// with the given <paramref name="boolArrayData"/>.
     55    /// <note type="caution"> No CopyConstructor! <paramref name="boolArrayData"/> is not copied!</note>
     56    /// </summary>
     57    /// <param name="boolArrayData">The boolean array to represent visually.</param>
    4058    public BoolArrayDataView(BoolArrayData boolArrayData)
    4159      : this() {
     
    4361    }
    4462
     63    /// <summary>
     64    /// Sets the element on position <paramref name="index"/> to the
     65    /// given <paramref name="element"/> as boolean value.
     66    /// </summary>
     67    /// <param name="index">The position where to substitute the element.</param>
     68    /// <param name="element">The element to insert.</param>
    4569    protected override void SetArrayElement(int index, string element) {
    4670      bool result;
     
    5074    }
    5175
     76    /// <summary>
     77    /// Checks whether the given <paramref name="element"/> can be converted to a boolean value.
     78    /// </summary>
     79    /// <param name="element">The data to validate.</param>
     80    /// <returns><c>true</c> if the <paramref name="element"/> could be converted,
     81    /// <c>false</c> otherwise.</returns>
    5282    protected override bool ValidateData(string element) {
    5383      bool result;
  • trunk/sources/HeuristicLab.Data/BoolData.cs

    r2 r737  
    2727
    2828namespace HeuristicLab.Data {
     29  /// <summary>
     30  /// Class to represent boolean values.
     31  /// </summary>
    2932  public class BoolData : ObjectData {
     33    /// <summary>
     34    /// Gets or sets the boolean value.
     35    /// </summary>
     36    /// <remarks>Uses property <see cref="ObjectData.Data"/>
     37    /// of base class <see cref="ObjectData"/>. No own data storage present.</remarks>
    3038    public new bool Data {
    3139      get { return (bool)base.Data; }
     
    3341    }
    3442
     43    /// <summary>
     44    /// Initializes a new instance of <see cref="BoolData"/> with default value <c>false</c>.
     45    /// </summary>
    3546    public BoolData() {
    3647      Data = false;
    3748    }
     49    /// <summary>
     50    /// Initializes a new instance of <see cref="BoolData"/> with the boolean value <paramref name="data"/>.
     51    /// </summary>
     52    /// <param name="data">The boolean value to assign.</param>
    3853    public BoolData(bool data) {
    3954      Data = data;
    4055    }
    41 
     56    /// <summary>
     57    /// Creates a new instance of the <see cref="BoolDataView"/> class.
     58    /// </summary>
     59    /// <returns>The created instance of the <see cref="BoolDataView"/>.</returns>
    4260    public override IView CreateView() {
    4361      return new BoolDataView(this);
    4462    }
    4563
     64    /// <summary>
     65    /// Clones the current instance.
     66    /// </summary>
     67    /// <remarks>The cloned instance is added to the <paramref name="dictionary"/>.</remarks>
     68    /// <param name="clonedObjects">Dictionary of all already cloned objects.</param>
     69    /// <returns>The cloned instance as <see cref="BoolData"/>.</returns>
    4670    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    4771      BoolData clone = new BoolData();
     
    5074      return clone;
    5175    }
    52 
     76    /// <summary>
     77    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     78    /// </summary>
     79    /// <remarks>The boolean value is saved as string in the inner text of the node.</remarks>
     80    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     81    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     82    /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     83    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    5384    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    5485      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    5687      return node;
    5788    }
     89    /// <summary>
     90    /// Loads the persisted boolean value from the specified <paramref name="node"/>.
     91    /// </summary>
     92    /// <remarks> The boolean value must be saved as string in the node's inner text
     93    /// (see <see cref="GetXmlNode"/>).</remarks>
     94    /// <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>
    5896    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    5997      base.Populate(node, restoredObjects);
     
    6199    }
    62100
     101    /// <summary>
     102    /// The point of intersection where an <see cref="IObjectDataVisitor"/>
     103    /// can change the boolean element.
     104    /// </summary>
     105    /// <param name="visitor">The visitor that changes the element.</param>
    63106    public override void Accept(IObjectDataVisitor visitor) {
    64107      visitor.Visit(this);
  • trunk/sources/HeuristicLab.Data/BoolDataView.cs

    r2 r737  
    3030
    3131namespace HeuristicLab.Data {
     32  /// <summary>
     33  /// The visual representation of the class <see cref="BoolData"/>, symbolizing a boolean value.
     34  /// </summary>
    3235  public partial class BoolDataView : ViewBase {
     36    /// <summary>
     37    /// Gets or sets the boolean value to represent visually.
     38    /// </summary>
     39    /// <remarks>Uses property <see cref="HeuristicLab.Core.ViewBase.Item"/> of base class <see cref="ViewBase"/>.
     40    /// No own data storage present.</remarks>
    3341    public BoolData BoolData {
    3442      get { return (BoolData)Item; }
     
    3644    }
    3745
     46    /// <summary>
     47    /// Initializes a new instance of the class <see cref="BoolDataView"/>.
     48    /// </summary>
    3849    public BoolDataView() {
    3950      InitializeComponent();
    4051    }
     52    /// <summary>
     53    /// Initializes a new instance of the class <see cref="BoolDataView"/> with the given
     54    /// <paramref name="boolData"/>.
     55    /// <note type="caution"> No CopyConstructor! <paramref name="boolData"/> is not copied!</note>
     56    /// </summary>
     57    /// <param name="boolData">The boolean value to represent visually.</param>
    4158    public BoolDataView(BoolData boolData)
    4259      : this() {
     
    4461    }
    4562
     63    /// <summary>
     64    /// Removes the eventhandler from the underlying <see cref="BoolData"/>.
     65    /// </summary>
     66    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.
     67    /// </remarks>
    4668    protected override void RemoveItemEvents() {
    4769      BoolData.Changed -= new EventHandler(BoolData_Changed);
    4870      base.RemoveItemEvents();
    4971    }
     72    /// <summary>
     73    /// Adds an eventhandler to the underlying <see cref="BoolData"/>.
     74    /// </summary>
     75    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.
     76    /// </remarks>
    5077    protected override void AddItemEvents() {
    5178      base.AddItemEvents();
     
    5380    }
    5481
     82    /// <summary>
     83    /// Sets the <c>dataCheckBox</c> checked or unchecked according to the latest value.
     84    /// </summary>
    5585    protected override void UpdateControls() {
    5686      base.UpdateControls();
  • trunk/sources/HeuristicLab.Data/BoolMatrixData.cs

    r2 r737  
    2828
    2929namespace HeuristicLab.Data {
     30  /// <summary>
     31  /// A two-dimensional matrix consisting of boolean values.
     32  /// </summary>
    3033  public class BoolMatrixData : ArrayDataBase {
     34    /// <summary>
     35    /// Gets or sets the boolean elements of the matrix.
     36    /// </summary>
     37    /// <remarks>Uses the property <see cref="ArrayDataBase.Data"/> of base
     38    /// class <see cref="ArrayDataBase"/>. No own data storage present.</remarks>
    3139    public new bool[,] Data {
    3240      get { return (bool[,])base.Data; }
     
    3442    }
    3543
     44    /// <summary>
     45    /// Initializes a new instance of the <see cref="BoolMatrixData"/> class.
     46    /// </summary>
    3647    public BoolMatrixData() {
    3748      Data = new bool[1, 1];
    3849    }
     50    /// <summary>
     51    /// Initializes a new instance of the <see cref="BoolMatrixData"/> class.
     52    /// <note type="caution"> No CopyConstructor! <paramref name="data"/> is not copied!</note>
     53    /// </summary>
     54    /// <param name="data">The boolean matrix the instance should represent.</param>
    3955    public BoolMatrixData(bool[,] data) {
    4056      Data = data;
    4157    }
    4258
     59    /// <summary>
     60    /// Creates a new instance of the <see cref="BoolMatrixDataView"/> class.
     61    /// </summary>
     62    /// <returns>The created instance of the <see cref="BoolMatrixDataView"/>.</returns>
    4363    public override IView CreateView() {
    4464      return new BoolMatrixDataView(this);
    4565    }
    4666
     67    /// <summary>
     68    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     69    /// </summary>
     70    /// <remarks>The dimensions of the matrix are saved as attributes (<c>Dimension1</c>,<c>Dimension2</c>).<br/>
     71    /// The elements of the matrix are saved as string in the node's inner text,
     72    /// each element separated by a semicolon, all line by line.</remarks>
     73    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     74    /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>
     75    /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     76    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    4777    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    4878      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    5686      return node;
    5787    }
     88    /// <summary>
     89    /// Loads the persisted boolean matrix from the specified <paramref name="node"/>.
     90    /// </summary>
     91    /// <remarks>The dimensions of the matrix must be saved as Attributes (<c>Dimension1</c>, <c>Dimension2</c>). <br/>
     92    /// The elements of the matrix must be saved in the node's inner text as string,
     93    /// each element separated by a semicolon, line by line (see <see cref="GetXmlNode"/>).</remarks>
     94    /// <param name="node">The <see cref="XmlNode"/> where the instance is saved.</param>
     95    /// <param name="restoredObjects">The dictionary of all already restored objects. (Needed to avoid cycles.)</param>
    5896    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    5997      base.Populate(node, restoredObjects);
     
    69107      Data = data;
    70108    }
    71 
     109    /// <summary>
     110    /// The string representation of the matrix.
     111    /// </summary>
     112    /// <returns>The elements of the matrix as a string seperated by semicolons, line by line.</returns>
    72113    public override string ToString() {
    73114      StringBuilder builder = new StringBuilder();
     
    81122      return builder.ToString();
    82123    }
    83 
     124    /// <summary>
     125    /// The point of intersection where an <see cref="IObjectDataVisitor"/>
     126    /// can change the elements of the matrix.
     127    /// </summary>
     128    /// <param name="visitor">The visitor that changes the elements.</param>
    84129    public override void Accept(IObjectDataVisitor visitor) {
    85130      visitor.Visit(this);
  • trunk/sources/HeuristicLab.Data/BoolMatrixDataView.cs

    r2 r737  
    2929
    3030namespace HeuristicLab.Data {
     31  /// <summary>
     32  /// The visual representation of the class <see cref="BoolMatrixData"/>, symbolizing a two-dimensional
     33  /// matrix of boolean values.
     34  /// </summary>
    3135  public partial class BoolMatrixDataView : MatrixDataBaseView {
     36    /// <summary>
     37    /// Gets or sets the instance of the boolean matrix to represent visually.
     38    /// </summary>
     39    /// <remarks>Uses property <see cref="ArrayDataBase"/> of
     40    /// base class <see cref="ArrayDataBaseView"/>. No own data storage present.</remarks>
    3241    public BoolMatrixData BoolMatrixData {
    33       get { return (BoolMatrixData)base.Item; }
     42      get { return (BoolMatrixData)base.ArrayDataBase; }
    3443      set { base.ArrayDataBase = value; }
    3544    }
    3645
     46    /// <summary>
     47    /// Initializes a new instance of the class <see cref="BoolMatrixDataView"/>.
     48    /// </summary>
    3749    public BoolMatrixDataView() {
    3850      InitializeComponent();
    3951    }
     52    /// <summary>
     53    /// Initializes a new instance of the class <see cref="BoolMatrixDataView"/> with the given
     54    /// <paramref name="boolMatrixData"/>.
     55    /// <note type="caution"> No CopyConstructor! <paramref name="boolMatrixData"/> is not copied!</note>
     56    /// </summary>
     57    /// <param name="boolMatrixData">The boolean matrix to represent visually.</param>
    4058    public BoolMatrixDataView(BoolMatrixData boolMatrixData)
    4159      : this() {
     
    4361    }
    4462
     63    /// <summary>
     64    /// Subsitutes an element in the given <paramref name="row"/> and the given
     65    /// <paramref name="column"/> with the given <paramref name="element"/>.
     66    /// </summary>
     67    /// <param name="row">The row of the element to substitute.</param>
     68    /// <param name="column">The column of the element to substitute.</param>
     69    /// <param name="element">The element to insert.</param>
    4570    protected override void SetArrayElement(int row, int column, string element) {
    4671      bool result;
     
    5075    }
    5176
     77    /// <summary>
     78    /// Checks whether the given <paramref name="element"/> can be converted to a boolean value.
     79    /// </summary>
     80    /// <param name="element">The element to check.</param>
     81    /// <returns><c>true</c> if the <paramref name="element"/> could be converted,
     82    /// <c>false</c> otherwise.</returns>
    5283    protected override bool ValidateData(string element) {
    5384      bool result;
  • trunk/sources/HeuristicLab.Data/ConstrainedDoubleData.cs

    r2 r737  
    2828
    2929namespace HeuristicLab.Data {
     30  /// <summary>
     31  /// Represents a double value having some constraints (e.g. smaller than 5.3).
     32  /// </summary>
    3033  public class ConstrainedDoubleData : ConstrainedObjectData {
     34    /// <summary>
     35    /// Gets or sets the double value of the current instance as <see cref="DoubleData"/>.
     36    /// </summary>
     37    /// <remarks>Uses property <see cref="ConstrainedObjectData.Data"/> of base
     38    /// class <see cref="ConstrainedObjectData"/>. No own data storage present.</remarks>
    3139    public new double Data {
    3240      get { return ((DoubleData)base.Data).Data; }
     
    3442    }
    3543
     44    /// <summary>
     45    /// Initializes a new instance of <see cref="ConstrainedDoubleData"/> with default value <c>0.0</c>.
     46    /// </summary>
    3647    public ConstrainedDoubleData() : this (0.0) {
    3748    }
     49    /// <summary>
     50    /// Initializes a new instance of <see cref="ConstrainedDoubleData"/> with the specified
     51    /// double value <paramref name="data"/> as <see cref="DoubleData"/>.
     52    /// </summary>
     53    /// <param name="data">The double value to represent.</param>
    3854    public ConstrainedDoubleData(double data) : base() {
    3955      base.Data = new DoubleData(data);
    4056    }
    4157
     58    /// <inheritdoc cref="ConstrainedObjectData.TrySetData(object)"/>
    4259    public virtual bool TrySetData(double data) {
    4360      return base.TrySetData(new DoubleData(data));
    4461    }
     62    /// <inheritdoc cref="ConstrainedObjectData.TrySetData(object, out System.Collections.Generic.ICollection&lt;HeuristicLab.Core.IConstraint&gt;)"/>
    4563    public virtual bool TrySetData(double data, out ICollection<IConstraint> violatedConstraints) {
    4664      return base.TrySetData(new DoubleData(data), out violatedConstraints);
    4765    }
    4866
     67    /// <summary>
     68    /// Creates a new instance of <see cref="ConstrainedDoubleDataView"/>.
     69    /// </summary>
     70    /// <returns>The created instance as <see cref="ConstrainedDoubleDataView"/>.</returns>
    4971    public override IView CreateView() {
    5072      return new ConstrainedDoubleDataView(this);
    5173    }
    5274
     75    /// <summary>
     76    /// Clones the current instance.
     77    /// </summary>
     78    /// <remarks>Uses the <see cref="ConstrainedObjectData.Clone"/> implementation of base class <see cref="ConstrainedObjectData"/>.</remarks>
     79    /// <param name="clonedObjects">A dictionary of all already cloned objects.</param>
     80    /// <returns>The cloned instance as <see cref="ConstrainedDoubleData"/>.</returns>
    5381    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    5482      ConstrainedDoubleData clone = (ConstrainedDoubleData)base.Clone(clonedObjects);
     
    5684    }
    5785
     86    /// <summary>
     87    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     88    /// </summary>
     89    /// <remarks>Uses the <see cref="ConstrainedItemBase.GetXmlNode"/> implementation of base class
     90    /// <see cref="ConstrainedObjectData"/>. The double value is saved as a <see cref="DoubleData"/>
     91    /// in a child node having the tag name <c>Value</c>.</remarks>
     92    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     93    /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>
     94    /// <param name="persistedObjects">A dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     95    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    5896    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    5997      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    6199      return node;
    62100    }
     101    /// <summary>
     102    /// Loads the persisted double value from the specified <paramref name="node"/>.
     103    /// </summary>
     104    /// <remarks>The double value must be saved in the child node as a persisted <see cref="DoubleData"/>
     105    /// having the tag name <c>Value</c> (see <see cref="GetXmlNode"/>).</remarks>
     106    /// <param name="node">The <see cref="XmlNode"/> where the double is saved.</param>
     107    /// <param name="restoredObjects">A dictionary of all already restored objects. (Needed to avoid cycles.)</param>
    63108    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    64109      base.Populate(node, restoredObjects);
     
    66111    }
    67112
     113    /// <summary>
     114    /// The point of intersection where an <see cref="IObjectDataVisitor"/>
     115    /// can change the double value.
     116    /// </summary>
     117    /// <param name="visitor">The visitor that changes the element.</param>
    68118    public override void Accept(IObjectDataVisitor visitor) {
    69119      visitor.Visit(this);
  • trunk/sources/HeuristicLab.Data/ConstrainedDoubleDataView.cs

    r344 r737  
    3030
    3131namespace HeuristicLab.Data {
     32  /// <summary>
     33  /// The visual representation of the class <see cref="ConstrainedDoubleData"/>,
     34  /// symbolizing a double value being restricted to some constraints.
     35  /// </summary>
    3236  public partial class ConstrainedDoubleDataView : ViewBase {
     37    /// <summary>
     38    /// Gets or sets the double value to represent visually.
     39    /// </summary>
     40    /// <remarks>Uses property <see cref="HeuristicLab.Core.ViewBase.Item"/> of base class <see cref="ViewBase"/>,
     41    /// but also own data storage present.</remarks>
    3342    public ConstrainedDoubleData ConstrainedDoubleData {
    3443      get { return (ConstrainedDoubleData)Item; }
     
    3948    }
    4049
     50    /// <summary>
     51    /// Initializes a new instance of the class <see cref="ConstrainedDoubleDataView"/>.
     52    /// </summary>
    4153    public ConstrainedDoubleDataView() {
    4254      InitializeComponent();
    4355    }
     56    /// <summary>
     57    /// Initializes a new instance of the class <see cref="ConstrainedDoubleDataView"/> with the given
     58    /// <paramref name="constraintDoubleData"/>.
     59    /// <note type="caution"> No CopyConstructor! <paramref name="constraintDoubleData"/> is not copied!</note>
     60    /// </summary>
     61    /// <param name="constraintDoubleData">The double value to represent visually.</param>
    4462    public ConstrainedDoubleDataView(ConstrainedDoubleData constraintDoubleData)
    4563      : this() {
     
    4765    }
    4866
     67    /// <summary>
     68    /// Removes the eventhandler from the underlying <see cref="ConstrainedDoubleData"/>.
     69    /// </summary>
     70    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.
     71    /// </remarks>
    4972    protected override void RemoveItemEvents() {
    5073      ConstrainedDoubleData.Changed -= new EventHandler(ConstrainedDoubleData_Changed);
    5174      base.RemoveItemEvents();
    5275    }
     76    /// <summary>
     77    /// Adds an eventhandler to the underlying <see cref="ConstrainedDoubleData"/>.
     78    /// </summary>
     79    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.
     80    /// </remarks>
    5381    protected override void AddItemEvents() {
    5482      base.AddItemEvents();
     
    5684    }
    5785
     86    /// <summary>
     87    /// Updates the constrols with the latest double value.
     88    /// </summary>
    5889    protected override void UpdateControls() {
    5990      base.UpdateControls();
  • trunk/sources/HeuristicLab.Data/ConstrainedIntData.cs

    r2 r737  
    2828
    2929namespace HeuristicLab.Data {
     30  /// <summary>
     31  /// The representation of an int value having some constraints (e.g. smaller than 2).
     32  /// </summary>
    3033  public class ConstrainedIntData : ConstrainedObjectData {
     34    /// <summary>
     35    /// Gets or sets the int value of the current instance as <see cref="IntData"/>.
     36    /// </summary>
     37    /// <remarks>Uses property <see cref="ConstrainedObjectData.Data"/> of base class
     38    /// <see cref="ConstrainedObjectData"/>. No own data storage present.</remarks>
    3139    public new int Data {
    3240      get { return ((IntData)base.Data).Data; }
     
    3442    }
    3543
     44    /// <summary>
     45    /// Initializes a new instance of <see cref="ConstrainedIntData"/> with default value <c>0</c>.
     46    /// </summary>
    3647    public ConstrainedIntData() : this (0) {
    3748    }
     49    /// <summary>
     50    /// Initializes a new instance of <see cref="ConstrainedIntData"/> with the specified
     51    /// int value <paramref name="data"/> as <see cref="IntData"/>.
     52    /// </summary>
     53    /// <param name="data">The integer value to represent.</param>
    3854    public ConstrainedIntData(int data) : base() {
    3955      base.Data = new IntData(data);
    4056    }
    4157
     58    /// <inheritdoc cref="ConstrainedObjectData.TrySetData(object)"/>
    4259    public virtual bool TrySetData(int data) {
    4360      return base.TrySetData(new IntData(data));
    4461    }
     62    /// <inheritdoc cref="ConstrainedObjectData.TrySetData(object, out System.Collections.Generic.ICollection&lt;HeuristicLab.Core.IConstraint&gt;)"/>
    4563    public virtual bool TrySetData(int data, out ICollection<IConstraint> violatedConstraints) {
    4664      return base.TrySetData(new IntData(data), out violatedConstraints);
    4765    }
    4866
     67    /// <summary>
     68    /// Creates a new instance of <see cref="ConstrainedIntDataView"/>.
     69    /// </summary>
     70    /// <returns>The created instance as <see cref="ConstrainedIntDataView"/>.</returns>
    4971    public override IView CreateView() {
    5072      return new ConstrainedIntDataView(this);
    5173    }
    5274
     75    /// <summary>
     76    /// Clones the current instance.
     77    /// </summary>
     78    /// <remarks>Uses the <see cref="ConstrainedObjectData.Clone"/> implementation of base class <see cref="ConstrainedObjectData"/>.</remarks>
     79    /// <param name="clonedObjects">A dictionary of all already cloned objects.</param>
     80    /// <returns>The clone instance as <see cref="ConstrainedIntData"/>.</returns>
    5381    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    5482      ConstrainedIntData clone = (ConstrainedIntData)base.Clone(clonedObjects);
     
    5684    }
    5785
     86    /// <summary>
     87    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     88    /// </summary>
     89    /// <remarks>Uses the <see cref="ConstrainedItemBase.GetXmlNode"/> implementation of base class
     90    /// <see cref="ConstrainedObjectData"/>. The int value is saved as a <see cref="IntData"/>
     91    /// in a child node having the tag name <c>Value</c>.</remarks>
     92    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     93    /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>
     94    /// <param name="persistedObjects">A dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     95    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    5896    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    5997      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    6199      return node;
    62100    }
     101    /// <summary>
     102    /// Loads the persisted int value from the specified <paramref name="node"/>.
     103    /// </summary>
     104    /// <remarks>The int value must be saved in the child node as a persisted <see cref="IntData"/>
     105    /// having the tag name <c>Value</c> (see <see cref="GetXmlNode"/>).</remarks>
     106    /// <param name="node">The <see cref="XmlNode"/> where the int is saved.</param>
     107    /// <param name="restoredObjects">A dictionary of all already restored objects. (Needed to avoid cycles.)</param>
    63108    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    64109      base.Populate(node, restoredObjects);
     
    66111    }
    67112
     113    /// <summary>
     114    /// The point of intersection where an <see cref="IObjectDataVisitor"/>
     115    /// can change the int element.
     116    /// </summary>
     117    /// <param name="visitor">The visitor that changes the element.</param>
    68118    public override void Accept(IObjectDataVisitor visitor) {
    69119      visitor.Visit(this);
  • trunk/sources/HeuristicLab.Data/ConstrainedIntDataView.cs

    r2 r737  
    3030
    3131namespace HeuristicLab.Data {
     32  /// <summary>
     33  /// The visual representation of the class <see cref="ConstrainedIntDataView"/>,
     34  /// symbolizing an int value with some constraints.
     35  /// </summary>
    3236  public partial class ConstrainedIntDataView : ViewBase {
     37    /// <summary>
     38    /// Gets or sets the int value to represent visually.
     39    /// </summary>
     40    /// <remarks>Uses property <see cref="HeuristicLab.Core.ViewBase.Item"/> of base class <see cref="ViewBase"/>,
     41    /// but also own data storage present.</remarks>
    3342    public ConstrainedIntData ConstrainedIntData {
    3443      get { return (ConstrainedIntData)Item; }
     
    3948    }
    4049
     50    /// <summary>
     51    /// Initializes a new instance of class <see cref="ConstrainedIntDataView"/>.
     52    /// </summary>
    4153    public ConstrainedIntDataView() {
    4254      InitializeComponent();
    4355    }
     56    /// <summary>
     57    /// Initializes a new instance of class <see cref="ConstrainedIntDataView"/> with the given
     58    /// <paramref name="constraintIntData"/>.
     59    /// <note type="caution"> No CopyConstructor! <paramref name="constraintIntData"/> is not copied!</note>
     60    /// </summary>
     61    /// <param name="constraintIntData">The int value to represent visually.</param>
    4462    public ConstrainedIntDataView(ConstrainedIntData constraintIntData)
    4563      : this() {
     
    4765    }
    4866
     67    /// <summary>
     68    /// Removes the eventhandler from the underlying <see cref="ConstrainedIntData"/>.
     69    /// </summary>
     70    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.
     71    /// </remarks>
    4972    protected override void RemoveItemEvents() {
    5073      ConstrainedIntData.Changed -= new EventHandler(ConstrainedIntData_Changed);
    5174      base.RemoveItemEvents();
    5275    }
     76    /// <summary>
     77    /// Adds an eventhandler to the underlying <see cref="ConstrainedIntData"/>.
     78    /// </summary>
     79    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.
     80    /// </remarks>
    5381    protected override void AddItemEvents() {
    5482      base.AddItemEvents();
     
    5684    }
    5785
     86    /// <summary>
     87    /// Updates the controls with the latest int value.
     88    /// </summary>
    5889    protected override void UpdateControls() {
    5990      base.UpdateControls();
  • trunk/sources/HeuristicLab.Data/ConstrainedItemList.cs

    r732 r737  
    2828
    2929namespace HeuristicLab.Data {
     30  /// <summary>
     31  /// A class representing a list of elements
     32  /// (which are implementing the interface <see cref="IItem"/>) having some constraints.
     33  /// </summary>
    3034  public class ConstrainedItemList : ConstrainedItemBase, IEnumerable, IEnumerable<IItem> {
    3135    private List<IItem> list;
    3236    private bool suspendConstraintCheck;
    3337
     38    /// <summary>
     39    /// Checks whether the test for the constraints is suspended.
     40    /// </summary>
    3441    public bool ConstraintCheckSuspended {
    3542      get { return suspendConstraintCheck; }
    3643    }
    3744
     45    /// <summary>
     46    /// Initializes a new instance of <see cref="ConstrainedItemList"/> with the constraint check enabled.
     47    /// </summary>
    3848    public ConstrainedItemList()
    3949      : base() {
     
    4252    }
    4353
     54    /// <summary>
     55    /// Creates a new instance of <see cref="ConstrainedItemListView"/>.
     56    /// </summary>
     57    /// <returns>The created instance as <see cref="ConstrainedItemListView"/>.</returns>
    4458    public override IView CreateView() {
    4559      return new ConstrainedItemListView(this);
     
    4761
    4862    #region Clone & Persistence
     63    /// <summary>
     64    /// Clones the current instance.
     65    /// </summary>
     66    /// <remarks>The elements of the current instance are cloned with the
     67    /// <see cref="HeuristicLab.Core.Auxiliary.Clone"/> method of the class <see cref="Auxiliary"/>.</remarks>
     68    /// <param name="clonedObjects">A dictionary of all already cloned objects.</param>
     69    /// <returns>The cloned instance as <see cref="ConstrainedItemList"/>.</returns>
    4970    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    5071      ConstrainedItemList clone = new ConstrainedItemList();
     
    5980    }
    6081
     82    /// <summary>
     83    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     84    /// </summary>
     85    /// <remarks>The basic instance is saved through the call of
     86    /// <see cref="HeuristicLab.Core.ConstrainedItemBase.GetXmlNode"/> of base class
     87    /// <see cref="ConstrainedItemBase"/>. <br/>
     88    /// The list itself is saved as child node having the tag name <c>ListItems</c>
     89    /// and each element is saved as a child node of the <c>ListItems</c> node.
     90    /// The <c>suspendConstraintCheck</c> attribute is saved as an attribute of the list node
     91    /// having the tag name <c>SuspendConstraintCheck</c>.</remarks>
     92    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     93    /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>
     94    /// <param name="persistedObjects">A dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     95    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    6196    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    6297      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    71106    }
    72107
     108    /// <summary>
     109    /// Loads the persisted int value from the specified <paramref name="node"/>.
     110    /// </summary>
     111    /// <remarks>The elements of the list must be saved as child nodes of
     112    /// the node with the tag name <c>ListItems</c>, which itself is a child node of the current instance.<br/>
     113    /// The <c>suspendConstraintCheck</c> must be saved as attribute of the list node
     114    /// with the tag name <c>SuspendConstraintCheck</c> (see <see cref="GetXmlNode"/>).</remarks>
     115    /// <param name="node">The <see cref="XmlNode"/> where the int is saved.</param>
     116    /// <param name="restoredObjects">A dictionary of all already restored objects. (Needed to avoid cycles.)</param>
    73117    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    74118      base.Populate(node, restoredObjects);
     
    81125    #endregion
    82126
     127    /// <summary>
     128    /// The string representation of the current list instance.
     129    /// </summary>
     130    /// <returns>The current list as string, each element separated by a semicolon.
     131    /// "Empty List" if the list has no elements.</returns>
    83132    public override string ToString() {
    84133      if (list.Count > 0) {
     
    95144    }
    96145
     146    /// <inheritdoc cref="List&lt;T&gt;.IndexOf(T)"/>
    97147    public int IndexOf(IItem item) {
    98148      return list.IndexOf(item);
    99149    }
    100150
     151    /// <summary>
     152    /// Sets <c>suspendConstraintCheck</c> to <c>true</c>.
     153    /// </summary>
    101154    public void BeginCombinedOperation() {
    102155      suspendConstraintCheck = true;
    103156    }
    104157
     158    /// <summary>
     159    /// Checks whether the current instance fulfills all constraints.
     160    /// </summary>
     161    /// <param name="violatedConstraints">Output parameter,
     162    /// contains all constraints that could not be fulfilled.</param>
     163    /// <returns><c>true</c> if all constraints could be fulfilled, <c>false</c> otherwise.</returns>
    105164    public bool EndCombinedOperation(out ICollection<IConstraint> violatedConstraints) {
    106165      if (IsValid(out violatedConstraints))
     
    112171    }
    113172
     173    /// <summary>
     174    /// Adds a new <paramref name="item"/> at a specified <paramref name="index"/> to the current instance if all constraints are fulfilled.
     175    /// </summary>
     176    /// <remarks>Calls <see cref="OnItemAdded"/> if the insertion was successful.</remarks>
     177    /// <param name="index">The position where to insert the new element.</param>
     178    /// <param name="item">The new element to insert.</param>
     179    /// <param name="violatedConstraints">Output parameter, all constraints that could not be fulfilled.</param>
     180    /// <returns><c>true</c> if the insertion was successful, <c>false</c> otherwise.</returns>
    114181    public bool TryInsert(int index, IItem item, out ICollection<IConstraint> violatedConstraints) {
    115182      list.Insert(index, item);
     
    124191    }
    125192
     193    /// <summary>
     194    /// Removes an element at the specified <paramref name="index"/>
     195    /// from the current instance if all constraints are fulfilled.
     196    /// </summary>
     197    /// <remarks>Calls <see cref="OnItemRemoved"/> if the deletion was successful.</remarks>
     198    /// <param name="index">The position where to remove the element.</param>
     199    /// <param name="violatedConstraints">Output parameter, all constraints that could not be fulfilled.</param>
     200    /// <returns><c>true</c> if the element could be removed successfully, <c>false</c> otherwise.</returns>
    126201    public bool TryRemoveAt(int index, out ICollection<IConstraint> violatedConstraints) {
    127202      IItem item = list[index];
     
    137212    }
    138213
     214    /// <summary>
     215    /// Gets the element of the current instance at the specified <paramref name="index"/>.
     216    /// </summary>
     217    /// <param name="index">The position of the searched element.</param>
     218    /// <returns>The searched element as <see cref="IItem"/>.</returns>
    139219    public IItem this[int index] {
    140220      get { return list[index]; }
    141221    }
    142222
     223    /// <summary>
     224    /// Changes the element at a specified position if all constraints are fulfilled.
     225    /// </summary>
     226    /// <param name="index">The position where to change the element.</param>
     227    /// <param name="item">The element that replaces the current one.</param>
     228    /// <param name="violatedConstraints">Output parameter, all constraints that could not be fulfilled.</param>
     229    /// <returns><c>true</c> if the substitution was successful, <c>false</c> otherwise.</returns>
    143230    public bool TrySetAt(int index, IItem item, out ICollection<IConstraint> violatedConstraints) {
    144231      IItem backup = this[index];
     
    153240    }
    154241
     242    /// <summary>
     243    /// Adds a new <paramref name="item"/> to the current list if all constraints are fulfilled.
     244    /// </summary>
     245    /// <remarks>Calls <see cref="OnItemAdded"/> if the add was successful.</remarks>
     246    /// <param name="item">The element to add.</param>
     247    /// <param name="violatedConstraints">Output parameter, all constraints that could not be fulfilled.</param>
     248    /// <returns><c>true</c> if the element could be successfully added, <c>false</c> otherwise.</returns>
    155249    public bool TryAdd(IItem item, out ICollection<IConstraint> violatedConstraints) {
    156250      list.Add(item);
     
    164258      }
    165259    }
     260    /// <summary>
     261    /// Empties the current list.
     262    /// </summary>
     263    /// <remarks>Calls <see cref="OnCleared"/>.</remarks>
    166264    public void Clear() {
    167265      list.Clear();
    168266      OnCleared();
    169267    }
     268    /// <inheritdoc cref="List&lt;T&gt;.Contains"/>
    170269    public bool Contains(IItem item) {
    171270      return list.Contains(item);
    172271    }
     272    /// <inheritdoc cref="List&lt;T&gt;.CopyTo(T[],int)"/>
    173273    public void CopyTo(IItem[] array, int arrayIndex) {
    174274      list.CopyTo(array, arrayIndex);
    175275    }
     276    /// <inheritdoc cref="List&lt;T&gt;.Count"/>
    176277    public int Count {
    177278      get { return list.Count; }
    178279    }
     280    /// <summary>
     281    /// Checks whether the current instance is read-only.
     282    /// </summary>
     283    /// <remarks>Always returns <c>false</c>.</remarks>
    179284    public bool IsReadOnly {
    180285      get { return false; }
    181286    }
     287    /// <summary>
     288    /// Removes a specified <paramref name="item"/> from the
     289    /// current instance if all constraints are fulfilled.
     290    /// </summary>
     291    /// <param name="item">The element to remove.</param>
     292    /// <param name="violatedConstraints">Output parameter, all constraints that could not be fulfilled.</param>
     293    /// <returns><c>true</c> if the deletion was successful, <c>false</c> otherwise.</returns>
    182294    public bool TryRemove(IItem item, out ICollection<IConstraint> violatedConstraints) {
    183295      int index = list.IndexOf(item);
     
    190302    }
    191303
     304    /// <inheritdoc cref="List&lt;T&gt;.GetEnumerator"/>
    192305    public IEnumerator<IItem> GetEnumerator() {
    193306      return list.GetEnumerator();
    194307    }
    195308
     309    /// <inheritdoc cref="List&lt;T&gt;.GetEnumerator"/>
    196310    IEnumerator IEnumerable.GetEnumerator() {
    197311      return list.GetEnumerator();
    198312    }
    199313
     314    /// <summary>
     315    /// Occurs when a new item is added.
     316    /// </summary>
    200317    public event EventHandler<ItemIndexEventArgs> ItemAdded;
     318    /// <summary>
     319    /// Fires a new <c>ItemAdded</c> event.
     320    /// </summary>         
     321    /// <remarks>Calls <see cref="HeuristicLab.Core.ItemBase.OnChanged"/>.</remarks>
     322    /// <param name="item">The element that was added.</param>
     323    /// <param name="index">The position where the element was added.</param>
    201324    protected virtual void OnItemAdded(IItem item, int index) {
    202325      if (ItemAdded != null)
     
    204327      OnChanged();
    205328    }
     329    /// <summary>
     330    /// Occurs when an element is removed from the current instance.
     331    /// </summary>
    206332    public event EventHandler<ItemIndexEventArgs> ItemRemoved;
     333    /// <summary>
     334    /// Fires a new <c>ItemRemoved</c> event.
     335    /// </summary>
     336    /// <remarks>Calls <see cref="HeuristicLab.Core.ItemBase.OnChanged"/>.</remarks>
     337    /// <param name="item">The element that has been removed.</param>
     338    /// <param name="index">The position from where it has been removed.</param>
    207339    protected virtual void OnItemRemoved(IItem item, int index) {
    208340      if (ItemRemoved != null)
     
    210342      OnChanged();
    211343    }
     344    /// <summary>
     345    /// Occurs when the current list is emptied.
     346    /// </summary>
    212347    public event EventHandler Cleared;
     348    /// <summary>
     349    /// Fires a new <c>Cleared</c> event.
     350    /// </summary>
     351    /// <remarks>Calls <see cref="HeuristicLab.Core.ItemBase.OnChanged"/>.</remarks>
    213352    protected virtual void OnCleared() {
    214353      if (Cleared != null)
  • trunk/sources/HeuristicLab.Data/ConstrainedItemListView.cs

    r2 r737  
    3030
    3131namespace HeuristicLab.Data {
     32  /// <summary>
     33  /// The visual representation of the class <see cref="ConstrainedItemList"/>.
     34  /// </summary>
    3235  public partial class ConstrainedItemListView : ViewBase {
    3336    private ChooseItemDialog chooseItemDialog;
    3437
     38
     39    /// <summary>
     40    /// Gets or sets the item list to represent.
     41    /// </summary>
     42    /// <remarks>Uses property <see cref="HeuristicLab.Core.ViewBase.Item"/> of base class <see cref="ViewBase"/>.</remarks>
    3543    public ConstrainedItemList ConstrainedItemList {
    3644      get { return (ConstrainedItemList)base.Item; }
     
    3846    }
    3947
     48    /// <summary>
     49    /// Initializes a new instance of the class <see cref="ConstrainedItemListView"/>.
     50    /// </summary>
    4051    public ConstrainedItemListView() {
    4152      InitializeComponent();
     
    4354    }
    4455
     56    /// <summary>
     57    /// Initializes a new instance of the class <see cref="ConstrainedItemListView"/> with the given
     58    /// <paramref name="constrainedItemList"/>.
     59    /// <note type="caution"> No CopyConstructor! <paramref name="constrainedItemList"/> is not copied!</note>
     60    /// </summary>
     61    /// <param name="constrainedItemList">The item list to represent visually.</param>
    4562    public ConstrainedItemListView(ConstrainedItemList constrainedItemList)
    4663      : this() {
     
    4865    }
    4966
     67    /// <summary>
     68    /// Removes the eventhandlers from the underlying <see cref="ConstrainedItemList"/>.
     69    /// </summary>
     70    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.
     71    /// </remarks>
    5072    protected override void RemoveItemEvents() {
    5173      ConstrainedItemList.ItemAdded -= new EventHandler<ItemIndexEventArgs>(ConstrainedItemList_ItemAdded);
     
    5476      base.RemoveItemEvents();
    5577    }
    56 
     78   
     79    /// <summary>
     80    /// Adds eventhandlers to the underlying <see cref="ConstrainedItemList"/>.
     81    /// </summary>
     82    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.
     83    /// </remarks>
    5784    protected override void AddItemEvents() {
    5885      base.AddItemEvents();
     
    6289    }
    6390
     91    /// <summary>
     92    /// Updates all controls with the latest elements in the list.
     93    /// </summary>
    6494    protected override void UpdateControls() {
    6595      base.UpdateControls();
  • trunk/sources/HeuristicLab.Data/ConstrainedObjectData.cs

    r2 r737  
    2727
    2828namespace HeuristicLab.Data {
     29  /// <summary>
     30  /// A class representing all basic data types having some constraints.
     31  /// </summary>
    2932  public class ConstrainedObjectData : ConstrainedItemBase, IObjectData {
    3033    private object myData;
     34    /// <summary>
     35    /// Gets or sets the object with constraints to represent.
     36    /// </summary>
     37    /// <remarks>Calls <see cref="HeuristicLab.Core.ItemBase.OnChanged"/> in the setter.
     38    /// </remarks>
    3139    public virtual object Data {
    3240      get { return myData; }
     
    3947    }
    4048
     49    /// <summary>
     50    /// Assigns the new <paramref name="data"/> if it is valid according to the constraints.
     51    /// </summary>
     52    /// <param name="data">The data to assign.</param>
     53    /// <returns><c>true</c> if the new <paramref name="data"/> could be assigned, <c>false</c> otherwise.</returns>
    4154    public virtual bool TrySetData(object data) {
    4255      if (myData != data) {
     
    5366      return true;
    5467    }
     68    /// <summary>
     69    /// Assigns the new object <paramref name="data"/> if it is valid according to the constraints.
     70    /// </summary>
     71    /// <param name="data">The data to assign.</param>
     72    /// <param name="violatedConstraints">Output parameter, containing all constraints that could not be fulfilled.</param>
     73    /// <returns><c>true</c> if the new <paramref name="data"/> could be assigned, <c>false</c> otherwise.</returns>
    5574    public virtual bool TrySetData(object data, out ICollection<IConstraint> violatedConstraints) {
    5675      if (myData != data) {
     
    6988    }
    7089
     90    /// <summary>
     91    /// Clones the current object.
     92    /// </summary>
     93    /// <remarks>HeuristicLab data items are cloned with the <see cref="HeuristicLab.Core.Auxiliary.Clone"/> method of
     94    /// class <see cref="Auxiliary"/> (deep copy), all other items (like basic data types)
     95    /// are cloned with their own <c>Clone</c> methods (shadow copy).</remarks>
     96    /// <param name="clonedObjects">All already cloned objects.</param>
     97    /// <returns>The cloned object as <see cref="ConstrainedObjectData"/>.</returns>
    7198    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    7299      ConstrainedObjectData clone = (ConstrainedObjectData)base.Clone(clonedObjects);
     
    80107    }
    81108
     109    /// <summary>
     110    /// Compares the current instance to the given <paramref name="obj"/>.
     111    /// </summary>
     112    /// <remarks>Can also compare basic data types with their representing HeuristicLab data types
     113    /// (e.g. a <see cref="ConstrainedDoubleData"/> with a double value).</remarks>
     114    /// <exception cref="InvalidOperationException">Thrown when the current
     115    /// instance does not implement the interface <see cref="IComparable"/></exception>
     116    /// <param name="obj">The object to compare the current instance to.</param>
     117    /// <returns><c>0</c> if the objects are the same, a value smaller than zero when the current instance
     118    /// is smaller than the given <paramref name="obj"/> and a value greater than zero
     119    /// when the current instance is greater than the given <paramref name="obj"/>.</returns>
    82120    public int CompareTo(object obj) {
    83121      IComparable comparable = Data as IComparable;
     
    92130    }
    93131
     132    /// <summary>
     133    /// The string representation of the current instance.
     134    /// </summary>
     135    /// <returns>The current instance as a string.</returns>
    94136    public override string ToString() {
    95137      return Data.ToString();
    96138    }
    97139
     140    /// <summary>
     141    /// The point of intersection where an <see cref="IObjectDataVisitor"/>
     142    /// can change the element.
     143    /// </summary>
     144    /// <param name="visitor">The visitor that changes the element.</param>
    98145    public virtual void Accept(IObjectDataVisitor visitor) {
    99146      visitor.Visit(this);
  • trunk/sources/HeuristicLab.Data/DoubleArrayData.cs

    r344 r737  
    2828
    2929namespace HeuristicLab.Data {
     30  /// <summary>
     31  /// The representation of an array of double values.
     32  /// </summary>
    3033  public class DoubleArrayData : ArrayDataBase {
     34    /// <summary>
     35    /// Gets or sets the double elements of the array.
     36    /// </summary>
     37    /// <remarks>Uses property <see cref="ArrayDataBase.Data"/> of base class
     38    /// <see cref="ArrayDataBase"/>. No own data storage present.</remarks>
    3139    public new double[] Data {
    3240      get { return (double[])base.Data; }
     
    3442    }
    3543
     44    /// <summary>
     45    /// Initializes a new instance of the <see cref="DoubleArrayData"/> class.
     46    /// </summary>
    3647    public DoubleArrayData() {
    3748      Data = new double[0];
    3849    }
     50    /// <summary>
     51    /// Initializes a new instance of the <see cref="DoubleArrayData"/> class.
     52    /// <note type="caution"> No CopyConstructor! <paramref name="data"/> is not copied!</note>
     53    /// </summary>
     54    /// <param name="data">The double array the instance should represent.</param>
    3955    public DoubleArrayData(double[] data) {
    4056      Data = data;
    4157    }
    4258
     59    /// <summary>
     60    /// Creates a new instance of the <see cref="DoubleArrayDataView"/> class.
     61    /// </summary>
     62    /// <returns>The created instance of the <see cref="DoubleArrayDataView"/>.</returns>
    4363    public override IView CreateView() {
    4464      return new DoubleArrayDataView(this);
    4565    }
    4666
     67    /// <summary>
     68    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     69    /// </summary>
     70    /// <remarks>The double elements of the array are saved in the node's inner text as string,
     71    /// each element, whose format depends on the locale culture info, separated by a semicolon.</remarks>
     72    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     73    /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>
     74    /// <param name="persistedObjects">A dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     75    /// <returns>The saved <see cref="XmlNode"></see>.</returns>
    4776    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    4877      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    5079      return node;
    5180    }
     81   
     82    /// <summary>
     83    /// Loads the persisted double array from the specified <paramref name="node"/>.
     84    /// </summary>
     85    /// <remarks>The double elemets of the array must be saved in the inner text of the node as string,
     86    /// each element separated by a semicolon and formatted according to the locale culture info and
     87    /// its number format (see <see cref="GetXmlNode"/>).</remarks>
     88    /// <exception cref="System.FormatException">Thrown when a saved element cannot be parsed as a double value.</exception>
     89    /// <param name="node">The <see cref="XmlNode"></see> where the instance is saved.</param>
     90    /// <param name="restoredObjects">A dictionary of all already restored objects. (Needed to avoid cycles.)</param>
    5291    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    5392      base.Populate(node, restoredObjects);
     
    61100    }
    62101
     102    /// <summary>
     103    /// The string representation of the array, formatted according to the given <paramref name="format"/>.
     104    /// </summary>
     105    /// <param name="format">The <see cref="NumberFormatInfo"></see> the single double
     106    /// values should be formatted accordingly.</param>
     107    /// <returns>The elements of the array as string, each element separated by a semicolon and
     108    /// formatted according to the parameter <paramref name="format"/>.</returns>
    63109    private string ToString(NumberFormatInfo format) {
    64110      StringBuilder builder = new StringBuilder();
     
    72118    }
    73119
     120    /// <summary>
     121    /// The point of intersection where an <see cref="IObjectDataVisitor"/>
     122    /// can change the elements of the array.
     123    /// </summary>
     124    /// <param name="visitor">The visitor that changes the elements.</param>
    74125    public override void Accept(IObjectDataVisitor visitor) {
    75126      visitor.Visit(this);
  • trunk/sources/HeuristicLab.Data/DoubleArrayDataView.cs

    r344 r737  
    2929
    3030namespace HeuristicLab.Data {
     31  /// <summary>
     32  /// The visual representation of the class <see cref="DoubleArrayData"/>,
     33  /// symbolizing an array of double values.
     34  /// </summary>
    3135  public partial class DoubleArrayDataView : ArrayDataBaseView {
     36    /// <summary>
     37    /// Gets or sets the double array to represent as <see cref="DoubleArrayData"/>.
     38    /// </summary>
     39    /// <remarks>Uses property <see cref="ArrayDataBase"/> of
     40    /// base class <see cref="ArrayDataBaseView"/>. No own data storage present.</remarks>
    3241    public DoubleArrayData DoubleArrayData {
    33       get { return (DoubleArrayData)base.Item; }
     42      get { return (DoubleArrayData)base.ArrayDataBase; }
    3443      set { base.ArrayDataBase = value; }
    3544    }
    3645
     46    /// <summary>
     47    /// Initializes a new instance of the class <see cref="DoubleArrayDataView"/>.
     48    /// </summary>
    3749    public DoubleArrayDataView() {
    3850      InitializeComponent();
     
    4052      dataGridView.DefaultCellStyle.Format = "r";
    4153    }
     54    /// <summary>
     55    /// Initializes a new instance of the class <see cref="DoubleArrayDataView"/> with the given
     56    /// <paramref name="doubleArrayData"/>.
     57    /// <note type="caution"> No CopyConstructor! <paramref name="doubleArrayData"/> is not copied!</note>
     58    /// </summary>
     59    /// <param name="doubleArrayData">The double array to represent visually.</param>
    4260    public DoubleArrayDataView(DoubleArrayData doubleArrayData)
    4361      : this() {
     
    4563    }
    4664
     65    /// <summary>
     66    /// Sets the element on position <paramref name="index"/> to the
     67    /// given <paramref name="element"/> as double value.
     68    /// </summary>
     69    /// <param name="index">The position where to substitute the element.</param>
     70    /// <param name="element">The element to insert.</param>
    4771    protected override void SetArrayElement(int index, string element) {
    4872      double result;
     
    5276    }
    5377
     78    /// <summary>
     79    /// Checks whether the given <paramref name="element"/> can be converted to a double value.
     80    /// </summary>
     81    /// <param name="element">The data to validate.</param>
     82    /// <returns><c>true</c> if the <paramref name="element"/> could be converted,
     83    /// <c>false</c> otherwise.</returns>
    5484    protected override bool ValidateData(string element) {
    5585      double result;
  • trunk/sources/HeuristicLab.Data/DoubleData.cs

    r344 r737  
    2828
    2929namespace HeuristicLab.Data {
     30  /// <summary>
     31  /// Class to represent double values.
     32  /// </summary>
    3033  public class DoubleData : ObjectData {
     34    /// <summary>
     35    /// Gets or sets the double value.
     36    /// </summary>
     37    /// <remarks>Uses property <see cref="ObjectData.Data"/> of base class <see cref="ObjectData"></see>.
     38    /// No own data storage present.</remarks>
    3139    public new double Data {
    3240      get { return (double)base.Data; }
     
    3442    }
    3543
     44    /// <summary>
     45    /// Initializes a new instance of <see cref="DoubleData"/> with default value <c>0.0</c>.
     46    /// </summary>
    3647    public DoubleData() {
    3748      Data = 0.0;
    3849    }
     50    /// <summary>
     51    /// Initializes a new instance of <see cref="DoubleData"/>.
     52    /// <note type="caution"> No CopyConstructor! <paramref name="data"/> is not copied!</note>
     53    /// </summary>
     54    /// <param name="data">The double value the instance should represent.</param>
    3955    public DoubleData(double data) {
    4056      Data = data;
    4157    }
    4258
     59    /// <summary>
     60    /// Creates a new instance of the <see cref="DoubleDataView"/> class.
     61    /// </summary>
     62    /// <returns>The created instance of <see cref="DoubleDataView"/>.</returns>
    4363    public override IView CreateView() {
    4464      return new DoubleDataView(this);
    4565    }
    4666
     67    /// <summary>
     68    /// Clones the current instance and adds it to the dictionary <paramref name="clonedObjects"/>.
     69    /// </summary>
     70    /// <param name="clonedObjects">Dictionary of all already cloned objects.</param>
     71    /// <returns>The cloned instance as <see cref="DoubleData"/>.</returns>
    4772    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    4873      DoubleData clone = new DoubleData();
     
    5277    }
    5378
     79    /// <summary>
     80    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     81    /// </summary>
     82    /// <remarks>The double value is saved in the node's inner text as string,
     83    /// its format depending on the local culture info and its number format.</remarks>
     84    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     85    /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>
     86    /// <param name="persistedObjects">A dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     87    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    5488    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    5589      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    5791      return node;
    5892    }
     93    /// <summary>
     94    /// Loads the persisted double value from the specified <paramref name="node"/>.
     95    /// </summary>
     96    /// <remarks>The double value must be saved in the node's inner text as a string and
     97    /// formatted according to the locale culture info and
     98    /// its number format (see <see cref="GetXmlNode"/>).</remarks>
     99    /// <exception cref="System.FormatException">Thrown when the saved value cannot be parsed as a double value.</exception>
     100    /// <param name="node">The <see cref="XmlNode"/> where the double is saved.</param>
     101    /// <param name="restoredObjects">A dictionary of all already restored objects. (Needed to avoid cycles.)</param>
    59102    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    60103      base.Populate(node, restoredObjects);
     
    67110    }
    68111
     112    /// <summary>
     113    /// The point of intersection where an <see cref="IObjectDataVisitor"/>
     114    /// can change the elements of the matrix.
     115    /// </summary>
     116    /// <param name="visitor">The visitor that changes the elements.</param>
    69117    public override void Accept(IObjectDataVisitor visitor) {
    70118      visitor.Visit(this);
  • trunk/sources/HeuristicLab.Data/DoubleDataView.cs

    r344 r737  
    3030
    3131namespace HeuristicLab.Data {
     32  /// <summary>
     33  /// The visual representation of the class <see cref="DoubleData"/>, symbolizing a double value.
     34  /// </summary>
    3235  public partial class DoubleDataView : ViewBase {
     36    /// <summary>
     37    /// Gets or sets the double value to represent visually.
     38    /// </summary>
     39    /// <remarks>Uses property <see cref="HeuristicLab.Core.ViewBase.Item"/> of base class
     40    /// <see cref="ViewBase"/>. No own data storage present.</remarks>
    3341    public DoubleData DoubleData {
    3442      get { return (DoubleData)Item; }
     
    3644    }
    3745
     46    /// <summary>
     47    /// Initializes a new instance of the class <see cref="DoubleDataView"/>.
     48    /// </summary>
    3849    public DoubleDataView() {
    3950      InitializeComponent();
    4051    }
     52    /// <summary>
     53    /// Initializes a new instance of the class <see cref="DoubleDataView"/> with the given
     54    /// <paramref name="doubleData"/>.
     55    /// <note type="caution"> No CopyConstructor! <paramref name="doubleData"/> is not copied!</note>
     56    /// </summary>
     57    /// <param name="doubleData">The double value to represent visually.</param>
    4158    public DoubleDataView(DoubleData doubleData)
    4259      : this() {
     
    4461    }
    4562
     63    /// <summary>
     64    /// Removes the eventhandler from the underlying <see cref="DoubleData"/>.
     65    /// </summary>
     66    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.
     67    /// </remarks>
    4668    protected override void RemoveItemEvents() {
    4769      DoubleData.Changed -= new EventHandler(DoubleData_Changed);
    4870      base.RemoveItemEvents();
    4971    }
     72    /// <summary>
     73    /// Adds an eventhandler to the underlying <see cref="DoubleData"/>.
     74    /// </summary>
     75    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.
     76    /// </remarks>
    5077    protected override void AddItemEvents() {
    5178      base.AddItemEvents();
     
    5380    }
    5481
     82    /// <summary>
     83    /// Updates the controls with the latest double value.
     84    /// </summary>
    5585    protected override void UpdateControls() {
    5686      base.UpdateControls();
  • trunk/sources/HeuristicLab.Data/DoubleMatrixData.cs

    r344 r737  
    2828
    2929namespace HeuristicLab.Data {
     30  /// <summary>
     31  /// A two-dimensional matrix consisting of double values.
     32  /// </summary>
    3033  public class DoubleMatrixData : ArrayDataBase {
     34    /// <summary>
     35    /// Gets or sets the double elements of the matrix.
     36    /// </summary>
     37    /// <remarks>Uses property <see cref="ArrayDataBase.Data"/> of base
     38    /// class <see cref="ArrayDataBase"/>. No own data storage present.</remarks>
    3139    public new double[,] Data {
    3240      get { return (double[,])base.Data; }
     
    3442    }
    3543
     44    /// <summary>
     45    /// Initializes a new instance of the <see cref="DoubleMatrixData"/> class.
     46    /// </summary>
    3647    public DoubleMatrixData() {
    3748      Data = new double[1, 1];
    3849    }
     50    /// <summary>
     51    /// Initializes a new instance of the <see cref="DoubleMatrixData"/> class.
     52    /// <note type="caution"> No CopyConstructor! <paramref name="data"/> is not copied!</note>
     53    /// </summary>
     54    /// <param name="data">The two-dimensional double matrix the instance should represent.</param>
    3955    public DoubleMatrixData(double[,] data) {
    4056      Data = data;
    4157    }
    4258
     59    /// <summary>
     60    /// Creates a new instance of the <see cref="DoubleMatrixDataView"/> class.
     61    /// </summary>
     62    /// <returns>The created instance as <see cref="DoubleMatrixDataView"/>.</returns>
    4363    public override IView CreateView() {
    4464      return new DoubleMatrixDataView(this);
    4565    }
    4666
     67    /// <summary>
     68    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     69    /// </summary>
     70    /// <remarks>The dimensions of the matrix are saved as attributes (<c>Dimension1</c>,<c>Dimension2</c>),
     71    /// formatted according to the local culture info and its number format.<br/>
     72    /// The elements of the matrix are saved as string in the node's inner text,
     73    /// each element separated by a semicolon, all line by line, formatted according to the
     74    /// local number format.</remarks>
     75    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     76    /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>
     77    /// <param name="persistedObjects">A dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     78    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    4779    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    4880      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    5688      return node;
    5789    }
     90    /// <summary>
     91    /// Loads the persisted matrix from the specified <paramref name="node"/>.
     92    /// </summary>
     93    /// <remarks>The dimensions of the matrix must be saved as Attributes (<c>Dimension1</c>, <c>Dimension2</c>),
     94    /// formatted in the local number format. <br/>
     95    /// The elements of the matrix must be saved in the node's inner text as string,
     96    /// each element separated by a semicolon, line by line, formatted according to the local
     97    /// culture info and its number format (see <see cref="GetXmlNode"/>).</remarks>
     98    /// <exception cref="System.FormatException">Thrown when a saved element cannot be parsed as a double value.</exception>
     99    /// <param name="node">The <see cref="XmlNode"/> where the instance is saved.</param>
     100    /// <param name="restoredObjects">The dictionary of all already restored objects. (Needed to avoid cycles.)</param>
    58101    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    59102      base.Populate(node, restoredObjects);
     
    72115    }
    73116
     117    /// <summary>
     118    /// The string representation of the matrix.
     119    /// </summary>
     120    /// <returns>The elements of the matrix as a string, line by line, each element separated by a
     121    /// semicolon and formatted according to local number format.</returns>
    74122    public override string ToString() {
    75123      return ToString(CultureInfo.CurrentCulture.NumberFormat);
    76124    }
    77 
     125   
     126    /// <summary>
     127    /// The string representation of the matrix, considering a specified <paramref name="format"/>.
     128    /// </summary>
     129    /// <param name="format">The <see cref="NumberFormatInfo"/> the double values are formatted accordingly.</param>
     130    /// <returns>The elements of the matrix as a string, line by line, each element separated by a
     131    /// semicolon and formatted according to the specified <paramref name="format"/>.</returns>
    78132    private string ToString(NumberFormatInfo format) {
    79133      StringBuilder builder = new StringBuilder();
  • trunk/sources/HeuristicLab.Data/DoubleMatrixDataView.cs

    r344 r737  
    2929
    3030namespace HeuristicLab.Data {
     31  /// <summary>
     32  /// The visual representation of the class <see cref="DoubleMatrixData"/>, symbolizing a two-dimensional
     33  /// matrix of double values.
     34  /// </summary>
    3135  public partial class DoubleMatrixDataView : MatrixDataBaseView {
     36    /// <summary>
     37    /// Gets or sets the double matrix to represent visually.
     38    /// </summary>
     39    /// <remarks>Uses property <see cref="ArrayDataBase"/> of base class
     40    /// <see cref="MatrixDataBaseView"/>. No own data storage present.</remarks>
    3241    public DoubleMatrixData DoubleMatrixData {
    33       get { return (DoubleMatrixData)base.Item; }
     42      get { return (DoubleMatrixData)base.ArrayDataBase; }
    3443      set { base.ArrayDataBase = value; }
    3544    }
    3645
     46    /// <summary>
     47    /// Initializes a new instance of the class <see cref="DoubleMatrixDataView"/>.
     48    /// </summary>
    3749    public DoubleMatrixDataView() {
    3850      InitializeComponent();
    3951      // round-trip format for all cells
    4052      dataGridView.DefaultCellStyle.Format = "r";
    41     }
     53    }   
     54    /// <summary>
     55    /// Initializes a new instance of the class <see cref="DoubleMatrixDataView"/> with the given
     56    /// <paramref name="doubleMatrixData"/>.
     57    /// <note type="caution"> No CopyConstructor! <paramref name="doubleMatrixData"/> is not copied!</note>
     58    /// </summary>
     59    /// <param name="doubleMatrixData">The matrix of doubles to represent visually.</param>
    4260    public DoubleMatrixDataView(DoubleMatrixData doubleMatrixData)
    4361      : this() {
     
    4563    }
    4664
     65    /// <summary>
     66    /// Subsitutes an element in the given <paramref name="row"/> and the given
     67    /// <paramref name="column"/> with the given <paramref name="element"/>.
     68    /// </summary>
     69    /// <param name="row">The row of the element to substitute.</param>
     70    /// <param name="column">The column of the element to substitute.</param>
     71    /// <param name="element">The element to insert.</param>
    4772    protected override void SetArrayElement(int row, int column, string element) {
    4873      double result;
     
    5479    }
    5580
     81    /// <summary>
     82    /// Checks whether the given <paramref name="element"/> can be converted to a double value.
     83    /// </summary>
     84    /// <param name="element">The element to check.</param>
     85    /// <returns><c>true</c> if the <paramref name="element"/> could be converted,
     86    /// <c>false</c> otherwise.</returns>
    5687    protected override bool ValidateData(string element) {
    5788      double result;
  • trunk/sources/HeuristicLab.Data/EditKeyValueDialog.cs

    r187 r737  
    77
    88namespace HeuristicLab.Data {
     9  /// <summary>
     10  /// A visual representation to visualize a key-value pair.
     11  /// </summary>
    912  public partial class EditKeyValueDialog : Form {
    1013    private IItem key;
     14    /// <summary>
     15    /// Gets the current key.
     16    /// </summary>
    1117    public IItem Key {
    1218      get { return key; }
     
    1420
    1521    private IItem value;
     22    /// <summary>
     23    /// Gets the current value.
     24    /// </summary>
    1625    public IItem Value {
    1726      get { return value; }
    1827    }
    1928
     29    /// <summary>
     30    /// Initializes a new instance of the class <see cref="EditKeyValueDialog"/> with the given types of
     31    /// key and value.
     32    /// </summary>
     33    /// <param name="keyType">The type of the key.</param>
     34    /// <param name="valueType">The type of the value.</param>
    2035    public EditKeyValueDialog(Type keyType, Type valueType) {
    2136      InitializeComponent();
  • trunk/sources/HeuristicLab.Data/HeuristicLab.Data.csproj

    r582 r737  
    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>{F473D9AF-3F09-4296-9F28-3C65118DAFFA}</ProjectGuid>
  • trunk/sources/HeuristicLab.Data/HeuristicLabDataPlugin.cs

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

    r2 r737  
    2626
    2727namespace HeuristicLab.Data {
     28  /// <summary>
     29  /// Public interface to represent basic data types
     30  /// </summary>
    2831  public interface IObjectData : IItem, IComparable {
     32    /// <summary>
     33    /// Gets or sets the value of the object.
     34    /// </summary>
    2935    object Data { get; set; }
    3036
     37    /// <summary>
     38    /// The point of intersection where an <see cref="IObjectDataVisitor"/>
     39    /// can change the object.
     40    /// </summary>
     41    /// <param name="visitor">The visitor that changes the element.</param>
    3142    void Accept(IObjectDataVisitor visitor);
    3243  }
  • trunk/sources/HeuristicLab.Data/IObjectDataVisitor.cs

    r2 r737  
    2525
    2626namespace HeuristicLab.Data {
     27  /// <summary>
     28  /// A basic interface for all data visitors.
     29  /// </summary>
    2730  public interface IObjectDataVisitor {
    2831    void Visit(BoolData data);
  • trunk/sources/HeuristicLab.Data/IntArrayData.cs

    r2 r737  
    2828
    2929namespace HeuristicLab.Data {
     30  /// <summary>
     31  /// The representation of an array of integer values.
     32  /// </summary>
    3033  public class IntArrayData : ArrayDataBase {
     34    /// <summary>
     35    /// Gets or sets the int elements of the array.
     36    /// </summary>
     37    /// <remarks>Uses property <see cref="ArrayDataBase.Data"/> of base class <see cref="ArrayDataBase"/>.
     38    /// No own data storage present.</remarks>
    3139    public new int[] Data {
    3240      get { return (int[])base.Data; }
     
    3442    }
    3543
     44    /// <summary>
     45    /// Initializes a new instance of <see cref="IntArrayData"/>.
     46    /// </summary>
    3647    public IntArrayData() {
    3748      Data = new int[0];
    3849    }
     50    /// <summary>
     51    /// Initializes a new instance of <see cref="IntArrayData"/>.
     52    /// <note type="caution"> No CopyConstructor! <paramref name="data"/> is not copied!</note>
     53    /// </summary>
     54    /// <param name="data">The array of integers to represent.</param>
    3955    public IntArrayData(int[] data) {
    4056      Data = data;
    4157    }
    4258
     59    /// <summary>
     60    /// Creates a enw instance of <see cref="IntArrayDataView"/>.
     61    /// </summary>
     62    /// <returns>The created instance as <see cref="IntArrayDataView"/>.</returns>
    4363    public override IView CreateView() {
    4464      return new IntArrayDataView(this);
    4565    }
    4666
     67    /// <summary>
     68    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     69    /// </summary>
     70    /// <remarks>The int elements of the array are saved in the node's inner text as string,
     71    /// each element, whose format depends on the locale culture info, separated by a semicolon.</remarks>
     72    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     73    /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>
     74    /// <param name="persistedObjects">A dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     75    /// <returns>The saved <see cref="XmlNode"></see>.</returns>
    4776    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    4877      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    5079      return node;
    5180    }
     81    /// <summary>
     82    /// Loads the persisted int array from the specified <paramref name="node"/>.
     83    /// </summary>
     84    /// <remarks>The int elemets of the array must be saved in the inner text of the node as string,
     85    /// each element separated by a semicolon and formatted according to the locale culture info and
     86    /// its number format (see <see cref="GetXmlNode"/>).</remarks>
     87    /// <param name="node">The <see cref="XmlNode"></see> where the instance is saved.</param>
     88    /// <param name="restoredObjects">A dictionary of all already restored objects. (Needed to avoid cycles.)</param>
    5289    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    5390      base.Populate(node, restoredObjects);
     
    6198    }
    6299
     100    /// <summary>
     101    /// The string representation of the array, formatted according to the given <paramref name="format"/>.
     102    /// </summary>
     103    /// <param name="format">The <see cref="NumberFormatInfo"></see> the single int values
     104    /// should be formatted accordingly.</param>
     105    /// <returns>The elements of the array as string, each element separated by a semicolon
     106    /// and formatted according to the parameter <paramref name="format"/>.</returns>
    63107    private string ToString(NumberFormatInfo format) {
    64108      StringBuilder builder = new StringBuilder();
  • trunk/sources/HeuristicLab.Data/IntArrayDataView.cs

    r2 r737  
    2929
    3030namespace HeuristicLab.Data {
     31  /// <summary>
     32  /// The visual representation of the class <see cref="IntArrayData"/>,
     33  /// symbolizing an array of int values.
     34  /// </summary>
    3135  public partial class IntArrayDataView : ArrayDataBaseView {
     36    /// <summary>
     37    /// Gets or set the int array to represent visually.
     38    /// </summary>
     39    /// <remarks>Uses property <see cref="ArrayDataBase"/> of base class
     40    /// <see cref="ArrayDataBaseView"/>. No own data storage present.</remarks>
    3241    public IntArrayData IntArrayData {
    33       get { return (IntArrayData)base.Item; }
     42      get { return (IntArrayData)base.ArrayDataBase; }
    3443      set { base.ArrayDataBase = value; }
    3544    }
    3645
     46    /// <summary>
     47    /// Initializes a new instance of the class <see cref="IntArrayDataView"/>.
     48    /// </summary>
    3749    public IntArrayDataView() {
    3850      InitializeComponent();
    3951    }
     52    /// <summary>
     53    /// Initializes a new instance of the class <see cref="IntArrayDataView"/> with the given
     54    /// <paramref name="intArrayData"/>.
     55    /// <note type="caution"> No CopyConstructor! <paramref name="intArrayData"/> is not copied!</note>
     56    /// </summary>
     57    /// <param name="intArrayData">The int array to represent visually.</param>
    4058    public IntArrayDataView(IntArrayData intArrayData)
    4159      : this() {
     
    4361    }
    4462
     63    /// <summary>
     64    /// Subsitutes an element at the given
     65    /// <paramref name="index"/> with the given <paramref name="element"/>.
     66    /// </summary>
     67    /// <param name="index">The position of the element to substitute.</param>
     68    /// <param name="element">The element to insert.</param>
    4569    protected override void SetArrayElement(int index, string element) {
    4670      int result;
     
    5074    }
    5175
     76    /// <summary>
     77    /// Checks whether the given <paramref name="element"/> can be converted into a bool value.
     78    /// </summary>
     79    /// <param name="element">The element to check.</param>
     80    /// <returns><c>true</c> if the <paramref name="element"/> could be converted,
     81    /// <c>false</c> otherwise.</returns>
    5282    protected override bool ValidateData(string element) {
    5383      int result;
  • trunk/sources/HeuristicLab.Data/IntData.cs

    r2 r737  
    2828
    2929namespace HeuristicLab.Data {
     30  /// <summary>
     31  /// The representation of an int value.
     32  /// </summary>
    3033  public class IntData : ObjectData {
     34    /// <summary>
     35    /// Gets or sets the int value.
     36    /// </summary>
     37    /// <remarks>Uses property <see cref="ObjectData.Data"/> of base class <see cref="ObjectData"/>.
     38    /// No own data storage present.</remarks>
    3139    public new int Data {
    3240      get { return (int)base.Data; }
     
    3442    }
    3543
     44    /// <summary>
     45    /// Initializes a new instance of <see cref="IntData"/> with default value <c>0</c>.
     46    /// </summary>
    3647    public IntData() {
    3748      Data = 0;
    3849    }
     50    /// <summary>
     51    /// Initializes a new instance of <see cref="IntData"/>.
     52    /// </summary>
     53    /// <param name="data">The int value the current instance should represent.</param>
    3954    public IntData(int data) {
    4055      Data = data;
    4156    }
    4257
     58    /// <summary>
     59    /// Creates a new instance of the class <see cref="IntDataView"/>.
     60    /// </summary>
     61    /// <returns>The created instance as <see cref="IntDataView"/>.</returns>
    4362    public override IView CreateView() {
    4463      return new IntDataView(this);
    4564    }
    4665
     66    /// <summary>
     67    /// Clones the current instance.
     68    /// </summary>
     69    /// <remarks>Adds the cloned instance to the dictionary <paramref name="clonedObjects"/>.</remarks>
     70    /// <param name="clonedObjects">Dictionary of all already cloned objects.</param>
     71    /// <returns>The cloned instance as <see cref="IntData"/>.</returns>
    4772    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    4873      IntData clone = new IntData();
     
    5277    }
    5378
     79    /// <summary>
     80    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     81    /// </summary>
     82    /// <remarks>The int value is saved as string in the node's inner text,
     83    /// formatted according to the local culture info and its number format.</remarks>
     84    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     85    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     86    /// <param name="persistedObjects">A dictionary of all already persisted objects.(Needed to avoid cycles.)</param>
     87    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    5488    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    5589      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    5791      return node;
    5892    }
     93    /// <summary>
     94    ///  Loads the persisted int value from the specified <paramref name="node"/>.
     95    /// </summary>
     96    /// <remarks>The int value must be saved in the node's inner text as a string and
     97    /// formatted according to the locale culture info and
     98    /// its number format (see <see cref="GetXmlNode"/>).</remarks>
     99    /// <param name="node">The <see cref="XmlNode"/> where the int is saved.</param>
     100    /// <param name="restoredObjects">A dictionary of all already restored objects. (Needed to avoid cycles.)</param>
    59101    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    60102      base.Populate(node, restoredObjects);
     
    62104    }
    63105
     106    /// <summary>
     107    /// The point of intersection where an <see cref="IObjectDataVisitor"/>
     108    /// can change the int value.
     109    /// </summary>
     110    /// <param name="visitor">The visitor that changes the element.</param>
    64111    public override void Accept(IObjectDataVisitor visitor) {
    65112      visitor.Visit(this);
  • trunk/sources/HeuristicLab.Data/IntDataView.cs

    r2 r737  
    3030
    3131namespace HeuristicLab.Data {
     32  /// <summary>
     33  /// The visual representation of the class <see cref="IntData"/>, symbolizing an int value.
     34  /// </summary>
    3235  public partial class IntDataView : ViewBase {
     36    /// <summary>
     37    /// Gets or set the int value to represent visually.
     38    /// </summary>
     39    /// <remarks>Uses property <see cref="HeuristicLab.Core.ViewBase.Item"/> of base class <see cref="ViewBase"/>.
     40    /// No own data storage present.</remarks>
    3341    public IntData IntData {
    3442      get { return (IntData)Item; }
     
    3644    }
    3745
     46    /// <summary>
     47    /// Initializes a new instance of the class <see cref="IntDataView"/>.
     48    /// </summary>
    3849    public IntDataView() {
    3950      InitializeComponent();
    4051    }
     52    /// <summary>
     53    /// Initializes a new instance of the class <see cref="IntDataView"/> with the
     54    /// given <paramref name="intData"/>.
     55    /// <note type="caution"> No CopyConstructor! <paramref name="intData"/> is not copied!</note>
     56    /// </summary>
     57    /// <param name="intData">The integer value to represent visually.</param>
    4158    public IntDataView(IntData intData)
    4259      : this() {
     
    4461    }
    4562
     63    /// <summary>
     64    /// Removes the eventhandler from the underlying <see cref="IntData"/>.
     65    /// </summary>
     66    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.
     67    /// </remarks>
    4668    protected override void RemoveItemEvents() {
    4769      IntData.Changed -= new EventHandler(IntData_Changed);
    4870      base.RemoveItemEvents();
    4971    }
     72    /// <summary>
     73    /// Adds an eventhandler to the underlying <see cref="IntData"/>.
     74    /// </summary>
     75    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.
     76    /// </remarks>
    5077    protected override void AddItemEvents() {
    5178      base.AddItemEvents();
     
    5380    }
    5481
     82    /// <summary>
     83    /// Updates the controls with the latest int value.
     84    /// </summary>
    5585    protected override void UpdateControls() {
    5686      base.UpdateControls();
  • trunk/sources/HeuristicLab.Data/IntMatrixData.cs

    r2 r737  
    2828
    2929namespace HeuristicLab.Data {
     30  /// <summary>
     31  /// A two-dimensional matrix of integer values.
     32  /// </summary>
    3033  public class IntMatrixData : ArrayDataBase {
     34    /// <summary>
     35    /// Gets or sets the int values of the matrix.
     36    /// </summary>
     37    /// <remarks>Uses property <see cref="ArrayDataBase.Data"/> of base class <see cref="ArrayDataBase"/>.
     38    /// No own data storage present.</remarks>
    3139    public new int[,] Data {
    3240      get { return (int[,])base.Data; }
     
    3442    }
    3543
     44    /// <summary>
     45    /// Initializes a new instance of <see cref="IntMatrixData"/>.
     46    /// </summary>
    3647    public IntMatrixData() {
    3748      Data = new int[1, 1];
    3849    }
     50    /// <summary>
     51    /// Initializes a new instance of <see cref="IntMatrixData"/>.
     52    /// <note type="caution"> No CopyConstructor! <paramref name="data"/> is not copied!</note>
     53    /// </summary>
     54    /// <param name="data">The two-dimensional int matrix the instance should represent.</param>
    3955    public IntMatrixData(int[,] data) {
    4056      Data = data;
    4157    }
    4258
     59    /// <summary>
     60    /// Creates a new instance of <see cref="IntMatrixDataView"/>.
     61    /// </summary>
     62    /// <returns>The created instance as <see cref="IntMatrixDataView"/>.</returns>
    4363    public override IView CreateView() {
    4464      return new IntMatrixDataView(this);
    4565    }
    4666
     67    /// <summary>
     68    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     69    /// </summary>
     70    /// <remarks>The dimensions of the matrix are saved as attributes (<c>Dimension1</c>,<c>Dimension2</c>),
     71    /// formatted according to the local culture info and its number format.<br/>
     72    /// The elements of the matrix are saved as string in the node's inner text,
     73    /// each element separated by a semicolon, all line by line, formatted according to
     74    /// the local number format.</remarks>
     75    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     76    /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>
     77    /// <param name="persistedObjects">The dictionary of all already persisted objects.
     78    /// (Needed to avoid cycles.)</param>
     79    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    4780    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    4881      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    5689      return node;
    5790    }
     91    /// <summary>
     92    /// Loads the persisted int matrix from the specified <paramref name="node"/>.
     93    /// </summary>
     94    /// <remarks>The dimensions of the matrix must be saved as Attributes
     95    /// (<c>Dimension1</c>, <c>Dimension2</c>), formatted in the local number format. <br/>
     96    /// The elements of the matrix must be saved in the node's inner text as string,
     97    /// each element separated by a semicolon, line by line, formatted according to
     98    /// the local number format (see <see cref="GetXmlNode"/>).</remarks>
     99    /// <param name="node">The <see cref="XmlNode"/> where the instance is saved.</param>
     100    /// <param name="restoredObjects">The dictionary of all already restored objects. (Needed to avoid cycles.)</param>
    58101    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    59102      base.Populate(node, restoredObjects);
     
    70113    }
    71114
     115    /// <summary>
     116    /// The string representation of the matrix.
     117    /// </summary>
     118    /// <returns>The elements of the matrix as a string, line by line, each element separated by a
     119    /// semicolon and formatted according to the local number format.</returns>
    72120    public override string ToString() {
    73121      return ToString(CultureInfo.CurrentCulture.NumberFormat);
    74122    }
    75123
     124    /// <summary>
     125    /// The string representation of the matrix, considering a specified <paramref name="format"/>.
     126    /// </summary>
     127    /// <param name="format">The <see cref="NumberFormatInfo"/> the int values are formatted accordingly.</param>
     128    /// <returns>The elements of the matrix as a string, line by line, each element separated by a
     129    /// semicolon and formatted according to the specified <paramref name="format"/>.</returns>
    76130    private string ToString(NumberFormatInfo format) {
    77131      StringBuilder builder = new StringBuilder();
     
    86140    }
    87141
     142    /// <summary>
     143    /// The point of intersection where an <see cref="IObjectDataVisitor"/>
     144    /// can change the elements of the matrix.
     145    /// </summary>
     146    /// <param name="visitor">The visitor that changes the elements.</param>
    88147    public override void Accept(IObjectDataVisitor visitor) {
    89148      visitor.Visit(this);
  • trunk/sources/HeuristicLab.Data/IntMatrixDataView.cs

    r2 r737  
    2929
    3030namespace HeuristicLab.Data {
     31  /// <summary>
     32  /// The visual representation of the class <see cref="IntMatrixData"/>, symbolizing a two-dimensional
     33  /// matrix of int values.
     34  /// </summary>
    3135  public partial class IntMatrixDataView : MatrixDataBaseView {
     36    /// <summary>
     37    /// Gets or set the int matrix to represent visually.
     38    /// </summary>
     39    /// <remarks>Uses property <see cref="ArrayDataBase"/> of base class
     40    /// <see cref="MatrixDataBaseView"/>. No own data storage present.</remarks>
    3241    public IntMatrixData IntMatrixData {
    33       get { return (IntMatrixData)base.Item; }
     42      get { return (IntMatrixData)base.ArrayDataBase; }
    3443      set { base.ArrayDataBase = value; }
    3544    }
    3645
     46    /// <summary>
     47    /// Initializes a new instance of the class <see cref="IntMatrixDataView"/>.
     48    /// </summary>
    3749    public IntMatrixDataView() {
    3850      InitializeComponent();
    3951    }
     52    /// <summary>
     53    /// Initializes a new instance of the class <see cref="IntMatrixDataView"/> with the given
     54    /// <paramref name="intMatrixData"/>.
     55    /// <note type="caution"> No CopyConstructor! <paramref name="intMatrixData"/> is not copied!</note>
     56    /// </summary>
     57    /// <param name="intMatrixData">The matrix of integers to represent visually.</param>
    4058    public IntMatrixDataView(IntMatrixData intMatrixData)
    4159      : this() {
     
    4361    }
    4462
     63    /// <summary>
     64    /// Subsitutes an element in the given <paramref name="row"/> and the given
     65    /// <paramref name="column"/> with the given <paramref name="element"/>.
     66    /// </summary>
     67    /// <param name="row">The row of the element to substitute.</param>
     68    /// <param name="column">The column of the element to substitute.</param>
     69    /// <param name="element">The element to insert.</param>
    4570    protected override void SetArrayElement(int row, int column, string element) {
    4671      int result;
     
    5075    }
    5176
     77    /// <summary>
     78    /// Checks whether the given <paramref name="element"/> can be converted to an int value.
     79    /// </summary>
     80    /// <param name="element">The element to check.</param>
     81    /// <returns><c>true</c> if the <paramref name="element"/> could be converted,
     82    /// <c>false</c> otherwise.</returns>
    5283    protected override bool ValidateData(string element) {
    5384      int result;
  • trunk/sources/HeuristicLab.Data/ItemDictionaryView_T.cs

    r194 r737  
    99
    1010namespace HeuristicLab.Data {
     11  /// <summary>
     12  /// The visual representation of the class <see cref="HeuristicLab.Data.ItemDictionary&lt;K,V&gt;"/>.
     13  /// </summary>
     14  /// <typeparam name="K">The type of the keys of the dictionary.</typeparam>
     15  /// <typeparam name="V">The type of the values of the dictionary.</typeparam>
    1116  public partial class ItemDictionaryView<K, V> : ViewBase
    1217    where K : IItem
     
    1520    private EditKeyValueDialog editKeyValueDialog;
    1621
     22    /// <summary>
     23    /// Gets or sets the dictionary to represent visually.
     24    /// </summary>
     25    /// <remarks>Uses property <see cref="HeuristicLab.Core.ViewBase.Item"/> of base class <see cref="ViewBase"/>.
     26    /// No own data storage present.</remarks>
    1727    public ItemDictionary<K, V> ItemDictionary {
    1828      get { return (ItemDictionary<K, V>) Item; }
     
    2030    }
    2131
     32    /// <summary>
     33    /// Creates a new list view item with the given <paramref name="key"/> and <paramref name="value"/>.
     34    /// </summary>
     35    /// <param name="key">The key to show in the list item.</param>
     36    /// <param name="value">The value to show in the list item.</param>
     37    /// <returns>The created list item as <see cref="ListViewItem"/>.</returns>
    2238    private ListViewItem CreateListViewItem(K key, V value) {
    2339      ListViewItem item = new ListViewItem(key.ToString());
     
    2945    }
    3046
     47    /// <summary>
     48    /// Initializes a new instance of the class <see cref="ItemDictionaryView&lt;K,V&gt;"/>.
     49    /// </summary>
    3150    public ItemDictionaryView() {
    3251      InitializeComponent();
     
    3857    }
    3958
     59    /// <summary>
     60    /// Initializes a new instance of the class <see cref="ItemDictionaryView&lt;K,V&gt;"/> with the given
     61    /// <paramref name="dictionary"/>.
     62    /// <note type="caution"> No CopyConstructor! <paramref name="dictionary"/> is not copied!</note>
     63    /// </summary>
     64    /// <param name="dictionary">The dictionary to represent visually.</param>
    4065    public ItemDictionaryView(ItemDictionary<K, V> dictionary)
    4166      : this() {
     
    4368    }
    4469
     70    /// <summary>
     71    /// Removes the eventhandlers from the underlying
     72    /// <see cref="HeuristicLab.Data.ItemDictionary&lt;K,V&gt;"/>.
     73    /// </summary>
     74    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.
     75    /// </remarks>
    4576    protected override void RemoveItemEvents() {
    4677      ItemDictionary.ItemAdded -= new EventHandler<KeyValueEventArgs>(ItemDictionary_ItemInserted);
     
    5081    }
    5182
     83    /// <summary>
     84    /// Adds eventhandlers to the underlying <see cref="HeuristicLab.Data.ItemDictionary&lt;K,V&gt;"/>.
     85    /// </summary>
     86    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.
     87    /// </remarks>
    5288    protected override void AddItemEvents() {
    5389      base.AddItemEvents();
     
    128164
    129165    #region Update Controls
     166    /// <summary>
     167    /// Updates the controls with the latest elements of the dictionary.
     168    /// </summary>
    130169    protected override void UpdateControls() {
    131170      base.UpdateControls();
  • trunk/sources/HeuristicLab.Data/ItemDictionary_T.cs

    r187 r737  
    77
    88namespace HeuristicLab.Data {
     9  /// <summary>
     10  /// A dictionary having key-value pairs of the type <see cref="IItem"/>.
     11  /// </summary>
     12  /// <typeparam name="K">The type of the keys, which must implement the interface <see cref="IItem"/>.</typeparam>
     13  /// <typeparam name="V">The type of the values, which must imlement the interface <see cref="IItem"/>.</typeparam>
    914  public class ItemDictionary<K,V> : ItemBase, IDictionary<K,V>
    1015    where K : IItem
     
    1217    private Dictionary<K, V> dict;
    1318
     19    /// <summary>
     20    /// Gets the dictionary of key-value pairs.
     21    /// </summary>
    1422    public Dictionary<K, V> Dictionary {
    1523      get { return dict; }
    1624    }
    1725
     26    /// <summary>
     27    /// Initializes a new instance of <see cref="ItemDictionary&lt;TKey,TValue&gt;"/>.
     28    /// </summary>
     29    /// <remarks>Creates a new <see cref="Dictionary"/>
     30    /// having <see cref="IItem"/> as type of keys and values
     31    /// and a new <see cref="IItemKeyComparer&lt;T&gt;"/> as <see cref="IEqualityComparer"/>.</remarks>
    1832    public ItemDictionary() {
    1933      dict = new Dictionary<K, V>(new IItemKeyComparer<K>());
     
    2135
    2236    #region ItemBase Members
     37    /// <summary>
     38    /// Creates a new instance of <see cref="ItemDictionaryView&lt;K,V&gt;"/>.
     39    /// </summary>
     40    /// <returns>The created instance as <see cref="ItemDictionaryView&lt;K,V&gt;"/>.</returns>
    2341    public override IView CreateView() {
    2442      return new ItemDictionaryView<K,V>(this);
    2543    }
    2644
     45    /// <summary>
     46    /// Clones the current instance and adds it to the dictionary <paramref name="clonedObjects"/>.
     47    /// </summary>
     48    /// <remarks>Also the keys and values in the dictionary are cloned and saved to the dictionary <paramref name="clonedObjects"/>,
     49    /// when they are not already contained (deep copy).</remarks>
     50    /// <param name="clonedObjects">A dictionary of all already cloned objects.</param>
     51    /// <returns>The cloned instance as <see cref="ItemDictionary&lt;K,V&gt;"/>.</returns>
    2752    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    2853      ItemDictionary<K,V> clone = new ItemDictionary<K,V>();
     
    3459    }
    3560
     61    /// <summary>
     62    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     63    /// </summary>
     64    /// <remarks>Every key-value pair is saved as new child node with the tag name "KeyValuePair".<br/>
     65    /// In the child node the key is saved as a new child node with the tag name "Key".<br/>
     66    /// The value is also saved as new child node with the tag name "Val".
     67    /// </remarks>
     68    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     69    /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>
     70    /// <param name="persistedObjects">A dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     71    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    3672    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
    3773      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    4783    }
    4884
     85    /// <summary>
     86    /// Loads the persisted matrix from the specified <paramref name="node"/>.
     87    /// </summary>
     88    /// <remarks>All key-value pairs must be saved as child nodes of the node. <br/>
     89    /// Every child node has to contain two child nodes itself, one for the key, having the tag name "Key",
     90    /// and one for the value, having the tag name "Val" (see <see cref="GetXmlNode"/>).</remarks>
     91    /// <param name="node">The <see cref="XmlNode"/> where the instance is saved.</param>
     92    /// <param name="restoredObjects">The dictionary of all already restored objects. (Needed to avoid cycles.)</param>
    4993    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    5094      base.Populate(node, restoredObjects);
     
    56100    }
    57101
     102    /// <summary>
     103    /// The string representation of the dictionary
     104    /// </summary>
     105    /// <returns>The elements of the dictionary as string, each key-value pair in the format
     106    /// <c>Key:Value</c>, separated by a semicolon. <br/>
     107    /// If the dictionary contains no entries, "Empty Dictionary" is returned.</returns>
    58108    public override string ToString() {
    59109      if (dict.Count > 0) {
     
    74124    #region IDictionary<K,V> Members
    75125
     126    ///// <summary>
     127    ///// Adds a new key value pair to the dictionary.
     128    ///// </summary>
     129    /// <inheritdoc cref="System.Collections.Generic.Dictionary&lt;K,V&gt;.Add"/>
     130    /// <remarks>Calls <see cref="OnItemAdded"/>.</remarks>
     131    ///// <param name="key">The key to add.</param>
     132    ///// <param name="value">The value to add.</param>
    76133    public void Add(K key, V value) {
    77134      dict.Add(key, value);
     
    79136    }
    80137
     138    /// <inheritdoc cref="System.Collections.Generic.Dictionary&lt;TKey,TValue&gt;.ContainsKey"/>
    81139    public bool ContainsKey(K key) {
    82140      return dict.ContainsKey(key);
    83141    }
    84142
     143    /// <inheritdoc cref="System.Collections.Generic.Dictionary&lt;TKey,TValue&gt;.Keys"/>
    85144    public ICollection<K> Keys {
    86145      get { return dict.Keys; }
    87146    }
    88147
     148    /// <summary>
     149    /// Removes a key-value pair having the specified <paramref name="key"/>.
     150    /// </summary>
     151    /// <remarks>Calls <see cref="OnItemRemoved"/>.</remarks>
     152    /// <param name="key">The key of the key-value pair, which should be removed.</param>
     153    /// <returns><c>true</c> if the key was found and successfully removed,
     154    /// <c>false</c> if the key was not found.</returns>
    89155    public bool Remove(K key) {
    90156      V value = dict[key];
     
    94160    }
    95161
     162    /// <inheritdoc cref="System.Collections.Generic.Dictionary&lt;K,V&gt;.TryGetValue"/>
    96163    public bool TryGetValue(K key, out V value) {
    97164      return dict.TryGetValue(key, out value);
    98165    }
    99166
     167    /// <inheritdoc cref="System.Collections.Generic.Dictionary&lt;TKey,TValue&gt;.Values"/>
    100168    public ICollection<V> Values {
    101169      get { return dict.Values; }
    102170    }
    103171
     172    /// <summary>
     173    /// Gets or sets the value of a specified <paramref name="key"/>.
     174    /// </summary>
     175    /// <param name="key">The key of the value which should be received or changed.</param>
     176    /// <returns>The value of the <paramref name="key"/>.</returns>
    104177    public V this[K key] {
    105178      get { return dict[key]; }
     
    111184    #region ICollection<KeyValuePair<K,V>> Members
    112185
     186    /// <summary>
     187    /// Adds a key-value pair to the current instance.
     188    /// </summary>
     189    /// <remarks>Calls <see cref="OnItemAdded"/>.</remarks>
     190    /// <param name="item">The key-value pair to add.</param>
    113191    public void Add(KeyValuePair<K, V> item) {
    114192      dict.Add(item.Key, item.Value);
     
    116194    }
    117195
     196    ///// <summary>
     197    ///// Empties the dictionary.
     198    ///// </summary>
     199    /// <inheritdoc cref="System.Collections.Generic.Dictionary&lt;K,V&gt;.Clear"/>
     200    /// <remarks>Calls <see cref="OnCleared"/>.</remarks>
    118201    public void Clear() {
    119202      dict.Clear();
     
    121204    }
    122205
     206    /// <summary>
     207    /// Checks whether the specified key-value pair exists in the current instance of the dictionary.
     208    /// </summary>
     209    /// <param name="item">The key-value pair to check.</param>
     210    /// <returns><c>true</c> if both, the key and the value exist in the dictionary,
     211    /// <c>false</c> otherwise.</returns>
    123212    public bool Contains(KeyValuePair<K, V> item) {
    124213      return (dict.ContainsKey(item.Key) && dict[item.Key].Equals(item.Value));
    125214    }
    126215
     216    /// <summary>
     217    /// TODO
     218    /// </summary>
     219    /// <param name="array"></param>
     220    /// <param name="arrayIndex"></param>
    127221    public void CopyTo(KeyValuePair<K, V>[] array, int arrayIndex) {
    128222      throw new NotImplementedException();
    129223    }
    130224
     225    /// <inheritdoc cref="System.Collections.Generic.Dictionary&lt;K,V&gt;.Count"/>
    131226    public int Count {
    132227      get { return dict.Count; }
    133228    }
    134229
     230    /// <summary>
     231    /// Checks whether the dictionary is read-only.
     232    /// </summary>
     233    /// <remarks>Always returns <c>false</c>.</remarks>
    135234    public bool IsReadOnly {
    136235      get { return false; }
    137236    }
    138237
     238    /// <summary>
     239    /// Removes the specified key-value pair.
     240    /// </summary>
     241    /// <remarks>Calls <see cref="OnItemRemoved"/> when the removal was successful.</remarks>
     242    /// <param name="item">The key-value pair to remove.</param>
     243    /// <returns><c>true</c> if the removal was successful, <c>false</c> otherwise.</returns>
    139244    public bool Remove(KeyValuePair<K, V> item) {
    140245      bool removed = dict.Remove(item.Key);
     
    147252
    148253    #region IEnumerable<KeyValuePair<K,V>> Members
     254    /// <inheritdoc cref="System.Collections.Generic.Dictionary&lt;K,V&gt;.GetEnumerator"/>
    149255    public IEnumerator<KeyValuePair<K, V>> GetEnumerator() {
    150256      return dict.GetEnumerator();
     
    153259
    154260    #region IEnumerable Members
     261    /// <inheritdoc cref="System.Collections.Generic.Dictionary&lt;K,V&gt;.GetEnumerator"/>
    155262    IEnumerator IEnumerable.GetEnumerator() {
    156263      return dict.GetEnumerator();
     
    159266
    160267    #region Event Handler
     268    /// <summary>
     269    /// Occurs when a new item is added to the dictionary.
     270    /// </summary>
    161271    public event EventHandler<KeyValueEventArgs> ItemAdded;
     272    /// <summary>
     273    /// Fires a new <c>ItemAdded</c> event.
     274    /// </summary>
     275    /// <remarks>Calls <see cref="HeuristicLab.Core.ItemBase.OnChanged"/>.</remarks>
     276    /// <param name="key">The key that was added.</param>
     277    /// <param name="value">The value that was added.</param>
    162278    protected virtual void OnItemAdded(K key, V value) {
    163279      if (ItemAdded != null)
     
    166282    }
    167283
     284    /// <summary>
     285    /// Occurs when an item is removed from the dictionary.
     286    /// </summary>
    168287    public event EventHandler<KeyValueEventArgs> ItemRemoved;
     288    /// <summary>
     289    /// Fires a new <c>ItemRemoved</c> event.
     290    /// </summary>
     291    /// <remarks>Calls <see cref="HeuristicLab.Core.ItemBase.OnChanged"/>.</remarks>
     292    /// <param name="key">The key that was removed.</param>
     293    /// <param name="value">The value that was removed</param>
    169294    protected virtual void OnItemRemoved(K key, V value) {
    170295      if (ItemRemoved != null)
     
    173298    }
    174299
     300    /// <summary>
     301    /// Occurs when the dictionary is emptied.
     302    /// </summary>
    175303    public event EventHandler Cleared;
     304    /// <summary>
     305    /// Fires a new <c>Cleared</c> event.
     306    /// </summary>
     307    /// <remarks>Calls <see cref="HeuristicLab.Core.ItemBase.OnChanged"/>.</remarks>
    176308    protected virtual void OnCleared() {
    177309      if (Cleared != null)
     
    182314
    183315    #region IEqualityComparer
     316    /// <summary>
     317    /// Compares two keys with each other.
     318    /// </summary>
     319    /// <typeparam name="T">The type of the keys.</typeparam>
    184320    internal sealed class IItemKeyComparer<T> : IEqualityComparer<T>
    185321        where T : IItem {
     322      /// <summary>
     323      /// Checks whether two keys are equal to each other.
     324      /// </summary>
     325      /// <param name="x">Key number one.</param>
     326      /// <param name="y">Key number two.</param>
     327      /// <returns><c>true</c> if the two keys are the same, <c>false</c> otherwise.</returns>
    186328      public bool Equals(T x, T y) {
    187329        if (x is IComparable) {
     
    194336      }
    195337
     338      /// <summary>
     339      /// Serves as a hash function for a particular type.
     340      /// </summary>
     341      /// <param name="obj">The object where the hash code is searched for.</param>
     342      /// <returns>A hash code for the given <paramref name="obj"/>.</returns>
    196343      public int GetHashCode(T obj) {
    197344        if (obj is IObjectData) {
  • trunk/sources/HeuristicLab.Data/ItemList.cs

    r68 r737  
    2828
    2929namespace HeuristicLab.Data {
     30  /// <summary>
     31  /// Generic list of elements that implement the interface <see cref="IItem"/>.
     32  /// </summary>
    3033  public class ItemList : ItemList<IItem> {
     34    /// <summary>
     35    /// Clones the current list and all its elements.
     36    /// </summary>
     37    /// <param name="clonedObjects">A dictionary of all already cloned objects.</param>
     38    /// <returns>The cloned instance as <see cref="ItemList"/>.</returns>
    3139    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    3240      ItemList clone = new ItemList();
  • trunk/sources/HeuristicLab.Data/ItemListView.cs

    r41 r737  
    3030
    3131namespace HeuristicLab.Data {
     32  /// <summary>
     33  /// The visual representation of the class <see cref="ItemList"/>.
     34  /// </summary>
    3235  public class ItemListView : ItemListView<IItem> {
     36    /// <summary>
     37    /// Initializes a new instance of the class <see cref="ItemListView"/>.
     38    /// </summary>
    3339    public ItemListView() { }
     40    /// <summary>
     41    /// Initializes a new instnace of the class <see cref="ItemListView"/> with the given
     42    /// <paramref name="itemList"/>.
     43    /// <note type="caution"> No CopyConstructor! <paramref name="itemList"/> is not copied!</note>
     44    /// </summary>
     45    /// <param name="itemList">The list of items to represent.</param>
    3446    public ItemListView(ItemList itemList)
    3547      : this() {
  • trunk/sources/HeuristicLab.Data/ItemListView_T.cs

    r665 r737  
    3030
    3131namespace HeuristicLab.Data {
     32  /// <summary>
     33  /// The visual representation of the class <see cref="HeuristicLab.Data.ItemList&lt;T&gt;"/>.
     34  /// </summary>
     35  /// <typeparam name="T">The type of the items in the list.</typeparam>
    3236  public partial class ItemListView<T> : ViewBase where T : IItem {
    3337    private ChooseItemDialog chooseItemDialog;
    3438
     39    /// <summary>
     40    /// Gets or sets the item list to represent visually.
     41    /// </summary>
     42    /// <remarks>Uses property <see cref="HeuristicLab.Core.ViewBase.Item"/> of base class <see cref="ViewBase"/>.
     43    /// No own data storage present.</remarks>
    3544    public ItemList<T> ItemList {
    3645      get { return (ItemList<T>)Item; }
     
    3847    }
    3948
     49    /// <summary>
     50    /// Initializes a new instance of the class <see cref="HeuristicLab.Data.ItemListView&lt;T&gt;"/>.
     51    /// </summary>
    4052    public ItemListView() {
    4153      InitializeComponent();
    4254      itemsListView.Columns[0].Width = Math.Max(0, itemsListView.Width - 25);
    4355    }
     56    /// <summary>
     57    /// Initializes a new instance of the class <see cref="HeuristicLab.Data.ItemListView&lt;T&gt;"/> with the given
     58    /// <paramref name="itemList"/>.
     59    /// <note type="caution"> No CopyConstructor! <paramref name="itemList"/> is not copied!</note>
     60    /// </summary>
     61    /// <param name="itemList">The list of items to represent visually.</param>
    4462    public ItemListView(ItemList<T> itemList)
    4563      : this() {
     
    4765    }
    4866
     67    /// <summary>
     68    /// Removes the eventhandlers from the underlying <see cref="HeuristicLab.Data.ItemList&lt;T&gt;"/>.
     69    /// </summary>
     70    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.
     71    /// </remarks>
    4972    protected override void RemoveItemEvents() {
    5073      ItemList.ItemAdded -= new EventHandler<ItemIndexEventArgs>(ItemList_ItemInserted);
     
    5376      base.RemoveItemEvents();
    5477    }
     78    /// <summary>
     79    /// Adds eventhandlers to the underlying <see cref="HeuristicLab.Data.ItemList&lt;T&gt;"/>.
     80    /// </summary>
     81    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.
     82    /// </remarks>
    5583    protected override void AddItemEvents() {
    5684      base.AddItemEvents();
     
    6088    }
    6189
     90    /// <summary>
     91    /// Update all controls with the lastest elements in the list.
     92    /// </summary>
    6293    protected override void UpdateControls() {
    6394      base.UpdateControls();
  • trunk/sources/HeuristicLab.Data/ItemList_T.cs

    r69 r737  
    2828
    2929namespace HeuristicLab.Data {
     30  /// <summary>
     31  /// Represents a list of items where the items are of the type <typeparamref name="T"/>.
     32  /// </summary>
     33  /// <typeparam name="T">The type of the items in this list. <paramref name="T"/> must implement <see cref="IItem"/>.</typeparam>
    3034  public class ItemList<T> : ItemBase, IList<T> where T : IItem {
    3135    private List<T> list;
    3236
     37    /// <summary>
     38    /// Initializes a new instance of the class <see cref="ItemList&lt;T&gt;"/>.
     39    /// </summary>
    3340    public ItemList() {
    3441      list = new List<T>();
    3542    }
    3643
     44    /// <summary>
     45    /// Creates a new instance of <see cref="ItemListView&lt;T&gt;"/>.
     46    /// </summary>
     47    /// <returns>The created instance as <see cref="ItemListView&lt;T&gt;"/>.</returns>
    3748    public override IView CreateView() {
    3849      return new ItemListView<T>(this);
    3950    }
    4051
     52    /// <summary>
     53    /// Clones the current instance.
     54    /// </summary>
     55    /// <remarks>Saves the cloned instance in the dictionary <paramref name="clonedObjects"/>.</remarks>
     56    /// <param name="clonedObjects">A dictionary of all already cloned objects.</param>
     57    /// <returns>The cloned instance as <see cref="ItemList&lt;T&gt;"/>.</returns>
    4158    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    4259      ItemList<T> clone = new ItemList<T>();
     
    4562      return clone;
    4663    }
     64
     65    /// <summary>
     66    /// Clones all elements in the current list.
     67    /// </summary>
     68    /// <remarks>Clones only elements that have not already been cloned
     69    /// (and therefore exist in the dictionary <paramref name="clonedObjects"/>).</remarks>
     70    /// <param name="destination">The <see cref="ItemList&lt;T&gt;"/> where to save the cloned objects.</param>
     71    /// <param name="clonedObjects">A dictionary of all already cloned objects.</param>
    4772    protected void CloneElements(ItemList<T> destination, IDictionary<Guid, object> clonedObjects) {
    4873      for (int i = 0; i < list.Count; i++)
     
    5075    }
    5176
     77    /// <summary>
     78    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     79    /// </summary>
     80    /// <remarks>Each element in the list is saved as child node.</remarks>
     81    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     82    /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>
     83    /// <param name="persistedObjects">The dictionary of all already persisted objects.
     84    /// (Needed to avoid cycles.)</param>
     85    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    5286    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
    5387      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    5690      return node;
    5791    }
     92    /// <summary>
     93    /// Loads the persisted item list from the specified <paramref name="node"/>.
     94    /// </summary>
     95    /// <remarks>The single elements of the list must be saved as child nodes (see <see cref="GetXmlNode"/>.</remarks>
     96    /// <param name="node">The <see cref="XmlNode"/> where the instance is saved.</param>
     97    /// <param name="restoredObjects">The dictionary of all already restored objects. (Needed to avoid cycles.)</param>
    5898    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    5999      base.Populate(node, restoredObjects);
     
    62102    }
    63103
     104    /// <summary>
     105    /// The string representation of the list.
     106    /// </summary>
     107    /// <returns>The elements of the list as string, each element separated by a semicolon. <br/>
     108    /// If the list is empty, "Empty List" is returned.</returns>
    64109    public override string ToString() {
    65110      if (list.Count > 0) {
     
    77122
    78123    #region IList<T> Members
     124    /// <inheritdoc cref="List&lt;T&gt;.IndexOf(T)"/>
    79125    public int IndexOf(T item) {
    80126      return list.IndexOf(item);
    81127    }
     128    ///// <summary>
     129    ///// Inserts a specified <paramref name="item"/> at a specific position <paramref name="index"/>.
     130    ///// </summary>
     131    ///// <remarks>Calls <see cref="M:ItemList&lt;T&gt;.OnItemAdded"/>.</remarks>
     132    ///// <param name="index">The position where to insert the <paramref name="item"/>.</param>
     133    ///// <param name="item">The element to insert.</param>
     134    /// <inheritdoc cref="List&lt;T&gt;.Insert"/>
     135    /// <remarks>Calls <see cref="OnItemAdded"/>.</remarks>
    82136    public void Insert(int index, T item) {
    83137      list.Insert(index, item);
    84138      OnItemAdded(item, index);
    85139    }
     140    ///// <summary>
     141    ///// Removes the element at the specified <paramref name="index"/>.
     142    ///// </summary>
     143    ///// <remarks>Calls <see cref="M:ItemList&lt;T&gt;.OnItemRemoved"/>.</remarks>
     144    ///// <param name="index">The position where to remove the element.</param>
     145    /// <inheritdoc cref="List&lt;T&gt;.RemoveAt"/>
     146    /// <remarks>Calls <see cref="OnItemRemoved"/>.</remarks>
    86147    public void RemoveAt(int index) {
    87148      IItem item = list[index];
     
    89150      OnItemRemoved(item, index);
    90151    }
     152    /// <summary>
     153    /// Gets or sets the element at the specified <paramref name="index"/>.
     154    /// </summary>
     155    /// <param name="index">The position where to get or set the element.</param>
     156    /// <returns>The element at the specified <paramref name="index"/>.</returns>
    91157    public T this[int index] {
    92158      get { return list[index]; }
     
    96162
    97163    #region ICollection<T> Members
     164    ///// <summary>
     165    ///// Adds an item to the current list.
     166    ///// </summary>
     167    ///// <remarks>Calls <see cref="M:ItemList&lt;T&gt;.OnItemAdded"/>.</remarks>
     168    ///// <param name="item">The element to add.</param>
     169    /// <inheritdoc cref="List&lt;T&gt;.Add"/>
     170    /// <remarks>Calls <see cref="OnItemAdded"/>.</remarks>
    98171    public void Add(T item) {
    99172      list.Add(item);
    100173      OnItemAdded(item, list.Count - 1);
    101174    }
     175    ///// <summary>
     176    ///// Empties the list.
     177    ///// </summary>
     178    ///// <remarks>Calls <see cref="M:ItemList&lt;T&gt;.OnCleared"/>.</remarks>
     179    /// <inheritdoc cref="List&lt;T&gt;.Clear"/>
     180    /// <remarks>Calls <see cref="OnCleared"/>.</remarks>
    102181    public void Clear() {
    103182      list.Clear();
    104183      OnCleared();
    105184    }
     185    /// <inheritdoc cref="List&lt;T&gt;.Contains"/>
    106186    public bool Contains(T item) {
    107187      return list.Contains(item);
    108188    }
     189    /// <inheritdoc cref="List&lt;T&gt;.CopyTo(T[], int)"/>
    109190    public void CopyTo(T[] array, int arrayIndex) {
    110191      list.CopyTo(array, arrayIndex);
    111192    }
     193    /// <inheritdoc cref="List&lt;T&gt;.Count"/>
    112194    public int Count {
    113195      get { return list.Count; }
    114196    }
     197    /// <summary>
     198    /// Checks whether the current list is read-only.
     199    /// </summary>
     200    /// <remarks>Always returns <c>false</c>.</remarks>
    115201    public bool IsReadOnly {
    116202      get { return false; }
    117203    }
     204    /// <summary>
     205    /// Removes the specified <paramref name="item"/>.
     206    /// </summary>
     207    /// <remarks>If the <paramref name="item"/> can be successfully removed,
     208    /// <see cref="OnItemRemoved"/> is called.</remarks>
     209    /// <param name="item">The element to remove.</param>
     210    /// <returns><c>true</c>, if the element could be removed successfully, <c>false</c> otherwise.</returns>
    118211    public bool Remove(T item) {
    119212      int index = list.IndexOf(item);
     
    128221
    129222    #region IEnumerable<T> Members
     223    /// <inheritdoc cref="List&lt;T&gt;.GetEnumerator"/>
    130224    public IEnumerator<T> GetEnumerator() {
    131225      return list.GetEnumerator();
     
    134228
    135229    #region IEnumerable Members
     230    /// <inheritdoc cref="List&lt;T&gt;.GetEnumerator"/>
    136231    IEnumerator IEnumerable.GetEnumerator() {
    137232      return list.GetEnumerator();
     
    140235
    141236    #region List<T> Methods
     237    /// <inheritdoc cref="List&lt;T&gt;.LastIndexOf(T)"/>
    142238    public int LastIndexOf(T item) {
    143239      return list.LastIndexOf(item);
    144240    }
    145241
     242    /// <inheritdoc cref="List&lt;T&gt;.LastIndexOf(T, int)"/>
    146243    public int LastIndexOf(T item, int index) {
    147244      return list.LastIndexOf(item, index);
    148245    }
    149246
     247    /// <inheritdoc cref="List&lt;T&gt;.LastIndexOf(T, int, int)"/>
    150248    public int LastIndexOf(T item, int index, int count) {
    151249      return list.LastIndexOf(item, index, count);
    152250    }
    153251
     252    /// <inheritdoc cref="List&lt;T&gt;.IndexOf(T, int)"/>
    154253    public int IndexOf(T item, int index) {
    155254      return list.IndexOf(item, index);
    156255    }
    157256
     257    /// <inheritdoc cref="List&lt;T&gt;.IndexOf(T, int, int)"/>
    158258    public int IndexOf(T item, int index, int count) {
    159259      return list.IndexOf(item, index, count);
    160260    }
    161 
     261    /// <summary>
     262    /// Adds all the elements in the specified <paramref name="collection"/> to the current list.
     263    /// </summary>
     264    /// <param name="collection">The elements to add to the current list.</param>
    162265    public void AddRange(IEnumerable<T> collection) {
    163266      foreach (T obj in collection) {
     
    166269    }
    167270
     271    /// <inheritdoc cref="List&lt;T&gt;.Exists"/>
    168272    public bool Exists(Predicate<T> match) {
    169273      return list.Exists(match);
    170274    }
    171275
     276    /// <inheritdoc cref="List&lt;T&gt;.BinarySearch(T)"/>
    172277    public int BinarySearch(T item) {
    173278      return list.BinarySearch(item);
    174279    }
    175280
     281    /// <inheritdoc cref="List&lt;T&gt;.BinarySearch(T, System.Collections.Generic.IComparer&lt;T&gt;)"/>
    176282    public int BinarySearch(T item, IComparer<T> comparer) {
    177283      return list.BinarySearch(item, comparer);
    178284    }
    179285
     286    /// <inheritdoc cref="List&lt;T&gt;.BinarySearch(int, int, T, System.Collections.Generic.IComparer&lt;T&gt;)"/>
    180287    public int BinarySearch(int index, int count, T item, IComparer<T> comparer) {
    181288      return list.BinarySearch(index, count, item, comparer);
    182289    }
    183 
     290    /// <inheritdoc cref="List&lt;T&gt;.Find"/>
    184291    public T Find(Predicate<T> match) {
    185292      return list.Find(match);
    186293    }
    187294
     295    /// <inheritdoc cref="List&lt;T&gt;.FindAll"/>
    188296    public List<T> FindAll(Predicate<T> match) {
    189297      return list.FindAll(match);
    190298    }
    191299
     300    /// <inheritdoc cref="List&lt;T&gt;.FindIndex(System.Predicate&lt;T&gt;)"/>
    192301    public int FindIndex(Predicate<T> match) {
    193302      return list.FindIndex(match);
    194303    }
    195304
     305    /// <inheritdoc cref="List&lt;T&gt;.FindLast"/>
    196306    public T FindLast(Predicate<T> match) {
    197307      return list.FindLast(match);
    198308    }
    199309
     310    /// <inheritdoc cref="List&lt;T&gt;.FindLastIndex(System.Predicate&lt;T&gt;)"/>
    200311    public int FindLastIndex(Predicate<T> match) {
    201312      return list.FindLastIndex(match);
    202313    }
    203314
     315    /// <inheritdoc cref="List&lt;T&gt;.Sort()"/>
    204316    public void Sort() {
    205317      list.Sort();
    206318    }
    207319
     320    /// <inheritdoc cref="List&lt;T&gt;.Sort(System.Collections.Generic.IComparer&lt;T&gt;)"/>
    208321    public void Sort(IComparer<T> comparer) {
    209322      list.Sort(comparer);
    210323    }
    211324
     325    /// <inheritdoc cref="List&lt;T&gt;.Sort(System.Comparison&lt;T&gt;)"/>
    212326    public void Sort(Comparison<T> comparison) {
    213327      list.Sort(comparison);
    214328    }
    215329
     330    /// <inheritdoc cref="List&lt;T&gt;.Reverse()"/>
    216331    public void Reverse() {
    217332      list.Reverse();
    218333    }
    219334
     335    /// <summary>
     336    /// Converts all elements in the current list to a specified type <typeparamref name="TOutput"/>.
     337    /// </summary>
     338    /// <typeparam name="TOutput">The type to convert the items to, which must implement <see cref="IItem"/>.</typeparam>
     339    /// <param name="converter">A delegate that converts elements from type <c>T</c> to type <typeparamref name="TOutput"/>.</param>
     340    /// <returns>A list containing the converted elements.</returns>
    220341    public ItemList<TOutput> ConvertAll<TOutput>(Converter<T, TOutput> converter) where TOutput : IItem {
    221342      ItemList<TOutput> targetList = new ItemList<TOutput>();
     
    226347    }
    227348
     349    /// <inheritdoc cref="List&lt;T&gt;.TrueForAll"/>
    228350    public bool TrueForAll(Predicate<T> match) {
    229351      return list.TrueForAll(match);
     
    232354    #endregion
    233355
     356    /// <summary>
     357    /// Occurs where a new item is added to the list.
     358    /// </summary>
    234359    public event EventHandler<ItemIndexEventArgs> ItemAdded;
     360    /// <summary>
     361    /// Fires a new <c>ItemAdded</c> event.
     362    /// </summary>
     363    /// <remarks>Calls <see cref="HeuristicLab.Core.ItemBase.OnChanged"/>.</remarks>
     364    /// <param name="item">The added element.</param>
     365    /// <param name="index">The position where the new element was added.</param>
    235366    protected virtual void OnItemAdded(IItem item, int index) {
    236367      if (ItemAdded != null)
     
    238369      OnChanged();
    239370    }
     371    /// <summary>
     372    /// Occurs when an element is deleted from the list.
     373    /// </summary>
    240374    public event EventHandler<ItemIndexEventArgs> ItemRemoved;
     375    /// <summary>
     376    /// Fires a new <c>ItemRemoved</c> event.
     377    /// </summary>
     378    /// <remarks>Calls <see cref="HeuristicLab.Core.ItemBase.OnChanged"/>.</remarks>
     379    /// <param name="item">The removed element.</param>
     380    /// <param name="index">The position from where the element was removed.</param>
    241381    protected virtual void OnItemRemoved(IItem item, int index) {
    242382      if (ItemRemoved != null)
     
    244384      OnChanged();
    245385    }
     386    /// <summary>
     387    /// Occurs when the list is emptied.
     388    /// </summary>
    246389    public event EventHandler Cleared;
     390    /// <summary>
     391    /// Fires a new <c>Cleared</c> event.
     392    /// </summary>
     393    /// <remarks>Calls <see cref="HeuristicLab.Core.ItemBase.OnChanged"/>.</remarks>
    247394    protected virtual void OnCleared() {
    248395      if (Cleared != null)
  • trunk/sources/HeuristicLab.Data/MatrixDataBaseView.cs

    r2 r737  
    3030
    3131namespace HeuristicLab.Data {
     32  /// <summary>
     33  /// The basic visual representation of a two-dimensional matrix.
     34  /// </summary>
    3235  public partial class MatrixDataBaseView : ViewBase {
     36
     37    /// <summary>
     38    /// Gets or sets the matrix to represent visually.
     39    /// </summary>
     40    /// <remarks>Uses property <see cref="HeuristicLab.Core.ViewBase.Item"/> of base class <see cref="ViewBase"/>.
     41    /// No own data storage present.</remarks>
    3342    public ArrayDataBase ArrayDataBase {
    3443      get { return (ArrayDataBase)Item; }
     
    3645    }
    3746
     47    /// <summary>
     48    /// Initializes a new instance of the class <see cref="MatrixDataBaseView"/>.
     49    /// </summary>
    3850    public MatrixDataBaseView() {
    3951      InitializeComponent();
    4052    }
    4153
     54    /// <summary>
     55    /// Removes the eventhandler from the underlying <see cref="ArrayDataBase"/>.
     56    /// </summary>
     57    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.
     58    /// </remarks>
    4259    protected override void RemoveItemEvents() {
    4360      ArrayDataBase.Changed -= new EventHandler(ArrayDataBase_Changed);
    4461      base.RemoveItemEvents();
    4562    }
     63    /// <summary>
     64    /// Adds an eventhandler to the underlying <see cref="ArrayDataBase"/>.
     65    /// </summary>
     66    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.
     67    /// </remarks>
    4668    protected override void AddItemEvents() {
    4769      base.AddItemEvents();
     
    4971    }
    5072
     73    /// <summary>
     74    /// Validates the given data.
     75    /// <note type="caution"> Needs to be overriden in each inherited class!</note>
     76    /// </summary>
     77    /// <exception cref="InvalidOperationException">Thrown when method is not
     78    /// overridden in inherited class.</exception>
     79    /// <param name="element">The data to validate.</param>
     80    /// <returns><c>true</c> if the data is valid, <c>false</c> otherwise.</returns>
    5181    protected virtual bool ValidateData(string element) {
    5282      throw new InvalidOperationException("ValidateData has to be overridden in each inherited class");
    5383    }
     84    /// <summary>
     85    /// Sets an element of the current instance at the given <paramref name="index"/>
     86    /// to the given <paramref name="element"/>.
     87    /// <note type="caution"> Needs to be overridden in each inherited class!</note>
     88    /// </summary>
     89    /// <exception cref="InvalidOperationException">Thrown when method is not
     90    /// overridden in inherited class.</exception>
     91    /// <param name="row">The row where to substitute the element.</param>
     92    /// <param name="column">The column where to substitute the element.</param>
     93    /// <param name="element">The element to insert.</param>       
    5494    protected virtual void SetArrayElement(int row, int column, string element) {
    5595      throw new InvalidOperationException("SetArrayElement has to be overridden in each inherited class");
    5696    }
    5797
     98    /// <summary>
     99    /// Update all controls with the latest element of the matrix.
     100    /// </summary>
    58101    protected override void UpdateControls() {
    59102      base.UpdateControls();
     
    93136    }
    94137
     138    /// <summary>
     139    /// Creates a new matrix having the specified number (<paramref name="newRows"/>)
     140    /// of rows and the specified number (<paramref name="newColumns"/>) of columns of the
     141    /// current instance.
     142    /// </summary>
     143    /// <param name="newRows">The number of rows of the new matrix.</param>
     144    /// <param name="newColumns">The number of columns of the new matrix</param>
    95145    private void CreateAndCopyArray(int newRows, int newColumns) {
    96146      Array newArray = Array.CreateInstance(ArrayDataBase.Data.GetType().GetElementType(), newRows, newColumns);
  • trunk/sources/HeuristicLab.Data/NullData.cs

    r82 r737  
    2727
    2828namespace HeuristicLab.Data {
     29  /// <summary>
     30  /// A class that represents <c>null</c>.
     31  /// </summary>
    2932  public class NullData : ObjectData {
     33    /// <summary>
     34    /// Gets <c>null</c> and throws an exception in the setter.
     35    /// </summary>
     36    /// <exception cref="InvalidOperationException">Thrown when the setter is called.</exception>
    3037    public override object Data {
    3138      get { return null; }
     
    3340    }
    3441
     42    /// <summary>
     43    /// Initializes a new instance of <see cref="NullData"/> with <c>null</c>.
     44    /// </summary>
    3545    public NullData() {
    3646      base.Data = null;
    3747    }
    3848
     49    /// <summary>
     50    /// Clones the current instance.
     51    /// </summary>
     52    /// <remarks>Adds the cloned instance to the dictionary <paramref name="clonedObjects"/>.</remarks>
     53    /// <param name="clonedObjects">All already cloned objects.</param>
     54    /// <returns>The cloned instance as <see cref="NullData"/>.</returns>
    3955    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    4056      NullData clone = new NullData();
     
    4359    }
    4460
     61    /// <summary>
     62    /// The point of intersection where an <see cref="IObjectDataVisitor"/>
     63    /// can change the value.
     64    /// </summary>
     65    /// <param name="visitor">The visitor that changes the element.</param>
    4566    public override void Accept(IObjectDataVisitor visitor) {
    4667      visitor.Visit(this);
  • trunk/sources/HeuristicLab.Data/ObjectData.cs

    r508 r737  
    2727
    2828namespace HeuristicLab.Data {
     29  /// <summary>
     30  /// Represents the base class for all base data types.
     31  /// </summary>
    2932  public class ObjectData : ItemBase, IObjectData {
    3033    private object myData;
     34    /// <summary>
     35    /// Gets or sets the data to represent.
     36    /// </summary>
     37    /// <remarks>Calls <see cref="HeuristicLab.Core.ItemBase.OnChanged"/>.</remarks>
    3138    public virtual object Data {
    3239      get { return myData; }
     
    3946    }
    4047
     48    /// <summary>
     49    /// Clones the current instance.
     50    /// </summary>
     51    /// <remarks>HeuristicLab data items are cloned with the <see cref="HeuristicLab.Core.Auxiliary.Clone"/> method of
     52    /// class <see cref="Auxiliary"/> (deep copy), all other items (like basic data types)
     53    /// are cloned with their own <c>Clone</c> methods (shadow copy).</remarks>
     54    /// <exception cref="InvalidOperationException">Thrown when the current instance is not cloneable.</exception>
     55    /// <param name="clonedObjects">A dictionary of all already cloned objects.</param>
     56    /// <returns>The clone instance.</returns>
    4157    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    4258      ObjectData clone = (ObjectData)base.Clone(clonedObjects);
     
    5066    }
    5167
     68    /// <summary>
     69    /// Checks whether the current instance equals the specified <paramref name="obj"/>.
     70    /// </summary>
     71    /// <param name="obj">The object to compare with.</param>
     72    /// <returns><c>true</c>, if both objects are the same or
     73    /// the contained data is the same, <c>false</c> otherwise.</returns>
    5274    public override bool Equals(object obj) {
    5375      if(obj == this) return true; // same instance
     
    5981    }
    6082
     83    /// <inheritdoc cref="object.GetHashCode"/>
    6184    public override int GetHashCode() {
    6285      return Data.GetHashCode();
    6386    }
    6487
     88    /// <summary>
     89    /// Compares the current instance to the given <paramref name="obj"/>.
     90    /// </summary>
     91    /// <remarks>Can also compare basic data types with their representing HeuristicLab data types
     92    /// (e.g. a <see cref="BoolData"/> with a boolean value).</remarks>
     93    /// <exception cref="InvalidOperationException">Thrown when the current
     94    /// instance does not implement the interface <see cref="IComparable"/></exception>
     95    /// <param name="obj">The object to compare the current instance to.</param>
     96    /// <returns><c>0</c> if the objects are the same, a value smaller than zero when the current instance
     97    /// is smaller than the given <paramref name="obj"/> and a value greater than zero
     98    /// when the current instance is greater than the given <paramref name="obj"/>.</returns>
    6599    public int CompareTo(object obj) {
    66100      IComparable comparable = Data as IComparable;
     
    75109    }
    76110
     111    /// <summary>
     112    /// The string representation of the current instance.
     113    /// </summary>
     114    /// <returns>"null" if property <see cref="Data"/> is <c>null</c>, else
     115    /// the string representation of the current instance.</returns>
    77116    public override string ToString() {
    78117      if (Data == null)
     
    82121    }
    83122
     123    /// <summary>
     124    /// The point of intersection where an <see cref="IObjectDataVisitor"/>
     125    /// can change the object.
     126    /// </summary>
     127    /// <param name="visitor">The visitor that changes the element.</param>
    84128    public virtual void Accept(IObjectDataVisitor visitor) {
    85129      visitor.Visit(this);
  • trunk/sources/HeuristicLab.Data/ObjectDataVisitorBase.cs

    r270 r737  
    2525
    2626namespace HeuristicLab.Data {
     27  /// <summary>
     28  /// The base class for DataVisitors.
     29  /// </summary>
    2730  public class ObjectDataVisitorBase : IObjectDataVisitor{
    2831    #region IObjectDataVisitor Members
  • trunk/sources/HeuristicLab.Data/StringData.cs

    r2 r737  
    2727
    2828namespace HeuristicLab.Data {
     29  /// <summary>
     30  /// The representation of a string.
     31  /// </summary>
    2932  public class StringData : ObjectData {
     33    /// <summary>
     34    /// Gets or sets the string value.
     35    /// </summary>
     36    /// <remarks>Uses property <see cref="ObjectData.Data"/> of base class <see cref="ObjectData"/>.
     37    /// No own data storage present.</remarks>
    3038    public new string Data {
    3139      get { return (string)base.Data; }
     
    3341    }
    3442
     43    /// <summary>
     44    /// Initializes a new instance of <see cref="StringData"/>
     45    /// with the name of the type of the current instance as default value.
     46    /// </summary>
    3547    public StringData() {
    3648      Data = this.GetType().Name;
    3749    }
     50    /// <summary>
     51    /// Initializes a new instance of <see cref="StringData"/> with the specified <paramref name="data"/>.
     52    /// </summary>
     53    /// <param name="data">The string value the current instance should represent.</param>
    3854    public StringData(string data) {
    3955      Data = data;
    4056    }
    41 
     57   
     58    /// <summary>
     59    /// Creates a new instance of <see cref="StringDataView"/>.
     60    /// </summary>
     61    /// <returns>The created instance as <see cref="StringDataView"/>.</returns>
    4262    public override IView CreateView() {
    4363      return new StringDataView(this);
    4464    }
    4565
     66    /// <summary>
     67    /// Clones the current instance.
     68    /// </summary>
     69    /// <remarks>The current instance is added to the dictionary <paramref name="clonedObjects"/>.</remarks>
     70    /// <param name="clonedObjects">A dictionary of all already cloned objects.</param>
     71    /// <returns>The coned instance as <see cref="StringData"/>.</returns>
    4672    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    4773      StringData clone = new StringData();
     
    5177    }
    5278
     79    /// <summary>
     80    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     81    /// </summary>
     82    /// <remarks>The string value is saved in the node's inner text.</remarks>
     83    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     84    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     85    /// <param name="persistedObjects">A dictionary of all already persisted objects.(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 string value from the specified <paramref name="node"/>.
     94    /// </summary>
     95    /// <remarks>The string value must be saved in the node's inner text
     96    /// (see <see cref="GetXmlNode"/>).</remarks>
     97    /// <param name="node">The <see cref="XmlNode"/> where the string is saved.</param>
     98    /// <param name="restoredObjects">A dictionary of all already restored objects. (Needed to avoid cycles.)</param>
    5899    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    59100      base.Populate(node, restoredObjects);
     
    61102    }
    62103
     104    /// <summary>
     105    /// The string representation of the current instance.
     106    /// </summary>
     107    /// <returns>The string value.</returns>
    63108    public override string ToString() {
    64109      return Data;
    65110    }
    66111
     112    /// <summary>
     113    /// The point of intersection where an <see cref="IObjectDataVisitor"/>
     114    /// can change the string.
     115    /// </summary>
     116    /// <param name="visitor">The visitor that changes the element.</param>
    67117    public override void Accept(IObjectDataVisitor visitor) {
    68118      visitor.Visit(this);
  • trunk/sources/HeuristicLab.Data/StringDataView.cs

    r2 r737  
    3030
    3131namespace HeuristicLab.Data {
     32  /// <summary>
     33  /// The visual representation of the class <see cref="StringData"/>, symbolizing a string value.
     34  /// </summary>
    3235  public partial class StringDataView : ViewBase {
     36    /// <summary>
     37    /// Gets or sets the string value to represent visually.
     38    /// </summary>
     39    /// <remarks>Uses property <see cref="HeuristicLab.Core.ViewBase.Item"/> of base class <see cref="ViewBase"/>.
     40    /// No own data storage present.</remarks>
    3341    public StringData StringData {
    3442      get { return (StringData)Item; }
     
    3644    }
    3745
     46    /// <summary>
     47    /// Initializes a new instance of the class <see cref="StringDataView"/>.
     48    /// </summary>
    3849    public StringDataView() {
    3950      InitializeComponent();
    4051    }
     52    /// <summary>
     53    /// Initializes a new instance of the class <see cref="StringDataView"/> with the given
     54    /// <paramref name="stringData"/>.
     55    /// <note type="caution"> No CopyConstructor! <paramref name="stringData"/> is not copied!</note>
     56    /// </summary>
     57    /// <param name="stringData">The string value to represent visually.</param>
    4158    public StringDataView(StringData stringData)
    4259      : this() {
     
    4461    }
    4562
     63    /// <summary>
     64    /// Removes the eventhandler from the underlying <see cref="StringData"/>.
     65    /// </summary>
     66    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.
     67    /// </remarks>
    4668    protected override void RemoveItemEvents() {
    4769      StringData.Changed -= new EventHandler(StringData_Changed);
    4870      base.RemoveItemEvents();
    4971    }
     72    /// <summary>
     73    /// Adds an eventhandler to the underlying <see cref="StringData"/>.
     74    /// </summary>
     75    /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.
     76    /// </remarks>
    5077    protected override void AddItemEvents() {
    5178      base.AddItemEvents();
     
    5380    }
    5481
     82    /// <summary>
     83    /// Update the controls with the latest string value.
     84    /// </summary>
    5585    protected override void UpdateControls() {
    5686      base.UpdateControls();
Note: See TracChangeset for help on using the changeset viewer.