Free cookie consent management tool by TermsFeed Policy Generator

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

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

File:
1 edited

Legend:

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

    r47 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// Represents a graph of operators.
     30  /// </summary>
    2831  public class OperatorGraph : ItemBase, IOperatorGraph {
    2932    private IDictionary<Guid, IOperator> myOperators;
     33    /// <summary>
     34    /// Gets all operators of the current instance.
     35    /// </summary>
    3036    public ICollection<IOperator> Operators {
    3137      get { return myOperators.Values; }
    3238    }
    3339    private IOperator myInitialOperator;
     40    /// <summary>
     41    /// Gets or sets the initial operator (the starting one).
     42    /// </summary>
     43    /// <remarks>Calls <see cref="OnInitialOperatorChanged"/> in the setter.</remarks>
    3444    public IOperator InitialOperator {
    3545      get { return myInitialOperator; }
     
    4252    }
    4353
     54    /// <summary>
     55    /// Initializes a new instance of <see cref="OperatorGraph"/>.
     56    /// </summary>
    4457    public OperatorGraph() {
    4558      myOperators = new Dictionary<Guid, IOperator>();
    4659    }
    4760
     61    /// <summary>
     62    /// Creates a new instance of <see cref="OperatorGraphView"/> to represent the current instance
     63    /// visually.
     64    /// </summary>
     65    /// <returns>The created view as <see cref="OperatorGraphView"/>.</returns>
    4866    public override IView CreateView() {
    4967      return new OperatorGraphView(this);
    5068    }
    5169
     70    /// <summary>
     71    /// Clones the current instance (deep clone).
     72    /// </summary>
     73    /// <remarks>Deep clone through <see cref="Auxiliary.Clone"/> method of helper class
     74    /// <see cref="Auxiliary"/>.</remarks>
     75    /// <param name="clonedObjects">Dictionary of all already cloned objects. (Needed to avoid cycles.)</param>
     76    /// <returns>The cloned object as <see cref="OperatorGraph"/>.</returns>
    5277    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    5378      OperatorGraph clone = new OperatorGraph();
     
    6085    }
    6186
     87    /// <inheritdoc/>
     88    /// <remarks>Calls <see cref="OnOperatorAdded"/>.</remarks>
    6289    public void AddOperator(IOperator op) {
    6390      if (!myOperators.ContainsKey(op.Guid)) {
     
    6996      }
    7097    }
     98    /// <inheritdoc/>
     99    /// <remarks>Calls <see cref="OnOperatorRemoved"/>.</remarks>
    71100    public void RemoveOperator(Guid guid) {
    72101      IOperator op = GetOperator(guid);
     
    87116      }
    88117    }
     118    /// <inheritdoc/>
    89119    public IOperator GetOperator(Guid guid) {
    90120      IOperator op;
     
    94124        return null;
    95125    }
     126    /// <inheritdoc/>
    96127    public void Clear() {
    97128      Guid[] guids = new Guid[Operators.Count];
     
    105136    }
    106137
     138    /// <inheritdoc/>
    107139    public event EventHandler<OperatorEventArgs> OperatorAdded;
     140    /// <summary>
     141    /// Fires a new <c>OperatorAdded</c> event.
     142    /// </summary>
     143    /// <param name="op">The operator that has been added.</param>
    108144    protected virtual void OnOperatorAdded(IOperator op) {
    109145      if (OperatorAdded != null)
    110146        OperatorAdded(this, new OperatorEventArgs(op));
    111147    }
     148    /// <inheritdoc/>
    112149    public event EventHandler<OperatorEventArgs> OperatorRemoved;
     150    /// <summary>
     151    /// Fires a new <c>OperatorRemoved</c> event.
     152    /// </summary>
     153    /// <param name="op">The operator that has been removed.</param>
    113154    protected virtual void OnOperatorRemoved(IOperator op) {
    114155      if (OperatorRemoved != null)
    115156        OperatorRemoved(this, new OperatorEventArgs(op));
    116157    }
     158    /// <inheritdoc/>
    117159    public event EventHandler InitialOperatorChanged;
     160    /// <summary>
     161    /// Fires a new <c>InitialOperatorChanged</c> event.
     162    /// </summary>
    118163    protected virtual void OnInitialOperatorChanged() {
    119164      if (InitialOperatorChanged != null)
     
    122167
    123168    #region Persistence Methods
     169    /// <summary>
     170    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     171    /// </summary>
     172    /// <remarks>Calls <see cref="StorableBase.GetXmlNode"/> of base class <see cref="ItemBase"/>.<br/>
     173    /// To save the operators of the current instance a child node is created with the tag name
     174    /// <c>Operators</c>. Beyond this child node all operators are saved as child nodes themselves.<br/>
     175    /// The initial operator is saved as child node with the tag name <c>InitialOperator</c>.</remarks>
     176    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     177    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     178    /// <param name="persistedObjects">The dictionary of all already persisted objects.
     179    /// (Needed to avoid cycles.)</param>
     180    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    124181    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    125182      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
     
    132189      return node;
    133190    }
     191    /// <summary>
     192    /// Loads the persisted operator graph from the specified <paramref name="node"/>.
     193    /// </summary>
     194    /// <remarks>See <see cref="GetXmlNode"/> to get more information about how the graph must be saved. <br/>
     195    /// Calls <see cref="StorableBase.Populate"/> of base class <see cref="ItemBase"/>.</remarks>
     196    /// <param name="node">The <see cref="XmlNode"/> where the operator graph is saved.</param>
     197    /// <param name="restoredObjects">The dictionary of all already restored objects.
     198    /// (Needed to avoid cycles.)</param>
    134199    public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    135200      base.Populate(node, restoredObjects);
Note: See TracChangeset for help on using the changeset viewer.