Changeset 737 for trunk/sources
- Timestamp:
- 11/12/08 13:10:09 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Data
- Files:
-
- 44 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data/ArrayDataBase.cs
r2 r737 27 27 28 28 namespace HeuristicLab.Data { 29 /// <summary> 30 /// An abstract base class for all kinds of arrays. 31 /// </summary> 29 32 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> 30 38 public new virtual Array Data { 31 39 get { return (Array)base.Data; } … … 33 41 } 34 42 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> 35 47 public override string ToString() { 36 48 if (Data.Length <= 0) return "Empty Array"; -
trunk/sources/HeuristicLab.Data/ArrayDataBaseView.cs
r344 r737 30 30 31 31 namespace HeuristicLab.Data { 32 /// <summary> 33 /// The visual representation of the class <see cref="ArrayDataBase"/>. 34 /// </summary> 32 35 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> 33 41 public ArrayDataBase ArrayDataBase { 34 42 get { return (ArrayDataBase)Item; } … … 36 44 } 37 45 46 /// <summary> 47 /// Initializes a new instance of <see cref="ArrayDataBaseView"/>. 48 /// </summary> 38 49 public ArrayDataBaseView() { 39 50 InitializeComponent(); 40 51 } 41 52 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> 42 58 protected override void RemoveItemEvents() { 43 59 ArrayDataBase.Changed -= new EventHandler(ArrayDataBase_Changed); 44 60 base.RemoveItemEvents(); 45 61 } 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> 46 67 protected override void AddItemEvents() { 47 68 base.AddItemEvents(); … … 49 70 } 50 71 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> 51 80 protected virtual bool ValidateData(string element) { 52 81 throw new InvalidOperationException("ValidateData has to be overridden in each inherited class"); 53 82 } 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> 54 92 protected virtual void SetArrayElement(int index, string element) { 55 93 throw new InvalidOperationException("SetArrayElement has to be overridden in each inherited class"); 56 94 } 57 95 96 /// <summary> 97 /// Updates all controls and the elements of the table with the latest values. 98 /// </summary> 58 99 protected override void UpdateControls() { 59 100 base.UpdateControls(); … … 90 131 } 91 132 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> 92 138 private void CreateAndCopyArray(int newLength) { 93 139 Array newArray = Array.CreateInstance(ArrayDataBase.Data.GetType().GetElementType(), newLength); -
trunk/sources/HeuristicLab.Data/BoolArrayData.cs
r2 r737 27 27 28 28 namespace HeuristicLab.Data { 29 /// <summary> 30 /// An array consisting of boolean values. 31 /// </summary> 29 32 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> 30 38 public new bool[] Data { 31 39 get { return (bool[])base.Data; } … … 33 41 } 34 42 43 /// <summary> 44 /// Initializes a new instance of the <see cref="BoolArrayData"/> class. 45 /// </summary> 35 46 public BoolArrayData() { 36 47 Data = new bool[0]; 37 48 } 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> 38 54 public BoolArrayData(bool[] data) { 39 55 Data = data; 40 56 } 41 57 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> 42 62 public override IView CreateView() { 43 63 return new BoolArrayDataView(this); 44 64 } 45 65 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> 46 75 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) { 47 76 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 49 78 return node; 50 79 } 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> 51 89 public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) { 52 90 base.Populate(node, restoredObjects); … … 57 95 Data = data; 58 96 } 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> 60 102 public override void Accept(IObjectDataVisitor visitor) { 61 103 visitor.Visit(this); -
trunk/sources/HeuristicLab.Data/BoolArrayDataView.cs
r2 r737 29 29 30 30 namespace HeuristicLab.Data { 31 /// <summary> 32 /// The visual representation of the class <see cref="BoolArrayData"/>, 33 /// symbolizing an array of boolean values. 34 /// </summary> 31 35 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> 32 41 public BoolArrayData BoolArrayData { 33 get { return (BoolArrayData)base. Item; }42 get { return (BoolArrayData)base.ArrayDataBase; } 34 43 set { base.ArrayDataBase = value; } 35 44 } 36 45 46 /// <summary> 47 /// Initializes a new instance of the class <see cref="BoolArrayDataView"/>. 48 /// </summary> 37 49 public BoolArrayDataView() { 38 50 InitializeComponent(); 39 51 } 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> 40 58 public BoolArrayDataView(BoolArrayData boolArrayData) 41 59 : this() { … … 43 61 } 44 62 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> 45 69 protected override void SetArrayElement(int index, string element) { 46 70 bool result; … … 50 74 } 51 75 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> 52 82 protected override bool ValidateData(string element) { 53 83 bool result; -
trunk/sources/HeuristicLab.Data/BoolData.cs
r2 r737 27 27 28 28 namespace HeuristicLab.Data { 29 /// <summary> 30 /// Class to represent boolean values. 31 /// </summary> 29 32 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> 30 38 public new bool Data { 31 39 get { return (bool)base.Data; } … … 33 41 } 34 42 43 /// <summary> 44 /// Initializes a new instance of <see cref="BoolData"/> with default value <c>false</c>. 45 /// </summary> 35 46 public BoolData() { 36 47 Data = false; 37 48 } 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> 38 53 public BoolData(bool data) { 39 54 Data = data; 40 55 } 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> 42 60 public override IView CreateView() { 43 61 return new BoolDataView(this); 44 62 } 45 63 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> 46 70 public override object Clone(IDictionary<Guid, object> clonedObjects) { 47 71 BoolData clone = new BoolData(); … … 50 74 return clone; 51 75 } 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> 53 84 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) { 54 85 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 56 87 return node; 57 88 } 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> 58 96 public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) { 59 97 base.Populate(node, restoredObjects); … … 61 99 } 62 100 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> 63 106 public override void Accept(IObjectDataVisitor visitor) { 64 107 visitor.Visit(this); -
trunk/sources/HeuristicLab.Data/BoolDataView.cs
r2 r737 30 30 31 31 namespace HeuristicLab.Data { 32 /// <summary> 33 /// The visual representation of the class <see cref="BoolData"/>, symbolizing a boolean value. 34 /// </summary> 32 35 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> 33 41 public BoolData BoolData { 34 42 get { return (BoolData)Item; } … … 36 44 } 37 45 46 /// <summary> 47 /// Initializes a new instance of the class <see cref="BoolDataView"/>. 48 /// </summary> 38 49 public BoolDataView() { 39 50 InitializeComponent(); 40 51 } 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> 41 58 public BoolDataView(BoolData boolData) 42 59 : this() { … … 44 61 } 45 62 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> 46 68 protected override void RemoveItemEvents() { 47 69 BoolData.Changed -= new EventHandler(BoolData_Changed); 48 70 base.RemoveItemEvents(); 49 71 } 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> 50 77 protected override void AddItemEvents() { 51 78 base.AddItemEvents(); … … 53 80 } 54 81 82 /// <summary> 83 /// Sets the <c>dataCheckBox</c> checked or unchecked according to the latest value. 84 /// </summary> 55 85 protected override void UpdateControls() { 56 86 base.UpdateControls(); -
trunk/sources/HeuristicLab.Data/BoolMatrixData.cs
r2 r737 28 28 29 29 namespace HeuristicLab.Data { 30 /// <summary> 31 /// A two-dimensional matrix consisting of boolean values. 32 /// </summary> 30 33 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> 31 39 public new bool[,] Data { 32 40 get { return (bool[,])base.Data; } … … 34 42 } 35 43 44 /// <summary> 45 /// Initializes a new instance of the <see cref="BoolMatrixData"/> class. 46 /// </summary> 36 47 public BoolMatrixData() { 37 48 Data = new bool[1, 1]; 38 49 } 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> 39 55 public BoolMatrixData(bool[,] data) { 40 56 Data = data; 41 57 } 42 58 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> 43 63 public override IView CreateView() { 44 64 return new BoolMatrixDataView(this); 45 65 } 46 66 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> 47 77 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) { 48 78 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 56 86 return node; 57 87 } 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> 58 96 public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) { 59 97 base.Populate(node, restoredObjects); … … 69 107 Data = data; 70 108 } 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> 72 113 public override string ToString() { 73 114 StringBuilder builder = new StringBuilder(); … … 81 122 return builder.ToString(); 82 123 } 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> 84 129 public override void Accept(IObjectDataVisitor visitor) { 85 130 visitor.Visit(this); -
trunk/sources/HeuristicLab.Data/BoolMatrixDataView.cs
r2 r737 29 29 30 30 namespace 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> 31 35 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> 32 41 public BoolMatrixData BoolMatrixData { 33 get { return (BoolMatrixData)base. Item; }42 get { return (BoolMatrixData)base.ArrayDataBase; } 34 43 set { base.ArrayDataBase = value; } 35 44 } 36 45 46 /// <summary> 47 /// Initializes a new instance of the class <see cref="BoolMatrixDataView"/>. 48 /// </summary> 37 49 public BoolMatrixDataView() { 38 50 InitializeComponent(); 39 51 } 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> 40 58 public BoolMatrixDataView(BoolMatrixData boolMatrixData) 41 59 : this() { … … 43 61 } 44 62 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> 45 70 protected override void SetArrayElement(int row, int column, string element) { 46 71 bool result; … … 50 75 } 51 76 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> 52 83 protected override bool ValidateData(string element) { 53 84 bool result; -
trunk/sources/HeuristicLab.Data/ConstrainedDoubleData.cs
r2 r737 28 28 29 29 namespace HeuristicLab.Data { 30 /// <summary> 31 /// Represents a double value having some constraints (e.g. smaller than 5.3). 32 /// </summary> 30 33 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> 31 39 public new double Data { 32 40 get { return ((DoubleData)base.Data).Data; } … … 34 42 } 35 43 44 /// <summary> 45 /// Initializes a new instance of <see cref="ConstrainedDoubleData"/> with default value <c>0.0</c>. 46 /// </summary> 36 47 public ConstrainedDoubleData() : this (0.0) { 37 48 } 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> 38 54 public ConstrainedDoubleData(double data) : base() { 39 55 base.Data = new DoubleData(data); 40 56 } 41 57 58 /// <inheritdoc cref="ConstrainedObjectData.TrySetData(object)"/> 42 59 public virtual bool TrySetData(double data) { 43 60 return base.TrySetData(new DoubleData(data)); 44 61 } 62 /// <inheritdoc cref="ConstrainedObjectData.TrySetData(object, out System.Collections.Generic.ICollection<HeuristicLab.Core.IConstraint>)"/> 45 63 public virtual bool TrySetData(double data, out ICollection<IConstraint> violatedConstraints) { 46 64 return base.TrySetData(new DoubleData(data), out violatedConstraints); 47 65 } 48 66 67 /// <summary> 68 /// Creates a new instance of <see cref="ConstrainedDoubleDataView"/>. 69 /// </summary> 70 /// <returns>The created instance as <see cref="ConstrainedDoubleDataView"/>.</returns> 49 71 public override IView CreateView() { 50 72 return new ConstrainedDoubleDataView(this); 51 73 } 52 74 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> 53 81 public override object Clone(IDictionary<Guid, object> clonedObjects) { 54 82 ConstrainedDoubleData clone = (ConstrainedDoubleData)base.Clone(clonedObjects); … … 56 84 } 57 85 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> 58 96 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) { 59 97 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 61 99 return node; 62 100 } 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> 63 108 public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) { 64 109 base.Populate(node, restoredObjects); … … 66 111 } 67 112 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> 68 118 public override void Accept(IObjectDataVisitor visitor) { 69 119 visitor.Visit(this); -
trunk/sources/HeuristicLab.Data/ConstrainedDoubleDataView.cs
r344 r737 30 30 31 31 namespace 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> 32 36 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> 33 42 public ConstrainedDoubleData ConstrainedDoubleData { 34 43 get { return (ConstrainedDoubleData)Item; } … … 39 48 } 40 49 50 /// <summary> 51 /// Initializes a new instance of the class <see cref="ConstrainedDoubleDataView"/>. 52 /// </summary> 41 53 public ConstrainedDoubleDataView() { 42 54 InitializeComponent(); 43 55 } 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> 44 62 public ConstrainedDoubleDataView(ConstrainedDoubleData constraintDoubleData) 45 63 : this() { … … 47 65 } 48 66 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> 49 72 protected override void RemoveItemEvents() { 50 73 ConstrainedDoubleData.Changed -= new EventHandler(ConstrainedDoubleData_Changed); 51 74 base.RemoveItemEvents(); 52 75 } 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> 53 81 protected override void AddItemEvents() { 54 82 base.AddItemEvents(); … … 56 84 } 57 85 86 /// <summary> 87 /// Updates the constrols with the latest double value. 88 /// </summary> 58 89 protected override void UpdateControls() { 59 90 base.UpdateControls(); -
trunk/sources/HeuristicLab.Data/ConstrainedIntData.cs
r2 r737 28 28 29 29 namespace HeuristicLab.Data { 30 /// <summary> 31 /// The representation of an int value having some constraints (e.g. smaller than 2). 32 /// </summary> 30 33 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> 31 39 public new int Data { 32 40 get { return ((IntData)base.Data).Data; } … … 34 42 } 35 43 44 /// <summary> 45 /// Initializes a new instance of <see cref="ConstrainedIntData"/> with default value <c>0</c>. 46 /// </summary> 36 47 public ConstrainedIntData() : this (0) { 37 48 } 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> 38 54 public ConstrainedIntData(int data) : base() { 39 55 base.Data = new IntData(data); 40 56 } 41 57 58 /// <inheritdoc cref="ConstrainedObjectData.TrySetData(object)"/> 42 59 public virtual bool TrySetData(int data) { 43 60 return base.TrySetData(new IntData(data)); 44 61 } 62 /// <inheritdoc cref="ConstrainedObjectData.TrySetData(object, out System.Collections.Generic.ICollection<HeuristicLab.Core.IConstraint>)"/> 45 63 public virtual bool TrySetData(int data, out ICollection<IConstraint> violatedConstraints) { 46 64 return base.TrySetData(new IntData(data), out violatedConstraints); 47 65 } 48 66 67 /// <summary> 68 /// Creates a new instance of <see cref="ConstrainedIntDataView"/>. 69 /// </summary> 70 /// <returns>The created instance as <see cref="ConstrainedIntDataView"/>.</returns> 49 71 public override IView CreateView() { 50 72 return new ConstrainedIntDataView(this); 51 73 } 52 74 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> 53 81 public override object Clone(IDictionary<Guid, object> clonedObjects) { 54 82 ConstrainedIntData clone = (ConstrainedIntData)base.Clone(clonedObjects); … … 56 84 } 57 85 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> 58 96 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) { 59 97 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 61 99 return node; 62 100 } 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> 63 108 public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) { 64 109 base.Populate(node, restoredObjects); … … 66 111 } 67 112 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> 68 118 public override void Accept(IObjectDataVisitor visitor) { 69 119 visitor.Visit(this); -
trunk/sources/HeuristicLab.Data/ConstrainedIntDataView.cs
r2 r737 30 30 31 31 namespace HeuristicLab.Data { 32 /// <summary> 33 /// The visual representation of the class <see cref="ConstrainedIntDataView"/>, 34 /// symbolizing an int value with some constraints. 35 /// </summary> 32 36 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> 33 42 public ConstrainedIntData ConstrainedIntData { 34 43 get { return (ConstrainedIntData)Item; } … … 39 48 } 40 49 50 /// <summary> 51 /// Initializes a new instance of class <see cref="ConstrainedIntDataView"/>. 52 /// </summary> 41 53 public ConstrainedIntDataView() { 42 54 InitializeComponent(); 43 55 } 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> 44 62 public ConstrainedIntDataView(ConstrainedIntData constraintIntData) 45 63 : this() { … … 47 65 } 48 66 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> 49 72 protected override void RemoveItemEvents() { 50 73 ConstrainedIntData.Changed -= new EventHandler(ConstrainedIntData_Changed); 51 74 base.RemoveItemEvents(); 52 75 } 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> 53 81 protected override void AddItemEvents() { 54 82 base.AddItemEvents(); … … 56 84 } 57 85 86 /// <summary> 87 /// Updates the controls with the latest int value. 88 /// </summary> 58 89 protected override void UpdateControls() { 59 90 base.UpdateControls(); -
trunk/sources/HeuristicLab.Data/ConstrainedItemList.cs
r732 r737 28 28 29 29 namespace 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> 30 34 public class ConstrainedItemList : ConstrainedItemBase, IEnumerable, IEnumerable<IItem> { 31 35 private List<IItem> list; 32 36 private bool suspendConstraintCheck; 33 37 38 /// <summary> 39 /// Checks whether the test for the constraints is suspended. 40 /// </summary> 34 41 public bool ConstraintCheckSuspended { 35 42 get { return suspendConstraintCheck; } 36 43 } 37 44 45 /// <summary> 46 /// Initializes a new instance of <see cref="ConstrainedItemList"/> with the constraint check enabled. 47 /// </summary> 38 48 public ConstrainedItemList() 39 49 : base() { … … 42 52 } 43 53 54 /// <summary> 55 /// Creates a new instance of <see cref="ConstrainedItemListView"/>. 56 /// </summary> 57 /// <returns>The created instance as <see cref="ConstrainedItemListView"/>.</returns> 44 58 public override IView CreateView() { 45 59 return new ConstrainedItemListView(this); … … 47 61 48 62 #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> 49 70 public override object Clone(IDictionary<Guid, object> clonedObjects) { 50 71 ConstrainedItemList clone = new ConstrainedItemList(); … … 59 80 } 60 81 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> 61 96 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) { 62 97 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 71 106 } 72 107 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> 73 117 public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) { 74 118 base.Populate(node, restoredObjects); … … 81 125 #endregion 82 126 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> 83 132 public override string ToString() { 84 133 if (list.Count > 0) { … … 95 144 } 96 145 146 /// <inheritdoc cref="List<T>.IndexOf(T)"/> 97 147 public int IndexOf(IItem item) { 98 148 return list.IndexOf(item); 99 149 } 100 150 151 /// <summary> 152 /// Sets <c>suspendConstraintCheck</c> to <c>true</c>. 153 /// </summary> 101 154 public void BeginCombinedOperation() { 102 155 suspendConstraintCheck = true; 103 156 } 104 157 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> 105 164 public bool EndCombinedOperation(out ICollection<IConstraint> violatedConstraints) { 106 165 if (IsValid(out violatedConstraints)) … … 112 171 } 113 172 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> 114 181 public bool TryInsert(int index, IItem item, out ICollection<IConstraint> violatedConstraints) { 115 182 list.Insert(index, item); … … 124 191 } 125 192 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> 126 201 public bool TryRemoveAt(int index, out ICollection<IConstraint> violatedConstraints) { 127 202 IItem item = list[index]; … … 137 212 } 138 213 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> 139 219 public IItem this[int index] { 140 220 get { return list[index]; } 141 221 } 142 222 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> 143 230 public bool TrySetAt(int index, IItem item, out ICollection<IConstraint> violatedConstraints) { 144 231 IItem backup = this[index]; … … 153 240 } 154 241 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> 155 249 public bool TryAdd(IItem item, out ICollection<IConstraint> violatedConstraints) { 156 250 list.Add(item); … … 164 258 } 165 259 } 260 /// <summary> 261 /// Empties the current list. 262 /// </summary> 263 /// <remarks>Calls <see cref="OnCleared"/>.</remarks> 166 264 public void Clear() { 167 265 list.Clear(); 168 266 OnCleared(); 169 267 } 268 /// <inheritdoc cref="List<T>.Contains"/> 170 269 public bool Contains(IItem item) { 171 270 return list.Contains(item); 172 271 } 272 /// <inheritdoc cref="List<T>.CopyTo(T[],int)"/> 173 273 public void CopyTo(IItem[] array, int arrayIndex) { 174 274 list.CopyTo(array, arrayIndex); 175 275 } 276 /// <inheritdoc cref="List<T>.Count"/> 176 277 public int Count { 177 278 get { return list.Count; } 178 279 } 280 /// <summary> 281 /// Checks whether the current instance is read-only. 282 /// </summary> 283 /// <remarks>Always returns <c>false</c>.</remarks> 179 284 public bool IsReadOnly { 180 285 get { return false; } 181 286 } 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> 182 294 public bool TryRemove(IItem item, out ICollection<IConstraint> violatedConstraints) { 183 295 int index = list.IndexOf(item); … … 190 302 } 191 303 304 /// <inheritdoc cref="List<T>.GetEnumerator"/> 192 305 public IEnumerator<IItem> GetEnumerator() { 193 306 return list.GetEnumerator(); 194 307 } 195 308 309 /// <inheritdoc cref="List<T>.GetEnumerator"/> 196 310 IEnumerator IEnumerable.GetEnumerator() { 197 311 return list.GetEnumerator(); 198 312 } 199 313 314 /// <summary> 315 /// Occurs when a new item is added. 316 /// </summary> 200 317 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> 201 324 protected virtual void OnItemAdded(IItem item, int index) { 202 325 if (ItemAdded != null) … … 204 327 OnChanged(); 205 328 } 329 /// <summary> 330 /// Occurs when an element is removed from the current instance. 331 /// </summary> 206 332 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> 207 339 protected virtual void OnItemRemoved(IItem item, int index) { 208 340 if (ItemRemoved != null) … … 210 342 OnChanged(); 211 343 } 344 /// <summary> 345 /// Occurs when the current list is emptied. 346 /// </summary> 212 347 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> 213 352 protected virtual void OnCleared() { 214 353 if (Cleared != null) -
trunk/sources/HeuristicLab.Data/ConstrainedItemListView.cs
r2 r737 30 30 31 31 namespace HeuristicLab.Data { 32 /// <summary> 33 /// The visual representation of the class <see cref="ConstrainedItemList"/>. 34 /// </summary> 32 35 public partial class ConstrainedItemListView : ViewBase { 33 36 private ChooseItemDialog chooseItemDialog; 34 37 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> 35 43 public ConstrainedItemList ConstrainedItemList { 36 44 get { return (ConstrainedItemList)base.Item; } … … 38 46 } 39 47 48 /// <summary> 49 /// Initializes a new instance of the class <see cref="ConstrainedItemListView"/>. 50 /// </summary> 40 51 public ConstrainedItemListView() { 41 52 InitializeComponent(); … … 43 54 } 44 55 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> 45 62 public ConstrainedItemListView(ConstrainedItemList constrainedItemList) 46 63 : this() { … … 48 65 } 49 66 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> 50 72 protected override void RemoveItemEvents() { 51 73 ConstrainedItemList.ItemAdded -= new EventHandler<ItemIndexEventArgs>(ConstrainedItemList_ItemAdded); … … 54 76 base.RemoveItemEvents(); 55 77 } 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> 57 84 protected override void AddItemEvents() { 58 85 base.AddItemEvents(); … … 62 89 } 63 90 91 /// <summary> 92 /// Updates all controls with the latest elements in the list. 93 /// </summary> 64 94 protected override void UpdateControls() { 65 95 base.UpdateControls(); -
trunk/sources/HeuristicLab.Data/ConstrainedObjectData.cs
r2 r737 27 27 28 28 namespace HeuristicLab.Data { 29 /// <summary> 30 /// A class representing all basic data types having some constraints. 31 /// </summary> 29 32 public class ConstrainedObjectData : ConstrainedItemBase, IObjectData { 30 33 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> 31 39 public virtual object Data { 32 40 get { return myData; } … … 39 47 } 40 48 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> 41 54 public virtual bool TrySetData(object data) { 42 55 if (myData != data) { … … 53 66 return true; 54 67 } 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> 55 74 public virtual bool TrySetData(object data, out ICollection<IConstraint> violatedConstraints) { 56 75 if (myData != data) { … … 69 88 } 70 89 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> 71 98 public override object Clone(IDictionary<Guid, object> clonedObjects) { 72 99 ConstrainedObjectData clone = (ConstrainedObjectData)base.Clone(clonedObjects); … … 80 107 } 81 108 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> 82 120 public int CompareTo(object obj) { 83 121 IComparable comparable = Data as IComparable; … … 92 130 } 93 131 132 /// <summary> 133 /// The string representation of the current instance. 134 /// </summary> 135 /// <returns>The current instance as a string.</returns> 94 136 public override string ToString() { 95 137 return Data.ToString(); 96 138 } 97 139 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> 98 145 public virtual void Accept(IObjectDataVisitor visitor) { 99 146 visitor.Visit(this); -
trunk/sources/HeuristicLab.Data/DoubleArrayData.cs
r344 r737 28 28 29 29 namespace HeuristicLab.Data { 30 /// <summary> 31 /// The representation of an array of double values. 32 /// </summary> 30 33 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> 31 39 public new double[] Data { 32 40 get { return (double[])base.Data; } … … 34 42 } 35 43 44 /// <summary> 45 /// Initializes a new instance of the <see cref="DoubleArrayData"/> class. 46 /// </summary> 36 47 public DoubleArrayData() { 37 48 Data = new double[0]; 38 49 } 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> 39 55 public DoubleArrayData(double[] data) { 40 56 Data = data; 41 57 } 42 58 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> 43 63 public override IView CreateView() { 44 64 return new DoubleArrayDataView(this); 45 65 } 46 66 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> 47 76 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) { 48 77 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 50 79 return node; 51 80 } 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> 52 91 public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) { 53 92 base.Populate(node, restoredObjects); … … 61 100 } 62 101 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> 63 109 private string ToString(NumberFormatInfo format) { 64 110 StringBuilder builder = new StringBuilder(); … … 72 118 } 73 119 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> 74 125 public override void Accept(IObjectDataVisitor visitor) { 75 126 visitor.Visit(this); -
trunk/sources/HeuristicLab.Data/DoubleArrayDataView.cs
r344 r737 29 29 30 30 namespace HeuristicLab.Data { 31 /// <summary> 32 /// The visual representation of the class <see cref="DoubleArrayData"/>, 33 /// symbolizing an array of double values. 34 /// </summary> 31 35 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> 32 41 public DoubleArrayData DoubleArrayData { 33 get { return (DoubleArrayData)base. Item; }42 get { return (DoubleArrayData)base.ArrayDataBase; } 34 43 set { base.ArrayDataBase = value; } 35 44 } 36 45 46 /// <summary> 47 /// Initializes a new instance of the class <see cref="DoubleArrayDataView"/>. 48 /// </summary> 37 49 public DoubleArrayDataView() { 38 50 InitializeComponent(); … … 40 52 dataGridView.DefaultCellStyle.Format = "r"; 41 53 } 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> 42 60 public DoubleArrayDataView(DoubleArrayData doubleArrayData) 43 61 : this() { … … 45 63 } 46 64 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> 47 71 protected override void SetArrayElement(int index, string element) { 48 72 double result; … … 52 76 } 53 77 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> 54 84 protected override bool ValidateData(string element) { 55 85 double result; -
trunk/sources/HeuristicLab.Data/DoubleData.cs
r344 r737 28 28 29 29 namespace HeuristicLab.Data { 30 /// <summary> 31 /// Class to represent double values. 32 /// </summary> 30 33 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> 31 39 public new double Data { 32 40 get { return (double)base.Data; } … … 34 42 } 35 43 44 /// <summary> 45 /// Initializes a new instance of <see cref="DoubleData"/> with default value <c>0.0</c>. 46 /// </summary> 36 47 public DoubleData() { 37 48 Data = 0.0; 38 49 } 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> 39 55 public DoubleData(double data) { 40 56 Data = data; 41 57 } 42 58 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> 43 63 public override IView CreateView() { 44 64 return new DoubleDataView(this); 45 65 } 46 66 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> 47 72 public override object Clone(IDictionary<Guid, object> clonedObjects) { 48 73 DoubleData clone = new DoubleData(); … … 52 77 } 53 78 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> 54 88 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) { 55 89 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 57 91 return node; 58 92 } 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> 59 102 public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) { 60 103 base.Populate(node, restoredObjects); … … 67 110 } 68 111 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> 69 117 public override void Accept(IObjectDataVisitor visitor) { 70 118 visitor.Visit(this); -
trunk/sources/HeuristicLab.Data/DoubleDataView.cs
r344 r737 30 30 31 31 namespace HeuristicLab.Data { 32 /// <summary> 33 /// The visual representation of the class <see cref="DoubleData"/>, symbolizing a double value. 34 /// </summary> 32 35 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> 33 41 public DoubleData DoubleData { 34 42 get { return (DoubleData)Item; } … … 36 44 } 37 45 46 /// <summary> 47 /// Initializes a new instance of the class <see cref="DoubleDataView"/>. 48 /// </summary> 38 49 public DoubleDataView() { 39 50 InitializeComponent(); 40 51 } 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> 41 58 public DoubleDataView(DoubleData doubleData) 42 59 : this() { … … 44 61 } 45 62 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> 46 68 protected override void RemoveItemEvents() { 47 69 DoubleData.Changed -= new EventHandler(DoubleData_Changed); 48 70 base.RemoveItemEvents(); 49 71 } 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> 50 77 protected override void AddItemEvents() { 51 78 base.AddItemEvents(); … … 53 80 } 54 81 82 /// <summary> 83 /// Updates the controls with the latest double value. 84 /// </summary> 55 85 protected override void UpdateControls() { 56 86 base.UpdateControls(); -
trunk/sources/HeuristicLab.Data/DoubleMatrixData.cs
r344 r737 28 28 29 29 namespace HeuristicLab.Data { 30 /// <summary> 31 /// A two-dimensional matrix consisting of double values. 32 /// </summary> 30 33 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> 31 39 public new double[,] Data { 32 40 get { return (double[,])base.Data; } … … 34 42 } 35 43 44 /// <summary> 45 /// Initializes a new instance of the <see cref="DoubleMatrixData"/> class. 46 /// </summary> 36 47 public DoubleMatrixData() { 37 48 Data = new double[1, 1]; 38 49 } 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> 39 55 public DoubleMatrixData(double[,] data) { 40 56 Data = data; 41 57 } 42 58 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> 43 63 public override IView CreateView() { 44 64 return new DoubleMatrixDataView(this); 45 65 } 46 66 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> 47 79 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) { 48 80 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 56 88 return node; 57 89 } 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> 58 101 public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) { 59 102 base.Populate(node, restoredObjects); … … 72 115 } 73 116 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> 74 122 public override string ToString() { 75 123 return ToString(CultureInfo.CurrentCulture.NumberFormat); 76 124 } 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> 78 132 private string ToString(NumberFormatInfo format) { 79 133 StringBuilder builder = new StringBuilder(); -
trunk/sources/HeuristicLab.Data/DoubleMatrixDataView.cs
r344 r737 29 29 30 30 namespace 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> 31 35 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> 32 41 public DoubleMatrixData DoubleMatrixData { 33 get { return (DoubleMatrixData)base. Item; }42 get { return (DoubleMatrixData)base.ArrayDataBase; } 34 43 set { base.ArrayDataBase = value; } 35 44 } 36 45 46 /// <summary> 47 /// Initializes a new instance of the class <see cref="DoubleMatrixDataView"/>. 48 /// </summary> 37 49 public DoubleMatrixDataView() { 38 50 InitializeComponent(); 39 51 // round-trip format for all cells 40 52 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> 42 60 public DoubleMatrixDataView(DoubleMatrixData doubleMatrixData) 43 61 : this() { … … 45 63 } 46 64 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> 47 72 protected override void SetArrayElement(int row, int column, string element) { 48 73 double result; … … 54 79 } 55 80 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> 56 87 protected override bool ValidateData(string element) { 57 88 double result; -
trunk/sources/HeuristicLab.Data/EditKeyValueDialog.cs
r187 r737 7 7 8 8 namespace HeuristicLab.Data { 9 /// <summary> 10 /// A visual representation to visualize a key-value pair. 11 /// </summary> 9 12 public partial class EditKeyValueDialog : Form { 10 13 private IItem key; 14 /// <summary> 15 /// Gets the current key. 16 /// </summary> 11 17 public IItem Key { 12 18 get { return key; } … … 14 20 15 21 private IItem value; 22 /// <summary> 23 /// Gets the current value. 24 /// </summary> 16 25 public IItem Value { 17 26 get { return value; } 18 27 } 19 28 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> 20 35 public EditKeyValueDialog(Type keyType, Type valueType) { 21 36 InitializeComponent(); -
trunk/sources/HeuristicLab.Data/HeuristicLab.Data.csproj
r582 r737 3 3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 4 4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 5 <ProductVersion>9.0. 30729</ProductVersion>5 <ProductVersion>9.0.21022</ProductVersion> 6 6 <SchemaVersion>2.0</SchemaVersion> 7 7 <ProjectGuid>{F473D9AF-3F09-4296-9F28-3C65118DAFFA}</ProjectGuid> -
trunk/sources/HeuristicLab.Data/HeuristicLabDataPlugin.cs
r582 r737 26 26 27 27 namespace HeuristicLab.Data { 28 /// <summary> 29 /// Plugin class for HeuristicLab.Data plugin. 30 /// </summary> 28 31 [ClassInfo(Name = "HeuristicLab.Data-3.2")] 29 32 [PluginFile(Filename = "HeuristicLab.Data-3.2.dll", Filetype = PluginFileType.Assembly)] -
trunk/sources/HeuristicLab.Data/IObjectData.cs
r2 r737 26 26 27 27 namespace HeuristicLab.Data { 28 /// <summary> 29 /// Public interface to represent basic data types 30 /// </summary> 28 31 public interface IObjectData : IItem, IComparable { 32 /// <summary> 33 /// Gets or sets the value of the object. 34 /// </summary> 29 35 object Data { get; set; } 30 36 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> 31 42 void Accept(IObjectDataVisitor visitor); 32 43 } -
trunk/sources/HeuristicLab.Data/IObjectDataVisitor.cs
r2 r737 25 25 26 26 namespace HeuristicLab.Data { 27 /// <summary> 28 /// A basic interface for all data visitors. 29 /// </summary> 27 30 public interface IObjectDataVisitor { 28 31 void Visit(BoolData data); -
trunk/sources/HeuristicLab.Data/IntArrayData.cs
r2 r737 28 28 29 29 namespace HeuristicLab.Data { 30 /// <summary> 31 /// The representation of an array of integer values. 32 /// </summary> 30 33 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> 31 39 public new int[] Data { 32 40 get { return (int[])base.Data; } … … 34 42 } 35 43 44 /// <summary> 45 /// Initializes a new instance of <see cref="IntArrayData"/>. 46 /// </summary> 36 47 public IntArrayData() { 37 48 Data = new int[0]; 38 49 } 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> 39 55 public IntArrayData(int[] data) { 40 56 Data = data; 41 57 } 42 58 59 /// <summary> 60 /// Creates a enw instance of <see cref="IntArrayDataView"/>. 61 /// </summary> 62 /// <returns>The created instance as <see cref="IntArrayDataView"/>.</returns> 43 63 public override IView CreateView() { 44 64 return new IntArrayDataView(this); 45 65 } 46 66 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> 47 76 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) { 48 77 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 50 79 return node; 51 80 } 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> 52 89 public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) { 53 90 base.Populate(node, restoredObjects); … … 61 98 } 62 99 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> 63 107 private string ToString(NumberFormatInfo format) { 64 108 StringBuilder builder = new StringBuilder(); -
trunk/sources/HeuristicLab.Data/IntArrayDataView.cs
r2 r737 29 29 30 30 namespace HeuristicLab.Data { 31 /// <summary> 32 /// The visual representation of the class <see cref="IntArrayData"/>, 33 /// symbolizing an array of int values. 34 /// </summary> 31 35 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> 32 41 public IntArrayData IntArrayData { 33 get { return (IntArrayData)base. Item; }42 get { return (IntArrayData)base.ArrayDataBase; } 34 43 set { base.ArrayDataBase = value; } 35 44 } 36 45 46 /// <summary> 47 /// Initializes a new instance of the class <see cref="IntArrayDataView"/>. 48 /// </summary> 37 49 public IntArrayDataView() { 38 50 InitializeComponent(); 39 51 } 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> 40 58 public IntArrayDataView(IntArrayData intArrayData) 41 59 : this() { … … 43 61 } 44 62 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> 45 69 protected override void SetArrayElement(int index, string element) { 46 70 int result; … … 50 74 } 51 75 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> 52 82 protected override bool ValidateData(string element) { 53 83 int result; -
trunk/sources/HeuristicLab.Data/IntData.cs
r2 r737 28 28 29 29 namespace HeuristicLab.Data { 30 /// <summary> 31 /// The representation of an int value. 32 /// </summary> 30 33 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> 31 39 public new int Data { 32 40 get { return (int)base.Data; } … … 34 42 } 35 43 44 /// <summary> 45 /// Initializes a new instance of <see cref="IntData"/> with default value <c>0</c>. 46 /// </summary> 36 47 public IntData() { 37 48 Data = 0; 38 49 } 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> 39 54 public IntData(int data) { 40 55 Data = data; 41 56 } 42 57 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> 43 62 public override IView CreateView() { 44 63 return new IntDataView(this); 45 64 } 46 65 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> 47 72 public override object Clone(IDictionary<Guid, object> clonedObjects) { 48 73 IntData clone = new IntData(); … … 52 77 } 53 78 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> 54 88 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) { 55 89 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 57 91 return node; 58 92 } 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> 59 101 public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) { 60 102 base.Populate(node, restoredObjects); … … 62 104 } 63 105 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> 64 111 public override void Accept(IObjectDataVisitor visitor) { 65 112 visitor.Visit(this); -
trunk/sources/HeuristicLab.Data/IntDataView.cs
r2 r737 30 30 31 31 namespace HeuristicLab.Data { 32 /// <summary> 33 /// The visual representation of the class <see cref="IntData"/>, symbolizing an int value. 34 /// </summary> 32 35 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> 33 41 public IntData IntData { 34 42 get { return (IntData)Item; } … … 36 44 } 37 45 46 /// <summary> 47 /// Initializes a new instance of the class <see cref="IntDataView"/>. 48 /// </summary> 38 49 public IntDataView() { 39 50 InitializeComponent(); 40 51 } 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> 41 58 public IntDataView(IntData intData) 42 59 : this() { … … 44 61 } 45 62 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> 46 68 protected override void RemoveItemEvents() { 47 69 IntData.Changed -= new EventHandler(IntData_Changed); 48 70 base.RemoveItemEvents(); 49 71 } 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> 50 77 protected override void AddItemEvents() { 51 78 base.AddItemEvents(); … … 53 80 } 54 81 82 /// <summary> 83 /// Updates the controls with the latest int value. 84 /// </summary> 55 85 protected override void UpdateControls() { 56 86 base.UpdateControls(); -
trunk/sources/HeuristicLab.Data/IntMatrixData.cs
r2 r737 28 28 29 29 namespace HeuristicLab.Data { 30 /// <summary> 31 /// A two-dimensional matrix of integer values. 32 /// </summary> 30 33 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> 31 39 public new int[,] Data { 32 40 get { return (int[,])base.Data; } … … 34 42 } 35 43 44 /// <summary> 45 /// Initializes a new instance of <see cref="IntMatrixData"/>. 46 /// </summary> 36 47 public IntMatrixData() { 37 48 Data = new int[1, 1]; 38 49 } 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> 39 55 public IntMatrixData(int[,] data) { 40 56 Data = data; 41 57 } 42 58 59 /// <summary> 60 /// Creates a new instance of <see cref="IntMatrixDataView"/>. 61 /// </summary> 62 /// <returns>The created instance as <see cref="IntMatrixDataView"/>.</returns> 43 63 public override IView CreateView() { 44 64 return new IntMatrixDataView(this); 45 65 } 46 66 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> 47 80 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) { 48 81 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 56 89 return node; 57 90 } 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> 58 101 public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) { 59 102 base.Populate(node, restoredObjects); … … 70 113 } 71 114 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> 72 120 public override string ToString() { 73 121 return ToString(CultureInfo.CurrentCulture.NumberFormat); 74 122 } 75 123 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> 76 130 private string ToString(NumberFormatInfo format) { 77 131 StringBuilder builder = new StringBuilder(); … … 86 140 } 87 141 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> 88 147 public override void Accept(IObjectDataVisitor visitor) { 89 148 visitor.Visit(this); -
trunk/sources/HeuristicLab.Data/IntMatrixDataView.cs
r2 r737 29 29 30 30 namespace 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> 31 35 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> 32 41 public IntMatrixData IntMatrixData { 33 get { return (IntMatrixData)base. Item; }42 get { return (IntMatrixData)base.ArrayDataBase; } 34 43 set { base.ArrayDataBase = value; } 35 44 } 36 45 46 /// <summary> 47 /// Initializes a new instance of the class <see cref="IntMatrixDataView"/>. 48 /// </summary> 37 49 public IntMatrixDataView() { 38 50 InitializeComponent(); 39 51 } 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> 40 58 public IntMatrixDataView(IntMatrixData intMatrixData) 41 59 : this() { … … 43 61 } 44 62 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> 45 70 protected override void SetArrayElement(int row, int column, string element) { 46 71 int result; … … 50 75 } 51 76 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> 52 83 protected override bool ValidateData(string element) { 53 84 int result; -
trunk/sources/HeuristicLab.Data/ItemDictionaryView_T.cs
r194 r737 9 9 10 10 namespace HeuristicLab.Data { 11 /// <summary> 12 /// The visual representation of the class <see cref="HeuristicLab.Data.ItemDictionary<K,V>"/>. 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> 11 16 public partial class ItemDictionaryView<K, V> : ViewBase 12 17 where K : IItem … … 15 20 private EditKeyValueDialog editKeyValueDialog; 16 21 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> 17 27 public ItemDictionary<K, V> ItemDictionary { 18 28 get { return (ItemDictionary<K, V>) Item; } … … 20 30 } 21 31 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> 22 38 private ListViewItem CreateListViewItem(K key, V value) { 23 39 ListViewItem item = new ListViewItem(key.ToString()); … … 29 45 } 30 46 47 /// <summary> 48 /// Initializes a new instance of the class <see cref="ItemDictionaryView<K,V>"/>. 49 /// </summary> 31 50 public ItemDictionaryView() { 32 51 InitializeComponent(); … … 38 57 } 39 58 59 /// <summary> 60 /// Initializes a new instance of the class <see cref="ItemDictionaryView<K,V>"/> 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> 40 65 public ItemDictionaryView(ItemDictionary<K, V> dictionary) 41 66 : this() { … … 43 68 } 44 69 70 /// <summary> 71 /// Removes the eventhandlers from the underlying 72 /// <see cref="HeuristicLab.Data.ItemDictionary<K,V>"/>. 73 /// </summary> 74 /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>. 75 /// </remarks> 45 76 protected override void RemoveItemEvents() { 46 77 ItemDictionary.ItemAdded -= new EventHandler<KeyValueEventArgs>(ItemDictionary_ItemInserted); … … 50 81 } 51 82 83 /// <summary> 84 /// Adds eventhandlers to the underlying <see cref="HeuristicLab.Data.ItemDictionary<K,V>"/>. 85 /// </summary> 86 /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>. 87 /// </remarks> 52 88 protected override void AddItemEvents() { 53 89 base.AddItemEvents(); … … 128 164 129 165 #region Update Controls 166 /// <summary> 167 /// Updates the controls with the latest elements of the dictionary. 168 /// </summary> 130 169 protected override void UpdateControls() { 131 170 base.UpdateControls(); -
trunk/sources/HeuristicLab.Data/ItemDictionary_T.cs
r187 r737 7 7 8 8 namespace 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> 9 14 public class ItemDictionary<K,V> : ItemBase, IDictionary<K,V> 10 15 where K : IItem … … 12 17 private Dictionary<K, V> dict; 13 18 19 /// <summary> 20 /// Gets the dictionary of key-value pairs. 21 /// </summary> 14 22 public Dictionary<K, V> Dictionary { 15 23 get { return dict; } 16 24 } 17 25 26 /// <summary> 27 /// Initializes a new instance of <see cref="ItemDictionary<TKey,TValue>"/>. 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<T>"/> as <see cref="IEqualityComparer"/>.</remarks> 18 32 public ItemDictionary() { 19 33 dict = new Dictionary<K, V>(new IItemKeyComparer<K>()); … … 21 35 22 36 #region ItemBase Members 37 /// <summary> 38 /// Creates a new instance of <see cref="ItemDictionaryView<K,V>"/>. 39 /// </summary> 40 /// <returns>The created instance as <see cref="ItemDictionaryView<K,V>"/>.</returns> 23 41 public override IView CreateView() { 24 42 return new ItemDictionaryView<K,V>(this); 25 43 } 26 44 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<K,V>"/>.</returns> 27 52 public override object Clone(IDictionary<Guid, object> clonedObjects) { 28 53 ItemDictionary<K,V> clone = new ItemDictionary<K,V>(); … … 34 59 } 35 60 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> 36 72 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) { 37 73 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 47 83 } 48 84 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> 49 93 public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) { 50 94 base.Populate(node, restoredObjects); … … 56 100 } 57 101 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> 58 108 public override string ToString() { 59 109 if (dict.Count > 0) { … … 74 124 #region IDictionary<K,V> Members 75 125 126 ///// <summary> 127 ///// Adds a new key value pair to the dictionary. 128 ///// </summary> 129 /// <inheritdoc cref="System.Collections.Generic.Dictionary<K,V>.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> 76 133 public void Add(K key, V value) { 77 134 dict.Add(key, value); … … 79 136 } 80 137 138 /// <inheritdoc cref="System.Collections.Generic.Dictionary<TKey,TValue>.ContainsKey"/> 81 139 public bool ContainsKey(K key) { 82 140 return dict.ContainsKey(key); 83 141 } 84 142 143 /// <inheritdoc cref="System.Collections.Generic.Dictionary<TKey,TValue>.Keys"/> 85 144 public ICollection<K> Keys { 86 145 get { return dict.Keys; } 87 146 } 88 147 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> 89 155 public bool Remove(K key) { 90 156 V value = dict[key]; … … 94 160 } 95 161 162 /// <inheritdoc cref="System.Collections.Generic.Dictionary<K,V>.TryGetValue"/> 96 163 public bool TryGetValue(K key, out V value) { 97 164 return dict.TryGetValue(key, out value); 98 165 } 99 166 167 /// <inheritdoc cref="System.Collections.Generic.Dictionary<TKey,TValue>.Values"/> 100 168 public ICollection<V> Values { 101 169 get { return dict.Values; } 102 170 } 103 171 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> 104 177 public V this[K key] { 105 178 get { return dict[key]; } … … 111 184 #region ICollection<KeyValuePair<K,V>> Members 112 185 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> 113 191 public void Add(KeyValuePair<K, V> item) { 114 192 dict.Add(item.Key, item.Value); … … 116 194 } 117 195 196 ///// <summary> 197 ///// Empties the dictionary. 198 ///// </summary> 199 /// <inheritdoc cref="System.Collections.Generic.Dictionary<K,V>.Clear"/> 200 /// <remarks>Calls <see cref="OnCleared"/>.</remarks> 118 201 public void Clear() { 119 202 dict.Clear(); … … 121 204 } 122 205 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> 123 212 public bool Contains(KeyValuePair<K, V> item) { 124 213 return (dict.ContainsKey(item.Key) && dict[item.Key].Equals(item.Value)); 125 214 } 126 215 216 /// <summary> 217 /// TODO 218 /// </summary> 219 /// <param name="array"></param> 220 /// <param name="arrayIndex"></param> 127 221 public void CopyTo(KeyValuePair<K, V>[] array, int arrayIndex) { 128 222 throw new NotImplementedException(); 129 223 } 130 224 225 /// <inheritdoc cref="System.Collections.Generic.Dictionary<K,V>.Count"/> 131 226 public int Count { 132 227 get { return dict.Count; } 133 228 } 134 229 230 /// <summary> 231 /// Checks whether the dictionary is read-only. 232 /// </summary> 233 /// <remarks>Always returns <c>false</c>.</remarks> 135 234 public bool IsReadOnly { 136 235 get { return false; } 137 236 } 138 237 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> 139 244 public bool Remove(KeyValuePair<K, V> item) { 140 245 bool removed = dict.Remove(item.Key); … … 147 252 148 253 #region IEnumerable<KeyValuePair<K,V>> Members 254 /// <inheritdoc cref="System.Collections.Generic.Dictionary<K,V>.GetEnumerator"/> 149 255 public IEnumerator<KeyValuePair<K, V>> GetEnumerator() { 150 256 return dict.GetEnumerator(); … … 153 259 154 260 #region IEnumerable Members 261 /// <inheritdoc cref="System.Collections.Generic.Dictionary<K,V>.GetEnumerator"/> 155 262 IEnumerator IEnumerable.GetEnumerator() { 156 263 return dict.GetEnumerator(); … … 159 266 160 267 #region Event Handler 268 /// <summary> 269 /// Occurs when a new item is added to the dictionary. 270 /// </summary> 161 271 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> 162 278 protected virtual void OnItemAdded(K key, V value) { 163 279 if (ItemAdded != null) … … 166 282 } 167 283 284 /// <summary> 285 /// Occurs when an item is removed from the dictionary. 286 /// </summary> 168 287 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> 169 294 protected virtual void OnItemRemoved(K key, V value) { 170 295 if (ItemRemoved != null) … … 173 298 } 174 299 300 /// <summary> 301 /// Occurs when the dictionary is emptied. 302 /// </summary> 175 303 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> 176 308 protected virtual void OnCleared() { 177 309 if (Cleared != null) … … 182 314 183 315 #region IEqualityComparer 316 /// <summary> 317 /// Compares two keys with each other. 318 /// </summary> 319 /// <typeparam name="T">The type of the keys.</typeparam> 184 320 internal sealed class IItemKeyComparer<T> : IEqualityComparer<T> 185 321 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> 186 328 public bool Equals(T x, T y) { 187 329 if (x is IComparable) { … … 194 336 } 195 337 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> 196 343 public int GetHashCode(T obj) { 197 344 if (obj is IObjectData) { -
trunk/sources/HeuristicLab.Data/ItemList.cs
r68 r737 28 28 29 29 namespace HeuristicLab.Data { 30 /// <summary> 31 /// Generic list of elements that implement the interface <see cref="IItem"/>. 32 /// </summary> 30 33 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> 31 39 public override object Clone(IDictionary<Guid, object> clonedObjects) { 32 40 ItemList clone = new ItemList(); -
trunk/sources/HeuristicLab.Data/ItemListView.cs
r41 r737 30 30 31 31 namespace HeuristicLab.Data { 32 /// <summary> 33 /// The visual representation of the class <see cref="ItemList"/>. 34 /// </summary> 32 35 public class ItemListView : ItemListView<IItem> { 36 /// <summary> 37 /// Initializes a new instance of the class <see cref="ItemListView"/>. 38 /// </summary> 33 39 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> 34 46 public ItemListView(ItemList itemList) 35 47 : this() { -
trunk/sources/HeuristicLab.Data/ItemListView_T.cs
r665 r737 30 30 31 31 namespace HeuristicLab.Data { 32 /// <summary> 33 /// The visual representation of the class <see cref="HeuristicLab.Data.ItemList<T>"/>. 34 /// </summary> 35 /// <typeparam name="T">The type of the items in the list.</typeparam> 32 36 public partial class ItemListView<T> : ViewBase where T : IItem { 33 37 private ChooseItemDialog chooseItemDialog; 34 38 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> 35 44 public ItemList<T> ItemList { 36 45 get { return (ItemList<T>)Item; } … … 38 47 } 39 48 49 /// <summary> 50 /// Initializes a new instance of the class <see cref="HeuristicLab.Data.ItemListView<T>"/>. 51 /// </summary> 40 52 public ItemListView() { 41 53 InitializeComponent(); 42 54 itemsListView.Columns[0].Width = Math.Max(0, itemsListView.Width - 25); 43 55 } 56 /// <summary> 57 /// Initializes a new instance of the class <see cref="HeuristicLab.Data.ItemListView<T>"/> 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> 44 62 public ItemListView(ItemList<T> itemList) 45 63 : this() { … … 47 65 } 48 66 67 /// <summary> 68 /// Removes the eventhandlers from the underlying <see cref="HeuristicLab.Data.ItemList<T>"/>. 69 /// </summary> 70 /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>. 71 /// </remarks> 49 72 protected override void RemoveItemEvents() { 50 73 ItemList.ItemAdded -= new EventHandler<ItemIndexEventArgs>(ItemList_ItemInserted); … … 53 76 base.RemoveItemEvents(); 54 77 } 78 /// <summary> 79 /// Adds eventhandlers to the underlying <see cref="HeuristicLab.Data.ItemList<T>"/>. 80 /// </summary> 81 /// <remarks>Calls <see cref="HeuristicLab.Core.ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>. 82 /// </remarks> 55 83 protected override void AddItemEvents() { 56 84 base.AddItemEvents(); … … 60 88 } 61 89 90 /// <summary> 91 /// Update all controls with the lastest elements in the list. 92 /// </summary> 62 93 protected override void UpdateControls() { 63 94 base.UpdateControls(); -
trunk/sources/HeuristicLab.Data/ItemList_T.cs
r69 r737 28 28 29 29 namespace 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> 30 34 public class ItemList<T> : ItemBase, IList<T> where T : IItem { 31 35 private List<T> list; 32 36 37 /// <summary> 38 /// Initializes a new instance of the class <see cref="ItemList<T>"/>. 39 /// </summary> 33 40 public ItemList() { 34 41 list = new List<T>(); 35 42 } 36 43 44 /// <summary> 45 /// Creates a new instance of <see cref="ItemListView<T>"/>. 46 /// </summary> 47 /// <returns>The created instance as <see cref="ItemListView<T>"/>.</returns> 37 48 public override IView CreateView() { 38 49 return new ItemListView<T>(this); 39 50 } 40 51 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<T>"/>.</returns> 41 58 public override object Clone(IDictionary<Guid, object> clonedObjects) { 42 59 ItemList<T> clone = new ItemList<T>(); … … 45 62 return clone; 46 63 } 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<T>"/> where to save the cloned objects.</param> 71 /// <param name="clonedObjects">A dictionary of all already cloned objects.</param> 47 72 protected void CloneElements(ItemList<T> destination, IDictionary<Guid, object> clonedObjects) { 48 73 for (int i = 0; i < list.Count; i++) … … 50 75 } 51 76 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> 52 86 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) { 53 87 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 56 90 return node; 57 91 } 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> 58 98 public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) { 59 99 base.Populate(node, restoredObjects); … … 62 102 } 63 103 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> 64 109 public override string ToString() { 65 110 if (list.Count > 0) { … … 77 122 78 123 #region IList<T> Members 124 /// <inheritdoc cref="List<T>.IndexOf(T)"/> 79 125 public int IndexOf(T item) { 80 126 return list.IndexOf(item); 81 127 } 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<T>.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<T>.Insert"/> 135 /// <remarks>Calls <see cref="OnItemAdded"/>.</remarks> 82 136 public void Insert(int index, T item) { 83 137 list.Insert(index, item); 84 138 OnItemAdded(item, index); 85 139 } 140 ///// <summary> 141 ///// Removes the element at the specified <paramref name="index"/>. 142 ///// </summary> 143 ///// <remarks>Calls <see cref="M:ItemList<T>.OnItemRemoved"/>.</remarks> 144 ///// <param name="index">The position where to remove the element.</param> 145 /// <inheritdoc cref="List<T>.RemoveAt"/> 146 /// <remarks>Calls <see cref="OnItemRemoved"/>.</remarks> 86 147 public void RemoveAt(int index) { 87 148 IItem item = list[index]; … … 89 150 OnItemRemoved(item, index); 90 151 } 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> 91 157 public T this[int index] { 92 158 get { return list[index]; } … … 96 162 97 163 #region ICollection<T> Members 164 ///// <summary> 165 ///// Adds an item to the current list. 166 ///// </summary> 167 ///// <remarks>Calls <see cref="M:ItemList<T>.OnItemAdded"/>.</remarks> 168 ///// <param name="item">The element to add.</param> 169 /// <inheritdoc cref="List<T>.Add"/> 170 /// <remarks>Calls <see cref="OnItemAdded"/>.</remarks> 98 171 public void Add(T item) { 99 172 list.Add(item); 100 173 OnItemAdded(item, list.Count - 1); 101 174 } 175 ///// <summary> 176 ///// Empties the list. 177 ///// </summary> 178 ///// <remarks>Calls <see cref="M:ItemList<T>.OnCleared"/>.</remarks> 179 /// <inheritdoc cref="List<T>.Clear"/> 180 /// <remarks>Calls <see cref="OnCleared"/>.</remarks> 102 181 public void Clear() { 103 182 list.Clear(); 104 183 OnCleared(); 105 184 } 185 /// <inheritdoc cref="List<T>.Contains"/> 106 186 public bool Contains(T item) { 107 187 return list.Contains(item); 108 188 } 189 /// <inheritdoc cref="List<T>.CopyTo(T[], int)"/> 109 190 public void CopyTo(T[] array, int arrayIndex) { 110 191 list.CopyTo(array, arrayIndex); 111 192 } 193 /// <inheritdoc cref="List<T>.Count"/> 112 194 public int Count { 113 195 get { return list.Count; } 114 196 } 197 /// <summary> 198 /// Checks whether the current list is read-only. 199 /// </summary> 200 /// <remarks>Always returns <c>false</c>.</remarks> 115 201 public bool IsReadOnly { 116 202 get { return false; } 117 203 } 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> 118 211 public bool Remove(T item) { 119 212 int index = list.IndexOf(item); … … 128 221 129 222 #region IEnumerable<T> Members 223 /// <inheritdoc cref="List<T>.GetEnumerator"/> 130 224 public IEnumerator<T> GetEnumerator() { 131 225 return list.GetEnumerator(); … … 134 228 135 229 #region IEnumerable Members 230 /// <inheritdoc cref="List<T>.GetEnumerator"/> 136 231 IEnumerator IEnumerable.GetEnumerator() { 137 232 return list.GetEnumerator(); … … 140 235 141 236 #region List<T> Methods 237 /// <inheritdoc cref="List<T>.LastIndexOf(T)"/> 142 238 public int LastIndexOf(T item) { 143 239 return list.LastIndexOf(item); 144 240 } 145 241 242 /// <inheritdoc cref="List<T>.LastIndexOf(T, int)"/> 146 243 public int LastIndexOf(T item, int index) { 147 244 return list.LastIndexOf(item, index); 148 245 } 149 246 247 /// <inheritdoc cref="List<T>.LastIndexOf(T, int, int)"/> 150 248 public int LastIndexOf(T item, int index, int count) { 151 249 return list.LastIndexOf(item, index, count); 152 250 } 153 251 252 /// <inheritdoc cref="List<T>.IndexOf(T, int)"/> 154 253 public int IndexOf(T item, int index) { 155 254 return list.IndexOf(item, index); 156 255 } 157 256 257 /// <inheritdoc cref="List<T>.IndexOf(T, int, int)"/> 158 258 public int IndexOf(T item, int index, int count) { 159 259 return list.IndexOf(item, index, count); 160 260 } 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> 162 265 public void AddRange(IEnumerable<T> collection) { 163 266 foreach (T obj in collection) { … … 166 269 } 167 270 271 /// <inheritdoc cref="List<T>.Exists"/> 168 272 public bool Exists(Predicate<T> match) { 169 273 return list.Exists(match); 170 274 } 171 275 276 /// <inheritdoc cref="List<T>.BinarySearch(T)"/> 172 277 public int BinarySearch(T item) { 173 278 return list.BinarySearch(item); 174 279 } 175 280 281 /// <inheritdoc cref="List<T>.BinarySearch(T, System.Collections.Generic.IComparer<T>)"/> 176 282 public int BinarySearch(T item, IComparer<T> comparer) { 177 283 return list.BinarySearch(item, comparer); 178 284 } 179 285 286 /// <inheritdoc cref="List<T>.BinarySearch(int, int, T, System.Collections.Generic.IComparer<T>)"/> 180 287 public int BinarySearch(int index, int count, T item, IComparer<T> comparer) { 181 288 return list.BinarySearch(index, count, item, comparer); 182 289 } 183 290 /// <inheritdoc cref="List<T>.Find"/> 184 291 public T Find(Predicate<T> match) { 185 292 return list.Find(match); 186 293 } 187 294 295 /// <inheritdoc cref="List<T>.FindAll"/> 188 296 public List<T> FindAll(Predicate<T> match) { 189 297 return list.FindAll(match); 190 298 } 191 299 300 /// <inheritdoc cref="List<T>.FindIndex(System.Predicate<T>)"/> 192 301 public int FindIndex(Predicate<T> match) { 193 302 return list.FindIndex(match); 194 303 } 195 304 305 /// <inheritdoc cref="List<T>.FindLast"/> 196 306 public T FindLast(Predicate<T> match) { 197 307 return list.FindLast(match); 198 308 } 199 309 310 /// <inheritdoc cref="List<T>.FindLastIndex(System.Predicate<T>)"/> 200 311 public int FindLastIndex(Predicate<T> match) { 201 312 return list.FindLastIndex(match); 202 313 } 203 314 315 /// <inheritdoc cref="List<T>.Sort()"/> 204 316 public void Sort() { 205 317 list.Sort(); 206 318 } 207 319 320 /// <inheritdoc cref="List<T>.Sort(System.Collections.Generic.IComparer<T>)"/> 208 321 public void Sort(IComparer<T> comparer) { 209 322 list.Sort(comparer); 210 323 } 211 324 325 /// <inheritdoc cref="List<T>.Sort(System.Comparison<T>)"/> 212 326 public void Sort(Comparison<T> comparison) { 213 327 list.Sort(comparison); 214 328 } 215 329 330 /// <inheritdoc cref="List<T>.Reverse()"/> 216 331 public void Reverse() { 217 332 list.Reverse(); 218 333 } 219 334 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> 220 341 public ItemList<TOutput> ConvertAll<TOutput>(Converter<T, TOutput> converter) where TOutput : IItem { 221 342 ItemList<TOutput> targetList = new ItemList<TOutput>(); … … 226 347 } 227 348 349 /// <inheritdoc cref="List<T>.TrueForAll"/> 228 350 public bool TrueForAll(Predicate<T> match) { 229 351 return list.TrueForAll(match); … … 232 354 #endregion 233 355 356 /// <summary> 357 /// Occurs where a new item is added to the list. 358 /// </summary> 234 359 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> 235 366 protected virtual void OnItemAdded(IItem item, int index) { 236 367 if (ItemAdded != null) … … 238 369 OnChanged(); 239 370 } 371 /// <summary> 372 /// Occurs when an element is deleted from the list. 373 /// </summary> 240 374 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> 241 381 protected virtual void OnItemRemoved(IItem item, int index) { 242 382 if (ItemRemoved != null) … … 244 384 OnChanged(); 245 385 } 386 /// <summary> 387 /// Occurs when the list is emptied. 388 /// </summary> 246 389 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> 247 394 protected virtual void OnCleared() { 248 395 if (Cleared != null) -
trunk/sources/HeuristicLab.Data/MatrixDataBaseView.cs
r2 r737 30 30 31 31 namespace HeuristicLab.Data { 32 /// <summary> 33 /// The basic visual representation of a two-dimensional matrix. 34 /// </summary> 32 35 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> 33 42 public ArrayDataBase ArrayDataBase { 34 43 get { return (ArrayDataBase)Item; } … … 36 45 } 37 46 47 /// <summary> 48 /// Initializes a new instance of the class <see cref="MatrixDataBaseView"/>. 49 /// </summary> 38 50 public MatrixDataBaseView() { 39 51 InitializeComponent(); 40 52 } 41 53 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> 42 59 protected override void RemoveItemEvents() { 43 60 ArrayDataBase.Changed -= new EventHandler(ArrayDataBase_Changed); 44 61 base.RemoveItemEvents(); 45 62 } 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> 46 68 protected override void AddItemEvents() { 47 69 base.AddItemEvents(); … … 49 71 } 50 72 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> 51 81 protected virtual bool ValidateData(string element) { 52 82 throw new InvalidOperationException("ValidateData has to be overridden in each inherited class"); 53 83 } 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> 54 94 protected virtual void SetArrayElement(int row, int column, string element) { 55 95 throw new InvalidOperationException("SetArrayElement has to be overridden in each inherited class"); 56 96 } 57 97 98 /// <summary> 99 /// Update all controls with the latest element of the matrix. 100 /// </summary> 58 101 protected override void UpdateControls() { 59 102 base.UpdateControls(); … … 93 136 } 94 137 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> 95 145 private void CreateAndCopyArray(int newRows, int newColumns) { 96 146 Array newArray = Array.CreateInstance(ArrayDataBase.Data.GetType().GetElementType(), newRows, newColumns); -
trunk/sources/HeuristicLab.Data/NullData.cs
r82 r737 27 27 28 28 namespace HeuristicLab.Data { 29 /// <summary> 30 /// A class that represents <c>null</c>. 31 /// </summary> 29 32 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> 30 37 public override object Data { 31 38 get { return null; } … … 33 40 } 34 41 42 /// <summary> 43 /// Initializes a new instance of <see cref="NullData"/> with <c>null</c>. 44 /// </summary> 35 45 public NullData() { 36 46 base.Data = null; 37 47 } 38 48 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> 39 55 public override object Clone(IDictionary<Guid, object> clonedObjects) { 40 56 NullData clone = new NullData(); … … 43 59 } 44 60 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> 45 66 public override void Accept(IObjectDataVisitor visitor) { 46 67 visitor.Visit(this); -
trunk/sources/HeuristicLab.Data/ObjectData.cs
r508 r737 27 27 28 28 namespace HeuristicLab.Data { 29 /// <summary> 30 /// Represents the base class for all base data types. 31 /// </summary> 29 32 public class ObjectData : ItemBase, IObjectData { 30 33 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> 31 38 public virtual object Data { 32 39 get { return myData; } … … 39 46 } 40 47 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> 41 57 public override object Clone(IDictionary<Guid, object> clonedObjects) { 42 58 ObjectData clone = (ObjectData)base.Clone(clonedObjects); … … 50 66 } 51 67 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> 52 74 public override bool Equals(object obj) { 53 75 if(obj == this) return true; // same instance … … 59 81 } 60 82 83 /// <inheritdoc cref="object.GetHashCode"/> 61 84 public override int GetHashCode() { 62 85 return Data.GetHashCode(); 63 86 } 64 87 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> 65 99 public int CompareTo(object obj) { 66 100 IComparable comparable = Data as IComparable; … … 75 109 } 76 110 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> 77 116 public override string ToString() { 78 117 if (Data == null) … … 82 121 } 83 122 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> 84 128 public virtual void Accept(IObjectDataVisitor visitor) { 85 129 visitor.Visit(this); -
trunk/sources/HeuristicLab.Data/ObjectDataVisitorBase.cs
r270 r737 25 25 26 26 namespace HeuristicLab.Data { 27 /// <summary> 28 /// The base class for DataVisitors. 29 /// </summary> 27 30 public class ObjectDataVisitorBase : IObjectDataVisitor{ 28 31 #region IObjectDataVisitor Members -
trunk/sources/HeuristicLab.Data/StringData.cs
r2 r737 27 27 28 28 namespace HeuristicLab.Data { 29 /// <summary> 30 /// The representation of a string. 31 /// </summary> 29 32 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> 30 38 public new string Data { 31 39 get { return (string)base.Data; } … … 33 41 } 34 42 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> 35 47 public StringData() { 36 48 Data = this.GetType().Name; 37 49 } 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> 38 54 public StringData(string data) { 39 55 Data = data; 40 56 } 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> 42 62 public override IView CreateView() { 43 63 return new StringDataView(this); 44 64 } 45 65 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> 46 72 public override object Clone(IDictionary<Guid, object> clonedObjects) { 47 73 StringData clone = new StringData(); … … 51 77 } 52 78 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> 53 87 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) { 54 88 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 56 90 return node; 57 91 } 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> 58 99 public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) { 59 100 base.Populate(node, restoredObjects); … … 61 102 } 62 103 104 /// <summary> 105 /// The string representation of the current instance. 106 /// </summary> 107 /// <returns>The string value.</returns> 63 108 public override string ToString() { 64 109 return Data; 65 110 } 66 111 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> 67 117 public override void Accept(IObjectDataVisitor visitor) { 68 118 visitor.Visit(this); -
trunk/sources/HeuristicLab.Data/StringDataView.cs
r2 r737 30 30 31 31 namespace HeuristicLab.Data { 32 /// <summary> 33 /// The visual representation of the class <see cref="StringData"/>, symbolizing a string value. 34 /// </summary> 32 35 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> 33 41 public StringData StringData { 34 42 get { return (StringData)Item; } … … 36 44 } 37 45 46 /// <summary> 47 /// Initializes a new instance of the class <see cref="StringDataView"/>. 48 /// </summary> 38 49 public StringDataView() { 39 50 InitializeComponent(); 40 51 } 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> 41 58 public StringDataView(StringData stringData) 42 59 : this() { … … 44 61 } 45 62 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> 46 68 protected override void RemoveItemEvents() { 47 69 StringData.Changed -= new EventHandler(StringData_Changed); 48 70 base.RemoveItemEvents(); 49 71 } 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> 50 77 protected override void AddItemEvents() { 51 78 base.AddItemEvents(); … … 53 80 } 54 81 82 /// <summary> 83 /// Update the controls with the latest string value. 84 /// </summary> 55 85 protected override void UpdateControls() { 56 86 base.UpdateControls();
Note: See TracChangeset
for help on using the changeset viewer.