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

    r1530 r1872  
    2626using HeuristicLab.Core;
    2727using HeuristicLab.Data;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2829
    2930namespace HeuristicLab.Logging {
     
    3233  /// </summary>
    3334  public class PointXYChart : ItemBase, IVisualizationItem {
     35    [Storable]
    3436    private ItemList myValues;
    3537    /// <summary>
     
    4749    }
    4850
     51    [Storable]
    4952    private BoolData myConnectDots;
    5053    /// <summary>
     
    124127        ConnectDotsChanged(this, new EventArgs());
    125128    }
    126 
    127     #region Persistence Methods
    128     /// <summary>
    129     /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.
    130     /// </summary>
    131     /// <remarks>The ConnectDots flag and the values of the current instance are saved as child nodes
    132     /// with tag names <c>ConnectDots</c> and <c>Values</c> respectively.</remarks>
    133     /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
    134     /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>
    135     /// <param name="persistedObjects">The dictionary of all already persisted objects.
    136     /// (Needed to avoid cycles.)</param>
    137     /// <returns>The saved <see cref="XmlNode"/>.</returns>
    138     public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
    139       XmlNode node = base.GetXmlNode(name, document, persistedObjects);
    140       node.AppendChild(PersistenceManager.Persist("ConnectDots",ConnectDots,document,persistedObjects));
    141       node.AppendChild(PersistenceManager.Persist("Values", Values, document, persistedObjects));
    142       return node;
    143     }
    144     /// <summary>
    145     /// Loads the persisted item from the specified <paramref name="node"/>.
    146     /// </summary>
    147     /// <remarks>Has to be saved in a special way, see <see cref="GetXmlNode"/> for further information.</remarks>
    148     /// <param name="node">The <see cref="XmlNode"/> where the PointXYChart is saved.</param>
    149     /// <param name="restoredObjects">The dictionary of all already restored objects.
    150     /// (Needed to avoid cycles.)</param>
    151     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    152       base.Populate(node, restoredObjects);
    153       myConnectDots = (BoolData)PersistenceManager.Restore(node.SelectSingleNode("ConnectDots"), restoredObjects);
    154       myValues = (ItemList)PersistenceManager.Restore(node.SelectSingleNode("Values"), restoredObjects);
    155     }
    156     #endregion
    157129  }
    158130}
Note: See TracChangeset for help on using the changeset viewer.