• Home
  • Raw
  • Download

Lines Matching refs:conv

560 		for conv in cls.converters:
561 size = conv.getRecordSize(reader)
564 if conv.repeat:
565 if conv.repeat in reader:
566 countValue = reader[conv.repeat]
579 for conv in self.getConverters():
580 if conv.repeat:
581 if not hasattr(self, conv.name):
582 setattr(self, conv.name, [])
583 countValue = len(getattr(self, conv.name)) - conv.aux
585 count_conv = self.getConverterByName(conv.repeat)
586 setattr(self, conv.repeat, countValue)
589 if propagator and conv.repeat in propagator:
590 propagator[conv.repeat].setValue(countValue)
592 if conv.aux and not eval(conv.aux, None, self.__dict__):
594 if hasattr(self, conv.name):
596 if hasattr(conv, 'writeNullOffset'):
597 setattr(self, conv.name, None) # Warn?
606 for conv in self.getConverters():
607 if conv.name == "SubTable":
608 conv = conv.getConverter(reader.tableTag,
610 if conv.name == "ExtSubTable":
611 conv = conv.getConverter(reader.tableTag,
613 if conv.name == "FeatureParams":
614 conv = conv.getConverter(reader["FeatureTag"])
615 if conv.name == "SubStruct":
616 conv = conv.getConverter(reader.tableTag,
619 if conv.repeat:
620 if isinstance(conv.repeat, int):
621 countValue = conv.repeat
622 elif conv.repeat in table:
623 countValue = table[conv.repeat]
626 countValue = reader[conv.repeat]
627 countValue += conv.aux
628 table[conv.name] = conv.readArray(reader, font, table, countValue)
630 if conv.aux and not eval(conv.aux, None, table):
632 table[conv.name] = conv.read(reader, font, table)
633 if conv.isPropagated:
634 reader[conv.name] = table[conv.name]
636 name = conv.name
665 for conv in self.getConverters():
666 value = table.get(conv.name) # TODO Handle defaults instead of defaulting to None!
667 if conv.repeat:
670 countValue = len(value) - conv.aux
671 if isinstance(conv.repeat, int):
672 assert len(value) == conv.repeat, 'expected %d values, got %d' % (conv.repeat, len(value))
673 elif conv.repeat in table:
674 CountReference(table, conv.repeat, value=countValue)
677 writer[conv.repeat].setValue(countValue)
681 conv.write(writer, font, table, value, i)
683 name = value.__class__.__name__ if value is not None else conv.name
686 elif conv.isCount:
694 ref = writer.writeCountReference(table, conv.name, conv.staticSize)
695 table[conv.name] = None
696 if conv.isPropagated:
697 writer[conv.name] = ref
698 elif conv.isLookupType:
702 if conv.name not in table:
703 table[conv.name] = None
704 ref = writer.writeCountReference(table, conv.name, conv.staticSize, table[conv.name])
707 if conv.aux and not eval(conv.aux, None, table):
710 conv.write(writer, font, table, value)
712 name = value.__class__.__name__ if value is not None else conv.name
715 if conv.isPropagated:
716 writer[conv.name] = value
740 for conv in self.getConverters():
741 if conv.repeat:
742 value = getattr(self, conv.name, [])
745 conv.xmlWrite(xmlWriter, font, item, conv.name,
748 if conv.aux and not eval(conv.aux, None, vars(self)):
750 value = getattr(self, conv.name, None) # TODO Handle defaults instead of defaulting to None!
751 conv.xmlWrite(xmlWriter, font, value, conv.name, [])
755 conv = self.getConverterByName(name)
758 value = conv.xmlRead(attrs, content, font)
759 if conv.repeat:
760 seq = getattr(self, conv.name, None)
763 setattr(self, conv.name, seq)
766 setattr(self, conv.name, value)