Changeset 1872 for trunk/sources/HeuristicLab.Logging/3.3/PointXYChart.cs
- Timestamp:
- 05/20/09 15:06:46 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Logging/3.3/PointXYChart.cs
r1530 r1872 26 26 using HeuristicLab.Core; 27 27 using HeuristicLab.Data; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 29 30 namespace HeuristicLab.Logging { … … 32 33 /// </summary> 33 34 public class PointXYChart : ItemBase, IVisualizationItem { 35 [Storable] 34 36 private ItemList myValues; 35 37 /// <summary> … … 47 49 } 48 50 51 [Storable] 49 52 private BoolData myConnectDots; 50 53 /// <summary> … … 124 127 ConnectDotsChanged(this, new EventArgs()); 125 128 } 126 127 #region Persistence Methods128 /// <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 nodes132 /// 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 #endregion157 129 } 158 130 }
Note: See TracChangeset
for help on using the changeset viewer.