#region License Information /* HeuristicLab * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL) * * This file is part of HeuristicLab. * * HeuristicLab is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * HeuristicLab is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with HeuristicLab. If not, see . */ #endregion using System; using System.Collections.Generic; using System.Text; using System.Xml; namespace HeuristicLab.Core { /// /// Interface to represent objects that are de- and serializeable. /// public interface IStorable { /// /// Gets the objects unique identifier. /// Guid Guid { get; } /// /// Clones the current instance (deep clone). /// /// The cloned object. object Clone(); /// /// Clones the current instance, considering already cloned objects. /// /// All already cloned objects. (Needed to avoid cycles.) /// The cloned object. object Clone(IDictionary clonedObjects); /// /// Saves the current instance as in the specified /// . /// /// The (tag)name of the . /// The where to save the data. /// The dictionary of all already persisted objects. /// (Needed to avoid cycles.) /// The saved . XmlNode GetXmlNode(string name, XmlDocument document, IDictionary persistedObjects); /// /// Loads the persisted object from the specified . /// /// The where the object is saved. /// A dictionary of all already restored objects. (Needed to avoid /// cycles.) void Populate(XmlNode node, IDictionary restoredObjects); } }