Changeset 2218 for branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/ConstantFunctionTree.cs
- Timestamp:
- 07/31/09 12:31:32 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/ConstantFunctionTree.cs
r2216 r2218 24 24 using HeuristicLab.Data; 25 25 using HeuristicLab.GP.Interfaces; 26 using System.Xml; 26 27 27 28 namespace HeuristicLab.GP.StructureIdentification { … … 56 57 } 57 58 58 public override IFunctionTreeClone() {59 public override object Clone() { 59 60 return new ConstantFunctionTree(this); 61 } 62 63 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<System.Guid, IStorable> persistedObjects) { 64 XmlNode node = base.GetXmlNode(name, document, persistedObjects); 65 XmlAttribute valueAttr = document.CreateAttribute("Value"); 66 valueAttr.Value = XmlConvert.ToString(Value); 67 node.Attributes.Append(valueAttr); 68 return node; 69 } 70 71 public override void Populate(XmlNode node, IDictionary<System.Guid, IStorable> restoredObjects) { 72 base.Populate(node, restoredObjects); 73 Value = XmlConvert.ToDouble(node.Attributes["Value"].Value); 60 74 } 61 75
Note: See TracChangeset
for help on using the changeset viewer.