using System;
using System.Collections.Generic;
using System.Text;

using Chart;

using DataPerformer;

namespace DataPerformerUI
{
    internal class ParametrizedSeries : DataPerformer.ParametrizedSeries, ISeries
    {
        private List<IPoint> pointList = new List<IPoint>();

        private object obj;

        internal ParametrizedSeries(MeasureParameter x, MeasureParameter y)
            : base(x, y)
        {
        }

        public override void Step()
        {
            double xp = FormulaEditor.ElementaryIntegerOperation.ToDouble(x());
            double yp = FormulaEditor.ElementaryIntegerOperation.ToDouble(y());
            AddXY(xp, yp);
            pointList.Add(new PointBase(xp, yp));
        }

        public override void Clear()
        {
            base.Clear();
            pointList.Clear();
        }


        #region ISeries Members

        double[,] ISeries.Size
        {
            get 
            {
                DataPerformer.ParametrizedSeries p = this;
                return p.Size;
            }
        }

        IList<IPoint> ISeries.Points
        {
            get 
            {
               // DataPerformer.ParametrizedSeries p = this;
               // return p.Points;
                return pointList;
            
            }
        }

        #endregion
}
}
