Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/27/09 09:31:06 (15 years ago)
Author:
vdorfer
Message:

Created API documentation for HeuristicLab.BitVector and HeuristicLab.Constraints namespace and changed a comment in HeuristicLab.IntVector namespace(#331)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Constraints/SubOperatorsTypeConstraint.cs

    r764 r1176  
    2929
    3030namespace HeuristicLab.Constraints {
     31  /// <summary>
     32  /// Constraint where the sub-operator at a specific index has to be an element of a pre-defined group.
     33  /// </summary>
    3134  public class SubOperatorTypeConstraint : ConstraintBase {
    3235    private IntData subOperatorIndex;
     36    /// <summary>
     37    /// Gets the index of the sub-operator.
     38    /// </summary>
    3339    public IntData SubOperatorIndex {
    3440      get { return subOperatorIndex; }
     
    3642
    3743    private List<IOperator> subOperators;
     44    /// <summary>
     45    /// Gets all allowed sub-operators.
     46    /// </summary>
    3847    public IList<IOperator> AllowedSubOperators {
    3948      get {
     
    4251    }
    4352
     53    ///<inheritdoc select="summary"/>
    4454    public override string Description {
    4555      get { return "The sub-operator at a specific index has to be an element of a pre-defined group."; }
    4656    }
    4757
     58    /// <summary>
     59    /// Initializes a new instance of <see cref="SubOperatorTypeConstraint"/>.
     60    /// </summary>
    4861    public SubOperatorTypeConstraint()
    4962      : base() {
     
    5265    }
    5366
     67    /// <summary>
     68    /// Initializes a new instance of <see cref="SubOperatorTypeConstraint"/> with the given
     69    /// <paramref name="index"/>.
     70    /// </summary>
     71    /// <param name="index">The index of the sub-operator.</param>
    5472    public SubOperatorTypeConstraint(int index) : base() {
    5573      subOperatorIndex = new IntData(index);
     
    5775    }
    5876
     77    /// <summary>
     78    /// Adds the given operator to the list of sub-operators.
     79    /// </summary>
     80    /// <remarks>Calls <see cref="ItemBase.FireChanged"/> of base class <see cref="ConstraintBase"/>.</remarks>
     81    /// <param name="op">The operator to add.</param>
    5982    public void AddOperator(IOperator op) {
    6083      if(!subOperators.Contains(op)) {
     
    6487    }
    6588
     89    /// <summary>
     90    /// Removes the given operator from the list of sub-operators.
     91    /// </summary>
     92    /// <remarks>Calls <see cref="ItemBase.FireChanged"/> of base class <see cref="ConstraintBase"/>.</remarks>
     93    /// <param name="op">The operator to remove.</param>
    6694    public void RemoveOperator(IOperator op) {
    6795      if(subOperators.Contains(op)) {
     
    7199    }
    72100
     101    /// <summary>
     102    /// Empties the list of sub-operators.
     103    /// </summary>
    73104    public void Clear() {
    74105      subOperators.Clear();
    75106    }
    76107
     108    /// <summary>
     109    /// Checks whether the given element fulfills the current constraint.
     110    /// </summary>
     111    /// <param name="data">The item to check.</param>
     112    /// <returns><c>true</c> if the constraint could be fulfilled, <c>false</c> otherwise.</returns>
    77113    public override bool Check(IItem data) {
    78114      IOperator op = data as IOperator;
     
    85121    }
    86122
     123    /// <summary>
     124    /// Clones the current instance (deep clone).
     125    /// </summary>
     126    /// <remarks>Deep clone through <see cref="Auxiliary.Clone"/> method of helper class
     127    /// <see cref="Auxiliary"/>.</remarks>
     128    /// <param name="clonedObjects">Dictionary of all already clone objects. (Needed to avoid cycles.)</param>
     129    /// <returns>The cloned object as <see cref="SubOperatorTypeConstraint"/>.</returns>
    87130    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    88131      SubOperatorTypeConstraint clone = new SubOperatorTypeConstraint();
     
    95138    }
    96139
     140    /// <summary>
     141    /// Creates a new instance of <see cref="SubOperatorsTypeConstraintView"/> to represent the current
     142    /// instance visually.
     143    /// </summary>
     144    /// <returns>The created view as <see cref="SubOperatorsTypeConstraintView"/>.</returns>
    97145    public override IView CreateView() {
    98146      return new SubOperatorsTypeConstraintView(this);
     
    100148
    101149    #region persistence
     150    /// <summary>
     151    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     152    /// </summary>
     153    /// <remarks>The index and the list of sub-operators are saved as child nodes with tag names
     154    /// <c>SubOperatorIndex</c> and <c>AllowedSubOperators</c>.</remarks>
     155    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     156    /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>
     157    /// <param name="persistedObjects">The dictionary of all already persisted objects.
     158    /// (Needed to avoid cycles.)</param>
     159    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    102160    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
    103161      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    113171    }
    114172
     173    /// <summary>
     174    /// Loads the persisted constraint from the specified <paramref name="node"/>.
     175    /// </summary>
     176    /// <remarks>The constraint must be saved in a specific way, see <see cref="GetXmlNode"/> for
     177    /// more information.</remarks>
     178    /// <param name="node">The <see cref="XmlNode"/> where the instance is saved.</param>
     179    /// <param name="restoredObjects">The dictionary of all already restored objects.
     180    /// (Needed to avoid cycles.)</param>
    115181    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    116182      base.Populate(node, restoredObjects);
Note: See TracChangeset for help on using the changeset viewer.