Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/03/09 02:40:39 (15 years ago)
Author:
swagner
Message:

Refactoring of the operator architecture (#95)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Operator Architecture Refactoring/HeuristicLab.Core/3.2/AtomicOperation.cs

    r1529 r1994  
    3737      get { return myOperator; }
    3838    }
    39     private IScope myScope; 
     39    private IEnvironment myEnvironment;
     40    /// <summary>
     41    /// Gets the current environment as <see cref="IEnvironment"/>.
     42    /// </summary>
     43    public IEnvironment Environment {
     44      get { return myEnvironment; }
     45    }
     46    private IScope myScope;
    4047    /// <summary>
    4148    /// Gets the current scope as <see cref="IScope"/>.
     
    5461    /// </summary>
    5562    /// <param name="op">The operator to assign.</param>
     63    /// <param name="environment">The environment to assign.</param>
    5664    /// <param name="scope">The scope to assign.</param>
    57     public AtomicOperation(IOperator op, IScope scope) {
     65    public AtomicOperation(IOperator op, IEnvironment environment, IScope scope) {
    5866      myOperator = op;
     67      myEnvironment = environment;
    5968      myScope = scope;
    6069    }
     
    7180      clonedObjects.Add(Guid, clone);
    7281      clone.myOperator = (IOperator)Auxiliary.Clone(Operator, clonedObjects);
     82      clone.myEnvironment = (IEnvironment)Auxiliary.Clone(Environment, clonedObjects);
    7383      clone.myScope = (IScope)Auxiliary.Clone(Scope, clonedObjects);
    7484      return clone;
     
    8393    /// class <see cref="ItemBase"/>. <br/>
    8494    /// The operator is saved as child node having the tag name <c>Operator</c>.<br/>
     95    /// The environment is also saved as a child node having the tag name <c>Environment</c>.<br/>
    8596    /// The scope is also saved as a child node having the tag name <c>Scope</c>.</remarks>
    8697    /// <param name="name">The (tag)name of the <see cref="XmlNode"/>.</param>
     
    91102      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
    92103      node.AppendChild(PersistenceManager.Persist("Operator", Operator, document, persistedObjects));
     104      node.AppendChild(PersistenceManager.Persist("Environment", Environment, document, persistedObjects));
    93105      node.AppendChild(PersistenceManager.Persist("Scope", Scope, document, persistedObjects));
    94106      return node;
     
    99111    /// <remarks>Calls <see cref="HeuristicLab.Core.StorableBase.Populate"/> of base class
    100112    /// <see cref="ItemBase"/>.<br/>
    101     /// The operator must be saved as a child node with the tag name <c>Operator</c>, also the scope must
     113    /// The operator must be saved as a child node with the tag name <c>Operator</c>, the environment must be saved as
     114    /// a child node with the tag name <c>Environment</c>, and also the scope must
    102115    /// be saved as a child node having the tag name <c>Scope</c> (see <see cref="GetXmlNode"/>).</remarks>
    103116    /// <param name="node">The <see cref="XmlNode"/> where the operation is saved.</param>
     
    106119      base.Populate(node, restoredObjects);
    107120      myOperator = (IOperator)PersistenceManager.Restore(node.SelectSingleNode("Operator"), restoredObjects);
     121      myEnvironment = (IEnvironment)PersistenceManager.Restore(node.SelectSingleNode("Environment"), restoredObjects);
    108122      myScope = (IScope)PersistenceManager.Restore(node.SelectSingleNode("Scope"), restoredObjects);
    109123    }
Note: See TracChangeset for help on using the changeset viewer.