Lines Matching refs:name
359 self.values = [(names + x.name, x.number) for x in desc.value]
361 self.values = [(base_name + x.name, x.number) for x in desc.value]
363 self.value_longnames = [self.names + x.name for x in desc.value]
387 for index, (name, value) in enumerate(self.values):
399 enum_values.append(" %s = %d%s %s" % (name, value, comma, trailing_comment))
473 self.name = desc.name
555 "max_count is not given." % self.name)
559 "but max_count is not given." % self.name)
602 "but max_size is not given." % self.name)
611 self.ctype = self.struct_name + self.name + 't'
634 result += ' pb_callback_t cb_' + self.name + ';\n'
635 result += ' pb_size_t ' + self.name + '_count;\n'
639 result += ' struct _%s *%s;' % (self.ctype, self.name)
642 result += ' %s (*%s)%s;' % (self.ctype, self.name, self.array_decl)
645 result += ' %s **%s;' % (self.ctype, self.name)
647 result += ' %s *%s;' % (self.ctype, self.name)
649 result += ' %s %s;' % (self.callback_datatype, self.name)
652 result += ' pb_callback_t cb_' + self.name + ';\n'
655 result += ' bool has_' + self.name + ';\n'
657 result += ' pb_size_t ' + self.name + '_count;\n'
658 result += ' %s %s%s;' % (self.ctype, self.name, self.array_decl)
770 identifier = '%s_%s_tag' % (self.struct_name, self.name)
777 name = self.name
783 name = '(%s,%s,%s)' % (self.union_name, self.name, self.union_name + '.' + self.name)
785 name = '(%s,%s,%s)' % (self.union_name, self.name, self.name)
792 name + ',',
898 % (self.struct_name, self.name))
932 self.name = 'extensions'
1002 result += 'pb_byte_t %s_default[] = {0x00};\n' % self.msg.name
1007 result += ' &%s_msg\n' % self.msg.name
1019 self.name = oneof_desc.name
1031 field.union_name = self.name
1049 result += ' pb_callback_t cb_' + self.name + ';\n'
1051 result += ' pb_size_t which_' + self.name + ";\n"
1058 result += ' } ' + self.name + ';'
1111 union_name = "%s_%s_size_union" % (self.struct_name, self.name)
1130 self.name = names
1150 self.callback_function = "%s_callback" % self.name
1160 oneof_options = get_nanopb_suboptions(desc, message_options, self.name + f.name)
1166 oneof = OneOf(self.name, f, oneof_options)
1172 field_options = get_nanopb_suboptions(f, message_options, self.name + f.name)
1179 field = Field(self.name, f, field_options)
1198 field_options = get_nanopb_suboptions(desc, message_options, self.name + 'extensions')
1201 self.fields.append(ExtensionRange(self.name, range_start, field_options))
1221 result += 'typedef struct _%s { %s\n' % (self.name, trailing_comment)
1241 result += '\n/* @@protoc_insertion_point(struct:%s) */' % self.name
1248 result += ' %s;' % self.name
1308 while any(field.name == Field.macro_x_param for field in self.all_fields()):
1310 while any(field.name == Field.macro_a_param for field in self.all_fields()):
1317 result = '#define %s_FIELDLIST(%s, %s) \\\n' % (self.name,
1327 result += "#define %s_CALLBACK %s\n" % (self.name, self.callback_function)
1329 result += "#define %s_CALLBACK NULL\n" % self.name
1334 result += '#define %s_DEFAULT (const pb_byte_t*)"%s\\x00"\n' % (self.name, hexcoded)
1336 result += '#define %s_DEFAULT NULL\n' % self.name
1341 … result += "#define %s_%s_%s_MSGTYPE %s\n" % (self.name, field.union_name, field.name, field.ctype)
1343 result += "#define %s_%s_MSGTYPE %s\n" % (self.name, field.name, field.ctype)
1349 result += 'struct MessageDescriptor<%s> {\n' % (self.name)
1352 result += ' return &%s_msg;\n' % (self.name)
1363 result = 'PB_BIND(%s, %s, %s)\n' % (self.name, self.name, width)
1441 …ion("Could not find enum type %s while generating default values for %s.\n" % (enumname, self.name)
1470 setattr(msg, field.name, field.default_value)
1472 setattr(msg, field.name, codecs.escape_decode(field.default_value)[0])
1474 setattr(msg, field.name, float(field.default_value))
1476 setattr(msg, field.name, field.default_value == 'true')
1478 setattr(msg, field.name, int(field.default_value))
1495 sub_names = names + submsg.name
1497 yield Names(submsg.name), submsg
1539 dependencies[str(message.name)] = set(message.get_dependencies())
1540 message_by_name[str(message.name)] = message
1632 name = create_name(enum.name)
1633 enum_options = get_nanopb_suboptions(enum, self.file_options, name)
1634 self.enums.append(Enum(name, enum, enum_options, index, self.comment_locations))
1637 name = create_name(names)
1638 message_options = get_nanopb_suboptions(message, self.file_options, name)
1648 … self.messages.append(Message(name, message, message_options, index, self.comment_locations))
1650 name = create_name(names + enum.name)
1651 enum_options = get_nanopb_suboptions(enum, message_options, name)
1652 self.enums.append(Enum(name, enum, enum_options, index, self.comment_locations))
1655 name = create_name(names + extension.name)
1656 field_options = get_nanopb_suboptions(extension, self.file_options, name)
1663 self.extensions.append(ExtensionField(name, extension, field_options))
1671 self.dependencies[str(msg.name)] = msg
1771 identifier = '%s_init_default' % msg.name
1774 identifier = '%s_init_zero' % msg.name
1790 yield 'extern const pb_msgdesc_t %s_msg;\n' % msg.name
1795 yield '#define %s_fields &%s_msg\n' % (msg.name, msg.name)
1801 identifier = '%s_size' % msg.name
1832 yield '#define PB_MSG_%d %s\n' % (msg.msgid, msg.name)
1844 yield '\tPB_MSG(%d,%s,%s) \\\n' % (msg.msgid, m, msg.name)
1849 yield '#define %s_msgid %d\n' % (msg.name, msg.msgid)
1909 … yield '#error Properly detecting missing required fields in %s requires \\\n' % largest_msg.name
1958 sys.stderr.write("%s:%d: " % (infile.name, i + 1) +
1968 sys.stderr.write("%s:%d: " % (infile.name, i + 1) +
1976 def get_nanopb_suboptions(subdesc, options, name): argument
1985 dotname = '.'.join(name.parts)
2217 fdescs[fdesc.name] = fdesc
2223 other_files[fdesc.name] = parse_file(fdesc.name, fdesc, options)
2228 results = process_file(fdesc.name, fdesc, options, other_files)
2315 other_files[fdesc.name] = parse_file(fdesc.name, fdesc, options)
2319 if fdesc.name == filename:
2323 f.name = results['headername']
2327 f.name = results['sourcename']