Lines Matching refs:f
1043 self.tag = min([f.tag for f in self.fields])
1053 for f in self.fields:
1054 result += ' ' + str(f).replace('\n', '\n ') + '\n'
1062 return ''.join([f.types() for f in self.fields])
1066 for f in self.fields:
1067 deps += f.get_dependencies()
1077 return ''.join([f.tags() for f in self.fields])
1080 return max(f.data_size(dependencies) for f in self.fields)
1086 for f in self.fields:
1087 size = EncodedSize(f.encoded_size(dependencies))
1091 dynamic_sizes[f.tag] = size
1117 return bool([f for f in self.fields if f.has_callbacks()])
1120 return bool([f for f in self.fields if f.requires_custom_field_callback()])
1159 for i, f in enumerate(desc.oneof_decl):
1160 oneof_options = get_nanopb_suboptions(desc, message_options, self.name + f.name)
1166 oneof = OneOf(self.name, f, oneof_options)
1171 for f in desc.field:
1172 field_options = get_nanopb_suboptions(f, message_options, self.name + f.name)
1179 field = Field(self.name, f, field_options)
1180 if hasattr(f, 'oneof_index') and f.HasField('oneof_index'):
1181 if hasattr(f, 'proto3_optional') and f.proto3_optional:
1182 no_unions.append(f.oneof_index)
1184 if f.oneof_index in no_unions:
1186 elif f.oneof_index in self.oneofs:
1187 self.oneofs[f.oneof_index].add_field(field)
1189 if self.oneofs[f.oneof_index] not in self.fields:
1190 self.fields.append(self.oneofs[f.oneof_index])
1209 for f in self.fields:
1210 deps += f.get_dependencies()
1257 return ''.join([f.types() for f in self.fields])
1271 for f in self.fields:
1272 if not isinstance(f, OneOf):
1273 if f.rules == 'REQUIRED':
1279 for f in self.fields:
1280 if isinstance(f, OneOf):
1281 for f2 in f.fields:
1284 yield f
1297 for f in self.fields:
1298 if isinstance(f, OneOf):
1299 count += len(f.fields)
1323 has_callbacks = bool([f for f in self.fields if f.has_callbacks()])
1395 return sum(f.data_size(dependencies) for f in self.fields)
2113 f = ProtoFile(fdesc, file_options)
2114 f.optfilename = optfilename
2116 return f
2131 f = parse_file(filename, fdesc, options)
2136 deps = list(f.fdesc.dependency)
2140 f.add_dependency(other_files[dep])
2155 …excludes = ['nanopb.proto', 'google/protobuf/descriptor.proto'] + options.exclude + list(f.file_op…
2156 includes = [d for d in f.fdesc.dependency if d not in excludes]
2158 headerdata = ''.join(f.generate_header(includes, headerbasename, options))
2159 sourcedata = ''.join(f.generate_source(headerbasename, options))
2165 raise Exception("Following patterns in " + f.optfilename + " did not match any fields: "
2168 … sys.stderr.write("Following patterns in " + f.optfilename + " did not match any fields: "
2245 with open(path, 'w') as f:
2246 f.write(data)
2322 f = response.file.add()
2323 f.name = results['headername']
2324 f.content = results['headerdata']
2326 f = response.file.add()
2327 f.name = results['sourcename']
2328 f.content = results['sourcedata']