using System;

namespace MarketData.Generator.MGSHMomentum
{
  public class MGSHQualityIndicator
  {
    public enum QualityType{IDIndicator=0,ScoreIndicator=1};
    private QualityType qualityType;
    public MGSHQualityIndicator()
    {
      qualityType=QualityType.IDIndicator;
    }
    public MGSHQualityIndicator(QualityType qualityType)
    {
      this.qualityType=qualityType;
    }
    public MGSHQualityIndicator(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(MGSHQualityIndicator.QualityType qualityType)
    {
      if(qualityType.Equals(QualityType.ScoreIndicator))return "SCOREINDICATOR";
      return "IDINDICATOR";
    }
    public static QualityType ToQuality(String strQualityType)
    {
      if(strQualityType.Equals("SCOREINDICATOR")) return MGSHQualityIndicator.QualityType.ScoreIndicator;
      return MGSHQualityIndicator.QualityType.IDIndicator;
    }
    public QualityType Quality
    {
      get{return qualityType;}
      set{qualityType=value;}
    }
  }
}
