Changeset 1673 for trunk/sources/HeuristicLab.Operators/3.3
- Timestamp:
- 04/27/09 16:16:21 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Operators/3.3
- Files:
-
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators/3.3/CombinedOperator.cs
r1530 r1673 26 26 using HeuristicLab.Core; 27 27 using HeuristicLab.Data; 28 using HeuristicLab.Persistence.Default.Decomposers.Storable; 28 29 29 30 namespace HeuristicLab.Operators { … … 33 34 /// </summary> 34 35 public class CombinedOperator : DelegatingOperator { 36 37 [Storable] 35 38 private string myDescription; 36 39 /// <summary> … … 40 43 get { return myDescription; } 41 44 } 45 46 [Storable] 42 47 private IOperatorGraph myOperatorGraph; 43 48 /// <summary> … … 131 136 DescriptionChanged(this, new EventArgs()); 132 137 } 133 134 #region Persistence Methods135 /// <summary>136 /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.137 /// </summary>138 /// <remarks>The description and the operator graph of the current instance are saved as child139 /// nodes with tag names <c>Description</c> <c>OperatorGraph</c>.<br/>140 /// Calls <see cref="OperatorBase.GetXmlNode"/> of base class <see cref="DelegatingOperator"/>.</remarks>141 /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>142 /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>143 /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>144 /// <returns>The saved <see cref="XmlNode"/>.</returns>145 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {146 XmlNode node = base.GetXmlNode(name, document, persistedObjects);147 XmlNode descriptionNode = document.CreateNode(XmlNodeType.Element, "Description", null);148 descriptionNode.InnerText = myDescription;149 node.AppendChild(descriptionNode);150 node.AppendChild(PersistenceManager.Persist("OperatorGraph", OperatorGraph, document, persistedObjects));151 return node;152 }153 /// <summary>154 /// Loads the persisted instance from the specified <paramref name="node"/>.155 /// </summary>156 /// <remarks>Calls <see cref="OperatorBase.Populate"/> of base class <see cref="DelegatingOperator"/>.157 /// <br/> See <see cref="GetXmlNode"/> for further information on how the data must be saved.</remarks>158 /// <param name="node">The <see cref="XmlNode"/> where the operator is saved.</param>159 /// <param name="restoredObjects">The dictionary of all already restored objects.160 /// (Needed to avoid cycles.)</param>161 public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {162 base.Populate(node, restoredObjects);163 XmlNode descriptionNode = node.SelectSingleNode("Description");164 if (descriptionNode != null) myDescription = descriptionNode.InnerText;165 myOperatorGraph = (IOperatorGraph)PersistenceManager.Restore(node.SelectSingleNode("OperatorGraph"), restoredObjects);166 }167 #endregion168 138 } 169 139 } -
trunk/sources/HeuristicLab.Operators/3.3/HeuristicLab.Operators-3.3.csproj
r1670 r1673 5 5 <ProductVersion>9.0.30729</ProductVersion> 6 6 <SchemaVersion>2.0</SchemaVersion> 7 <ProjectGuid>{ A9983BA2-B3B2-475E-8E2C-62050B71D1C5}</ProjectGuid>7 <ProjectGuid>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</ProjectGuid> 8 8 <OutputType>Library</OutputType> 9 9 <AppDesignerFolder>Properties</AppDesignerFolder> 10 10 <RootNamespace>HeuristicLab.Operators</RootNamespace> 11 <AssemblyName>HeuristicLab.Operators-3. 2</AssemblyName>11 <AssemblyName>HeuristicLab.Operators-3.3</AssemblyName> 12 12 <SignAssembly>true</SignAssembly> 13 13 <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile> … … 17 17 <UpgradeBackupLocation> 18 18 </UpgradeBackupLocation> 19 <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> 19 20 </PropertyGroup> 20 21 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> … … 36 37 <ErrorReport>prompt</ErrorReport> 37 38 <WarningLevel>4</WarningLevel> 38 <DocumentationFile>bin\Release\HeuristicLab.Operators-3. 2.XML</DocumentationFile>39 <DocumentationFile>bin\Release\HeuristicLab.Operators-3.3.xml</DocumentationFile> 39 40 <TreatWarningsAsErrors>false</TreatWarningsAsErrors> 40 41 </PropertyGroup> … … 75 76 <ItemGroup> 76 77 <Reference Include="System" /> 78 <Reference Include="System.Core"> 79 <RequiredTargetFramework>3.5</RequiredTargetFramework> 80 </Reference> 77 81 <Reference Include="System.Data" /> 78 82 <Reference Include="System.Drawing" /> … … 135 139 </ItemGroup> 136 140 <ItemGroup> 137 <ProjectReference Include="..\..\HeuristicLab.Constraints\3. 2\HeuristicLab.Constraints-3.2.csproj">138 <Project>{ FCD62C6F-4793-4593-AE9A-0BDCA256EE99}</Project>139 <Name>HeuristicLab.Constraints-3. 2</Name>141 <ProjectReference Include="..\..\HeuristicLab.Constraints\3.3\HeuristicLab.Constraints-3.3.csproj"> 142 <Project>{19C1E42A-4B48-4EFD-B697-899016F1C198}</Project> 143 <Name>HeuristicLab.Constraints-3.3</Name> 140 144 </ProjectReference> 141 <ProjectReference Include="..\..\HeuristicLab.Core\3. 2\HeuristicLab.Core-3.2.csproj">142 <Project>{ F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>143 <Name>HeuristicLab.Core-3. 2</Name>145 <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj"> 146 <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project> 147 <Name>HeuristicLab.Core-3.3</Name> 144 148 </ProjectReference> 145 <ProjectReference Include="..\..\HeuristicLab.Data\3.2\HeuristicLab.Data-3.2.csproj"> 146 <Project>{F473D9AF-3F09-4296-9F28-3C65118DAFFA}</Project> 147 <Name>HeuristicLab.Data-3.2</Name> 149 <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj"> 150 <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project> 151 <Name>HeuristicLab.Data-3.3</Name> 152 </ProjectReference> 153 <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj"> 154 <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project> 155 <Name>HeuristicLab.Persistence-3.3</Name> 148 156 </ProjectReference> 149 157 <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj"> -
trunk/sources/HeuristicLab.Operators/3.3/HeuristicLabOperatorsPlugin.cs
r1530 r1673 29 29 /// Plugin class for HeuristicLab.Operators plugin. 30 30 /// </summary> 31 [ClassInfo(Name = "HeuristicLab.Operators-3.2")] 32 [PluginFile(Filename = "HeuristicLab.Operators-3.2.dll", Filetype = PluginFileType.Assembly)] 33 [Dependency(Dependency = "HeuristicLab.Core-3.2")] 34 [Dependency(Dependency = "HeuristicLab.Data-3.2")] 31 [ClassInfo(Name = "HeuristicLab.Operators-3.3")] 32 [PluginFile(Filename = "HeuristicLab.Operators-3.3.dll", Filetype = PluginFileType.Assembly)] 33 [Dependency(Dependency = "HeuristicLab.Constraints-3.3")] 34 [Dependency(Dependency = "HeuristicLab.Core-3.3")] 35 [Dependency(Dependency = "HeuristicLab.Data-3.3")] 36 [Dependency(Dependency = "HeuristicLab.Persistence-3.3")] 35 37 public class HeuristicLabOperatorsPlugin : PluginBase { 36 38 } -
trunk/sources/HeuristicLab.Operators/3.3/Properties/AssemblyInfo.frame
r581 r1673 54 54 // You can specify all the values or you can default the Revision and Build Numbers 55 55 // by using the '*' as shown below: 56 [assembly: AssemblyVersion("3. 2.0.$WCREV$")]57 [assembly: AssemblyFileVersion("3. 2.0.$WCREV$")]56 [assembly: AssemblyVersion("3.3.0.$WCREV$")] 57 [assembly: AssemblyFileVersion("3.3.0.$WCREV$")] 58 58 [assembly: AssemblyBuildDate("$WCNOW$")] -
trunk/sources/HeuristicLab.Operators/3.3/VariableInjector.cs
r1530 r1673 25 25 using System.Xml; 26 26 using HeuristicLab.Core; 27 using HeuristicLab.Persistence.Default.Decomposers.Storable; 27 28 28 29 namespace HeuristicLab.Operators { … … 31 32 /// </summary> 32 33 public class VariableInjector : OperatorBase { 34 35 [Storable] 33 36 private Dictionary<IVariable, IVariableInfo> variableVariableInfoTable; 37 38 [Storable] 34 39 private Dictionary<IVariableInfo, IVariable> variableInfoVariableTable; 35 40 … … 142 147 } 143 148 #endregion 144 145 #region Persistence Methods146 /// <summary>147 /// Saves the current instance as <see cref="XmlNode"/> in the specified <paramref name="document"/>.148 /// <note type="caution"> Variable infos are not persisted!</note>149 /// </summary>150 /// <remarks>Calls <see cref="OperatorBase.GetXmlNode"/> of base class <see cref="OperatorBase"/>.</remarks>151 /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>152 /// <param name="document">The <see cref="XmlDocument"/> where to save the data.</param>153 /// <param name="persistedObjects">The dictionary of all already persisted objects. (Needed to avoid cycles.)</param>154 /// <returns>The saved <see cref="XmlNode"/>.</returns>155 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {156 XmlNode node = base.GetXmlNode(name, document, persistedObjects);157 // variable infos should not be persisted158 XmlNode infosNode = node.SelectSingleNode("VariableInfos");159 infosNode.RemoveAll();160 return node;161 }162 #endregion163 149 } 164 150 }
Note: See TracChangeset
for help on using the changeset viewer.