Example #1
0
        /// <summary>
        /// Clones the object.
        /// </summary>
        /// <returns>A clone of the object.</returns>
        public override SpiceObject Clone()
        {
            var clone = new SubCircuit(Name, (Statements)Statements.Clone(), (ParameterCollection)Pins.Clone(), LineInfo);

            foreach (AssignmentParameter defaultParameter in DefaultParameters)
            {
                clone.DefaultParameters.Add((AssignmentParameter)defaultParameter.Clone());
            }

            return(clone);
        }