public void CopyFromVariant(MorphRuleVariant src)
 {
     if (src == null)
     {
         return;
     }
     Tail = src.Tail;
     this.CopyFrom(src);
     MiscInfoId     = src.MiscInfoId;
     NormalTail     = src.NormalTail;
     FullNormalTail = src.FullNormalTail;
     RuleId         = src.RuleId;
 }
 public bool Compare(MorphRuleVariant mrv)
 {
     if ((mrv.Class != Class || mrv.Gender != Gender || mrv.Number != Number) || mrv.Case != Case)
     {
         return(false);
     }
     if (mrv.MiscInfoId != MiscInfoId)
     {
         return(false);
     }
     if (mrv.NormalTail != NormalTail)
     {
         return(false);
     }
     return(true);
 }
示例#3
0
        internal void Deserialize(ByteArrayWrapper str, ref int pos)
        {
            int ii = str.DeserializeShort(ref pos);

            Id = ii;
            short id = (short)1;

            while (!str.IsEOF(pos))
            {
                byte b = str.DeserializeByte(ref pos);
                if (b == 0xFF)
                {
                    break;
                }
                pos--;
                string key = str.DeserializeString(ref pos);
                if (key == null)
                {
                    key = "";
                }
                List <MorphRuleVariant> li = new List <MorphRuleVariant>();
                while (!str.IsEOF(pos))
                {
                    MorphRuleVariant mrv = new MorphRuleVariant();
                    if (!mrv.Deserialize(str, ref pos))
                    {
                        break;
                    }
                    mrv.Tail   = key;
                    mrv.RuleId = (short)ii;
                    mrv.Id     = id++;
                    li.Add(mrv);
                }
                this.Add(key, li);
            }
        }