using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MarketData.Generator.Momentum
{
  public class QualityIndicator
  {
    public enum QualityType{IDIndicator=0,ScoreIndicator=1};
    private QualityType qualityType;
    public QualityIndicator()
    {
      qualityType=QualityType.IDIndicator;
    }
    public QualityIndicator(QualityType qualityType)
    {
      this.qualityType=qualityType;
    }
    public QualityIndicator(String strQualityType)
    {
      if(null==strQualityType)
      {
        qualityType=QualityType.IDIndicator;
        return;
      }
      strQualityType=strQualityType.ToUpper();
      if("SCOREINDICATOR".Equals(strQualityType))qualityType=QualityType.ScoreIndicator;
      else qualityType=QualityType.IDIndicator;
    }
    public override String ToString()
    {
      if(qualityType.Equals(QualityType.ScoreIndicator))return "SCOREINDICATOR";
      return "IDINDICATOR";
    }
    public static String ToString(QualityIndicator.QualityType qualityType)
    {
      if(qualityType.Equals(QualityType.ScoreIndicator))return "SCOREINDICATOR";
      return "IDINDICATOR";
    }
    public static QualityType ToQuality(String strQualityType)
    {
      if(strQualityType.Equals("SCOREINDICATOR")) return QualityIndicator.QualityType.ScoreIndicator;
      return QualityIndicator.QualityType.IDIndicator;
    }
    public QualityType Quality
    {
      get{return qualityType;}
      set{qualityType=value;}
    }
  }
}
