- Timestamp:
- 04/27/09 14:45:44 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data/3.3/ConstrainedDoubleData.cs
r1529 r1669 45 45 /// Initializes a new instance of <see cref="ConstrainedDoubleData"/> with default value <c>0.0</c>. 46 46 /// </summary> 47 public ConstrainedDoubleData() : this (0.0) { 47 public ConstrainedDoubleData() 48 : this(0.0) { 48 49 } 49 50 /// <summary> … … 52 53 /// </summary> 53 54 /// <param name="data">The double value to represent.</param> 54 public ConstrainedDoubleData(double data) : base() { 55 public ConstrainedDoubleData(double data) 56 : base() { 55 57 base.Data = new DoubleData(data); 56 58 } … … 84 86 } 85 87 86 /// <summary>87 /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.88 /// </summary>89 /// <remarks>Uses the <see cref="ConstrainedItemBase.GetXmlNode"/> implementation of base class90 /// <see cref="ConstrainedObjectData"/>. The double value is saved as a <see cref="DoubleData"/>91 /// in a child node having the tag name <c>Value</c>.</remarks>92 /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>93 /// <param name="document">The <see cref="XmlDocument"/> where the data is saved.</param>94 /// <param name="persistedObjects">A dictionary of all already persisted objects. (Needed to avoid cycles.)</param>95 /// <returns>The saved <see cref="XmlNode"/>.</returns>96 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {97 XmlNode node = base.GetXmlNode(name, document, persistedObjects);98 node.AppendChild(PersistenceManager.Persist("Value", (DoubleData) base.Data, document, persistedObjects));99 return node;100 }101 /// <summary>102 /// Loads the persisted double value from the specified <paramref name="node"/>.103 /// </summary>104 /// <remarks>The double value must be saved in the child node as a persisted <see cref="DoubleData"/>105 /// having the tag name <c>Value</c> (see <see cref="GetXmlNode"/>).</remarks>106 /// <param name="node">The <see cref="XmlNode"/> where the double is saved.</param>107 /// <param name="restoredObjects">A dictionary of all already restored objects. (Needed to avoid cycles.)</param>108 public override void Populate(XmlNode node, IDictionary<Guid,IStorable> restoredObjects) {109 base.Populate(node, restoredObjects);110 base.Data = (DoubleData)PersistenceManager.Restore(node.SelectSingleNode("Value"), restoredObjects);111 }112 88 } 113 89 }
Note: See TracChangeset
for help on using the changeset viewer.