#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;
using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
namespace HeuristicLab.Core {
///
/// Represents a library of operators consisting of one .
///
[Creatable("Libraries")]
[Item("Operator Library", "A library that contains multiple operators.")]
public class OperatorLibrary : ItemBase, IOperatorLibrary {
[Storable]
private IOperatorGroup myGroup;
///
/// Gets the operator group of the current instance.
///
public IOperatorGroup Group {
get { return myGroup; }
}
///
/// Initializes a new instance of .
///
public OperatorLibrary() {
myGroup = new OperatorGroup();
}
///
/// Clones the current instance (deep clone).
///
/// Deep clone through method of helper class
/// .
/// Dictionary of all already cloned objects. (Needed to avoid cycles.)
/// The cloned object as .
public override IItem Clone(ICloner cloner) {
OperatorLibrary clone = new OperatorLibrary();
cloner.RegisterClonedObject(this, clone);
clone.myGroup = (IOperatorGroup)cloner.Clone(Group);
return clone;
}
}
}