Free cookie consent management tool by TermsFeed Policy Generator

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

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

File:
1 edited

Legend:

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

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