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/StorableBase.cs

    r40 r776  
    2626
    2727namespace HeuristicLab.Core {
     28  /// <summary>
     29  /// The base class for all storable objects.
     30  /// </summary>
    2831  public abstract class StorableBase : IStorable {
    2932    private Guid myGuid;
     33    /// <summary>
     34    /// Gets the Guid of the item.
     35    /// </summary>
    3036    public Guid Guid {
    3137      get { return myGuid; }
    3238    }
    3339
     40    /// <summary>
     41    /// Initializes a new instance of the class <see cref="StorableBase"/> with a new <see cref="Guid"/>.
     42    /// </summary>
    3443    protected StorableBase() {
    3544      myGuid = Guid.NewGuid();
    3645    }
    3746
     47    /// <summary>
     48    /// Clones the current instance (deep clone).
     49    /// </summary>
     50    /// <remarks>Uses the <see cref="Auxiliary.Clone"/> method of the class <see cref="Auxiliary"/>.</remarks>
     51    /// <returns>The clone.</returns>
    3852    public object Clone() {
    3953      return Auxiliary.Clone(this, new Dictionary<Guid, object>());
    4054    }
     55    /// <summary>
     56    /// Clones the current instance with the <see cref="M:Activator.CreateInstance"/>
     57    /// method of <see cref="Activator"/>.
     58    /// </summary>
     59    /// <param name="clonedObjects">All already cloned objects.</param>
     60    /// <returns>The clone.</returns>
    4161    public virtual object Clone(IDictionary<Guid, object> clonedObjects) {
    4262      object clone = Activator.CreateInstance(this.GetType());
     
    4565    }
    4666
     67    /// <summary>
     68    /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
     69    /// </summary>
     70    /// <remarks>The type of the current instance is saved as <see cref="XmlAttribute"/> with tag name
     71    /// <c>Type</c>, the guid is also saved as an attribute with the tag name <c>GUID</c>.</remarks>
     72    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     73    /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
     74    /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>
     75    /// <returns>The saved <see cref="XmlNode"/>.</returns>
    4776    public virtual XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
    4877      XmlNode node = document.CreateNode(XmlNodeType.Element, name, null);
     
    5584      return node;
    5685    }
     86    /// <summary>
     87    /// Loads the persisted object from the specified <paramref name="node"/>.
     88    /// </summary>
     89    /// <remarks>Loads only guid; type,... already loaded by the <see cref="PersistenceManager"/>.</remarks>
     90    /// <param name="node">The <see cref="XmlNode"/> where the object is saved.</param>
     91    /// <param name="restoredObjects">The dictionary of all already restored objects.
     92    /// (Needed to avoid cycles.)</param>
    5793    public virtual void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {
    5894      myGuid = new Guid(node.Attributes["GUID"].Value);
Note: See TracChangeset for help on using the changeset viewer.