示例#1
0
 def _deserialize(self, str0_: 'ByteArrayWrapper', pos: int) -> bool:
     id0__ = str0_.deserialize_short(pos)
     if (id0__ <= 0):
         return False
     self.misc_info_id = (id0__)
     iii = str0_.deserialize_short(pos)
     mc = MorphClass()
     mc.value = (iii)
     if (mc.is_misc and mc.is_proper):
         mc.is_misc = False
     self.class0_ = mc
     bbb = 0
     bbb = str0_.deserialize_byte(pos)
     self.gender = Utils.valToEnum(bbb, MorphGender)
     bbb = str0_.deserialize_byte(pos)
     self.number = Utils.valToEnum(bbb, MorphNumber)
     bbb = str0_.deserialize_byte(pos)
     mca = MorphCase()
     mca.value = (bbb)
     self.case_ = mca
     s = str0_.deserialize_string(pos)
     self.normal_tail = s
     s = str0_.deserialize_string(pos)
     self.full_normal_tail = s
     return True
示例#2
0
 def __deserializeMorphRuleVariant(str0_: 'ByteArrayWrapper',
                                   me: 'MorphEngine') -> 'MorphRuleVariant':
     id0_ = str0_.deserializeShort() - 1
     if ((id0_ < 0) or id0_ >= len(me._m_vars)):
         return None
     mrv = MorphRuleVariant._new36(me._m_vars[id0_])
     mc = MorphClass()
     mc.value = (str0_.deserializeShort())
     if (mc.is_misc and mc.is_proper):
         mc.is_misc = False
     mrv.class0_ = mc
     mrv.gender = Utils.valToEnum(str0_.deserializeByte(), MorphGender)
     mrv.number = Utils.valToEnum(str0_.deserializeByte(), MorphNumber)
     mca = MorphCase()
     mca.value = (str0_.deserializeByte())
     mrv.case_ = mca
     mrv.normal_tail = str0_.deserializeString()
     mrv.full_normal_tail = str0_.deserializeString()
     return mrv