- Timestamp:
- 01/27/09 09:31:06 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Constraints/IntBoundedConstraint.cs
r764 r1176 28 28 29 29 namespace HeuristicLab.Constraints { 30 /// <summary> 31 /// Constraint where an integer value is limited by a one or two sided boundary. 32 /// </summary> 30 33 public class IntBoundedConstraint : ConstraintBase { 31 34 private int lowerBound; 35 /// <summary> 36 /// Gets or sets the lower bound of the limit. 37 /// </summary> 38 /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ConstraintBase"/> 39 /// in the setter.</remarks> 32 40 public int LowerBound { 33 41 get { return lowerBound; } … … 38 46 } 39 47 private bool lowerBoundIncluded; 48 /// <summary> 49 /// Gets or sets the boolean flag whether the lower bound should be included. 50 /// </summary> 51 /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ConstraintBase"/> 52 /// in the setter.</remarks> 40 53 public bool LowerBoundIncluded { 41 54 get { return lowerBoundIncluded; } … … 46 59 } 47 60 private bool lowerBoundEnabled; 61 /// <summary> 62 /// Gets or sets the boolean flag whether the lower bound should be enabled. 63 /// </summary> 64 /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ConstraintBase"/> 65 /// in the setter.</remarks> 48 66 public bool LowerBoundEnabled { 49 67 get { return lowerBoundEnabled; } … … 54 72 } 55 73 private int upperBound; 74 /// <summary> 75 /// Gets or sets the upper bound of the limit. 76 /// </summary> 77 /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ConstraintBase"/> 78 /// in the setter.</remarks> 56 79 public int UpperBound { 57 80 get { return upperBound; } … … 62 85 } 63 86 private bool upperBoundIncluded; 87 /// <summary> 88 /// Gets or sets the boolean flag whether the upper bound should be included. 89 /// </summary> 90 /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ConstraintBase"/> 91 /// in the setter.</remarks> 64 92 public bool UpperBoundIncluded { 65 93 get { return upperBoundIncluded; } … … 70 98 } 71 99 private bool upperBoundEnabled; 100 /// <summary> 101 /// Gets or sets the boolean flag whether the upper bound should be enabled. 102 /// </summary> 103 /// <remarks>Calls <see cref="ItemBase.OnChanged"/> of base class <see cref="ConstraintBase"/> 104 /// in the setter.</remarks> 72 105 public bool UpperBoundEnabled { 73 106 get { return upperBoundEnabled; } … … 78 111 } 79 112 113 /// <inheritdoc select="summary"/> 80 114 public override string Description { 81 115 get { return "The integer is limited one or two sided by a lower and/or upper boundary"; } 82 116 } 83 117 118 /// <summary> 119 /// Initializes a new instance of <see cref="IntBoundedConstraint"/>. 120 /// </summary> 84 121 public IntBoundedConstraint() 85 122 : this(int.MinValue, int.MaxValue) { 86 123 } 87 124 125 /// <summary> 126 /// Initializes a new instance of <see cref="IntBoundedConstraint"/> with the two given boundaries. 127 /// </summary> 128 /// <param name="low">The lower bound of the constraint.</param> 129 /// <param name="high">The upper bound of the constraint.</param> 88 130 public IntBoundedConstraint(int low, int high) : base() { 89 131 lowerBound = low; … … 95 137 } 96 138 139 /// <summary> 140 /// Checks whether the given element fulfills the current constraint. 141 /// </summary> 142 /// <param name="data">The item to check.</param> 143 /// <returns><c>true</c> if the constraint could be fulfilled, <c>false</c> otherwise.</returns> 97 144 public override bool Check(IItem data) { 98 145 ConstrainedIntData d = (data as ConstrainedIntData); … … 105 152 } 106 153 154 /// <summary> 155 /// Creates a new instance of <see cref="IntBoundedConstraintView"/> to represent the current 156 /// instance visually. 157 /// </summary> 158 /// <returns>The created view as <see cref="IntBoundedConstraintView"/>.</returns> 107 159 public override IView CreateView() { 108 160 return new IntBoundedConstraintView(this); 109 161 } 110 162 163 /// <summary> 164 /// Clones the current instance (deep clone). 165 /// </summary> 166 /// <param name="clonedObjects">Dictionary of all already clone objects. (Needed to avoid cycles.)</param> 167 /// <returns>The cloned object as <see cref="IntBoundedConstraint"/>.</returns> 111 168 public override object Clone(IDictionary<Guid, object> clonedObjects) { 112 169 IntBoundedConstraint clone = new IntBoundedConstraint(); … … 122 179 123 180 #region persistence 181 /// <summary> 182 /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>. 183 /// </summary> 184 /// <remarks>The properties of the current instance are saved as attributes with special tag names.</remarks> 185 /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param> 186 /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param> 187 /// <param name="persistedObjects">The dictionary of all already persisted objects. 188 /// (Needed to avoid cycles.)</param> 189 /// <returns>The saved <see cref="XmlNode"/>.</returns> 124 190 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) { 125 191 XmlNode node = base.GetXmlNode(name, document, persistedObjects); … … 145 211 } 146 212 213 /// <summary> 214 /// Loads the persisted constraint from the specified <paramref name="node"/>. 215 /// </summary> 216 /// <remarks>The constraint must be saved in a specific way, see <see cref="GetXmlNode"/> for 217 /// more information.</remarks> 218 /// <param name="node">The <see cref="XmlNode"/> where the instance is saved.</param> 219 /// <param name="restoredObjects">The dictionary of all already restored objects. 220 /// (Needed to avoid cycles.)</param> 147 221 public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) { 148 222 base.Populate(node, restoredObjects);
Note: See TracChangeset
for help on using the changeset viewer.