Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/12/08 13:10:09 (16 years ago)
Author:
vdorfer
Message:

Created API documentation for HeuristLab.Data namespace (#331)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Data/ObjectData.cs

    r508 r737  
    2727
    2828namespace HeuristicLab.Data {
     29  /// <summary>
     30  /// Represents the base class for all base data types.
     31  /// </summary>
    2932  public class ObjectData : ItemBase, IObjectData {
    3033    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>
    3138    public virtual object Data {
    3239      get { return myData; }
     
    3946    }
    4047
     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>
    4157    public override object Clone(IDictionary<Guid, object> clonedObjects) {
    4258      ObjectData clone = (ObjectData)base.Clone(clonedObjects);
     
    5066    }
    5167
     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>
    5274    public override bool Equals(object obj) {
    5375      if(obj == this) return true; // same instance
     
    5981    }
    6082
     83    /// <inheritdoc cref="object.GetHashCode"/>
    6184    public override int GetHashCode() {
    6285      return Data.GetHashCode();
    6386    }
    6487
     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>
    6599    public int CompareTo(object obj) {
    66100      IComparable comparable = Data as IComparable;
     
    75109    }
    76110
     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>
    77116    public override string ToString() {
    78117      if (Data == null)
     
    82121    }
    83122
     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>
    84128    public virtual void Accept(IObjectDataVisitor visitor) {
    85129      visitor.Visit(this);
Note: See TracChangeset for help on using the changeset viewer.