Home | History | Annotate | Download | only in protobuf_c

Lines Matching refs:Descriptor

52              "Attempt to modify a frozen descriptor. Once descriptors are "
53 "added to the descriptor pool, they may not be modified.");
112 * Creates a new, empty, descriptor pool.
137 Descriptor* descriptor) {
139 upb_symtab_add(self->symtab, (upb_def**)&descriptor->msgdef, 1,
141 "Adding Descriptor to DescriptorPool failed");
154 * DescriptorPool.add(descriptor)
156 * Adds the given Descriptor or EnumDescriptor to this pool. All references to
157 * other types in a Descriptor's fields must be resolvable within this pool or
169 "Second argument must be a Descriptor or EnumDescriptor.");
194 * DescriptorPool.lookup(name) => descriptor
196 * Finds a Descriptor or EnumDescriptor by name and returns it, or nil if none
223 // Descriptor.
226 DEFINE_CLASS(Descriptor, "Google::Protobuf::Descriptor");
229 Descriptor* self = _self;
235 Descriptor* self = _self;
267 * Descriptor.new => descriptor
269 * Creates a new, empty, message type descriptor. At a minimum, its name must be
275 Descriptor* self = ALLOC(Descriptor);
292 module, "Descriptor", rb_cObject);
310 * Descriptor.name => name
316 DEFINE_SELF(Descriptor, self, _self);
322 * Descriptor.name = name
324 * Assigns a name to this message type. The descriptor must not have been added
328 DEFINE_SELF(Descriptor, self, _self);
333 "Error setting Descriptor name");
339 * Descriptor.each(&block)
344 DEFINE_SELF(Descriptor, self, _self);
359 * Descriptor.lookup(name) => FieldDescriptor
361 * Returns the field descriptor for the field with the given name, if present,
365 DEFINE_SELF(Descriptor, self, _self);
376 * Descriptor.add_field(field) => nil
378 * Adds the given FieldDescriptor to this message type. This descriptor must not
384 DEFINE_SELF(Descriptor, self, _self);
390 "Adding field to Descriptor failed");
397 * Descriptor.add_oneof(oneof) => nil
399 * Adds the given OneofDescriptor to this message type. This descriptor must not
403 * are added to the message descriptor. Sub-type references (e.g. for fields of
407 DEFINE_SELF(Descriptor, self, _self);
413 "Adding oneof to Descriptor failed");
420 * Descriptor.each_oneof(&block) => nil
426 DEFINE_SELF(Descriptor, self, _self);
441 * Descriptor.lookup_oneof(name) => OneofDescriptor
443 * Returns the oneof descriptor for the oneof with the given name, if present,
447 DEFINE_SELF(Descriptor, self, _self);
458 * Descriptor.msgclass => message_klass
464 DEFINE_SELF(Descriptor, self, _self);
467 "Cannot fetch message class from a Descriptor not yet in a pool.");
494 * Returns a new field descriptor. Its name, type, etc. must be set before it is
828 * Returns the message or enum descriptor corresponding to this field's type if
858 if (msg->descriptor->msgdef != upb_fielddef_containingtype(self->fielddef)) {
861 return layout_get(msg->descriptor->layout, Message_data(msg), self->fielddef);
876 if (msg->descriptor->msgdef != upb_fielddef_containingtype(self->fielddef)) {
879 layout_set(msg->descriptor->layout, Message_data(msg), self->fielddef, value);
902 * Creates a new, empty, oneof descriptor. The oneof may only be modified prior
903 * to being added to a message descriptor which is subsequently added to a pool.
941 * message descriptor yet.
1018 * Creates a new, empty, enum descriptor. Must be added to a pool before the
1154 * until the enum descriptor has been added to a pool.
1178 rb_gc_mark(self->descriptor);
1191 self->descriptor = Qnil;
1215 * Create a new message builder context around the given message descriptor and
1223 self->descriptor = msgdef;
1274 return msgdef_add_field(self->descriptor, "optional",
1303 return msgdef_add_field(self->descriptor, "required",
1328 return msgdef_add_field(self->descriptor, "repeated",
1359 // as map keys. (We exclude these explicitly, and the field-descriptor setter
1370 // Create a new message descriptor for the map entry message, and create a
1373 mapentry_desc_name = rb_funcall(self->descriptor, rb_intern("name"), 0);
1383 Descriptor* mapentry_desc_self = ruby_to_Descriptor(mapentry_desc);
1431 Descriptor_add_field(self->descriptor, map_field);
1457 descriptor, oneofdef);
1471 rb_gc_mark(self->descriptor);
1484 self->descriptor = Qnil;
1504 * Create a new oneof builder context around the given oneof descriptor and
1512 self->descriptor = oneofdef;
1538 return msgdef_add_field(self->descriptor, "optional",
1582 * Create a new builder context around the given enum descriptor. This class is
1657 * Creates a new, empty descriptor with the given name, and invokes the block in
1658 * the context of a MessageBuilderContext on that descriptor. The block can then
1680 * Creates a new, empty enum descriptor with the given name, and invokes the
1681 * block in the context of an EnumBuilderContext on that descriptor. The block