Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/20/09 15:06:46 (15 years ago)
Author:
epitzer
Message:

Upgrade Charting.Data, Logging, Operators.Programmable, OptimizationFrontend, OffspringSelection, SGA, TestFunctions and ThreadParallelEngine to 3.3 (#603)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Logging/3.3/Log.cs

    r1530 r1872  
    2626using HeuristicLab.Core;
    2727using HeuristicLab.Data;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2829
    2930namespace HeuristicLab.Logging {
     
    3233  /// </summary>
    3334  public class Log : ItemBase, IVisualizationItem {
     35    [Storable]
    3436    private ItemList myItems;
    3537    /// <summary>
     
    8688        ItemsChanged(this, new EventArgs());
    8789    }
    88 
    89     #region Persistence Methods
    90     /// <summary>
    91     /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
    92     /// </summary>
    93     /// <remarks>The items of the current instance are saved as a child node with the tag name
    94     /// <c>Items</c>.</remarks>
    95     /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
    96     /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
    97     /// <param name="persistedObjects">The dictionary of all already persisted objects.
    98     /// (Needed to avoid cycles.)</param>
    99     /// <returns>The saved <see cref="XmlNode"/>.</returns>
    100     public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
    101       XmlNode node = base.GetXmlNode(name, document, persistedObjects);
    102       node.AppendChild(PersistenceManager.Persist("Items", Items, document, persistedObjects));
    103       return node;
    104     }
    105     /// <summary>
    106     /// Loads the persisted item from the specified <paramref name="node"/>.
    107     /// </summary>
    108     /// <remarks>Has to be saved in a special way, see <see cref="GetXmlNode"/> for further information.</remarks>
    109     /// <param name="node">The <see cref="XmlNode"/> where the Log is saved.</param>
    110     /// <param name="restoredObjects">The dictionary of all already restored objects.
    111     /// (Needed to avoid cycles.)</param>
    112     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    113       base.Populate(node, restoredObjects);
    114       myItems = (ItemList)PersistenceManager.Restore(node.SelectSingleNode("Items"), restoredObjects);
    115     }
    116     #endregion
    11790  }
    11891}
Note: See TracChangeset for help on using the changeset viewer.