Lines Matching refs:klass
387 VALUE DescriptorPool_alloc(VALUE klass) { in DescriptorPool_alloc() argument
392 ret = TypedData_Wrap_Struct(klass, &_DescriptorPool_type, self); in DescriptorPool_alloc()
409 VALUE klass = rb_define_class_under( in DescriptorPool_register() local
411 rb_define_alloc_func(klass, DescriptorPool_alloc); in DescriptorPool_register()
412 rb_define_method(klass, "build", DescriptorPool_build, -1); in DescriptorPool_register()
413 rb_define_method(klass, "lookup", DescriptorPool_lookup, 1); in DescriptorPool_register()
414 rb_define_singleton_method(klass, "generated_pool", in DescriptorPool_register()
417 cDescriptorPool = klass; in DescriptorPool_register()
420 generated_pool = rb_class_new_instance(0, NULL, klass); in DescriptorPool_register()
488 rb_gc_mark(self->klass); in Descriptor_mark()
512 VALUE Descriptor_alloc(VALUE klass) { in Descriptor_alloc() argument
514 VALUE ret = TypedData_Wrap_Struct(klass, &_Descriptor_type, self); in Descriptor_alloc()
516 self->klass = Qnil; in Descriptor_alloc()
523 VALUE klass = rb_define_class_under( in Descriptor_register() local
525 rb_define_alloc_func(klass, Descriptor_alloc); in Descriptor_register()
526 rb_define_method(klass, "initialize", Descriptor_initialize, 3); in Descriptor_register()
527 rb_define_method(klass, "each", Descriptor_each, 0); in Descriptor_register()
528 rb_define_method(klass, "lookup", Descriptor_lookup, 1); in Descriptor_register()
529 rb_define_method(klass, "each_oneof", Descriptor_each_oneof, 0); in Descriptor_register()
530 rb_define_method(klass, "lookup_oneof", Descriptor_lookup_oneof, 1); in Descriptor_register()
531 rb_define_method(klass, "msgclass", Descriptor_msgclass, 0); in Descriptor_register()
532 rb_define_method(klass, "name", Descriptor_name, 0); in Descriptor_register()
533 rb_define_method(klass, "file_descriptor", Descriptor_file_descriptor, 0); in Descriptor_register()
534 rb_include_module(klass, rb_mEnumerable); in Descriptor_register()
536 cDescriptor = klass; in Descriptor_register()
666 if (self->klass == Qnil) { in Descriptor_msgclass()
667 self->klass = build_class_from_descriptor(_self); in Descriptor_msgclass()
669 return self->klass; in Descriptor_msgclass()
687 VALUE FileDescriptor_alloc(VALUE klass) { in FileDescriptor_alloc() argument
689 VALUE ret = TypedData_Wrap_Struct(klass, &_FileDescriptor_type, self); in FileDescriptor_alloc()
718 VALUE klass = rb_define_class_under( in FileDescriptor_register() local
720 rb_define_alloc_func(klass, FileDescriptor_alloc); in FileDescriptor_register()
721 rb_define_method(klass, "initialize", FileDescriptor_initialize, 3); in FileDescriptor_register()
722 rb_define_method(klass, "name", FileDescriptor_name, 0); in FileDescriptor_register()
723 rb_define_method(klass, "syntax", FileDescriptor_syntax, 0); in FileDescriptor_register()
725 cFileDescriptor = klass; in FileDescriptor_register()
781 VALUE FieldDescriptor_alloc(VALUE klass) { in FieldDescriptor_alloc() argument
783 VALUE ret = TypedData_Wrap_Struct(klass, &_FieldDescriptor_type, self); in FieldDescriptor_alloc()
789 VALUE klass = rb_define_class_under( in FieldDescriptor_register() local
791 rb_define_alloc_func(klass, FieldDescriptor_alloc); in FieldDescriptor_register()
792 rb_define_method(klass, "initialize", FieldDescriptor_initialize, 3); in FieldDescriptor_register()
793 rb_define_method(klass, "name", FieldDescriptor_name, 0); in FieldDescriptor_register()
794 rb_define_method(klass, "type", FieldDescriptor_type, 0); in FieldDescriptor_register()
795 rb_define_method(klass, "default", FieldDescriptor_default, 0); in FieldDescriptor_register()
796 rb_define_method(klass, "label", FieldDescriptor_label, 0); in FieldDescriptor_register()
797 rb_define_method(klass, "number", FieldDescriptor_number, 0); in FieldDescriptor_register()
798 rb_define_method(klass, "submsg_name", FieldDescriptor_submsg_name, 0); in FieldDescriptor_register()
799 rb_define_method(klass, "subtype", FieldDescriptor_subtype, 0); in FieldDescriptor_register()
800 rb_define_method(klass, "has?", FieldDescriptor_has, 1); in FieldDescriptor_register()
801 rb_define_method(klass, "clear", FieldDescriptor_clear, 1); in FieldDescriptor_register()
802 rb_define_method(klass, "get", FieldDescriptor_get, 1); in FieldDescriptor_register()
803 rb_define_method(klass, "set", FieldDescriptor_set, 2); in FieldDescriptor_register()
805 cFieldDescriptor = klass; in FieldDescriptor_register()
1177 VALUE OneofDescriptor_alloc(VALUE klass) { in OneofDescriptor_alloc() argument
1179 VALUE ret = TypedData_Wrap_Struct(klass, &_OneofDescriptor_type, self); in OneofDescriptor_alloc()
1186 VALUE klass = rb_define_class_under( in OneofDescriptor_register() local
1188 rb_define_alloc_func(klass, OneofDescriptor_alloc); in OneofDescriptor_register()
1189 rb_define_method(klass, "initialize", OneofDescriptor_initialize, 3); in OneofDescriptor_register()
1190 rb_define_method(klass, "name", OneofDescriptor_name, 0); in OneofDescriptor_register()
1191 rb_define_method(klass, "each", OneofDescriptor_each, 0); in OneofDescriptor_register()
1192 rb_include_module(klass, rb_mEnumerable); in OneofDescriptor_register()
1194 cOneofDescriptor = klass; in OneofDescriptor_register()
1264 VALUE EnumDescriptor_alloc(VALUE klass) { in EnumDescriptor_alloc() argument
1266 VALUE ret = TypedData_Wrap_Struct(klass, &_EnumDescriptor_type, self); in EnumDescriptor_alloc()
1295 VALUE klass = rb_define_class_under( in EnumDescriptor_register() local
1297 rb_define_alloc_func(klass, EnumDescriptor_alloc); in EnumDescriptor_register()
1298 rb_define_method(klass, "initialize", EnumDescriptor_initialize, 3); in EnumDescriptor_register()
1299 rb_define_method(klass, "name", EnumDescriptor_name, 0); in EnumDescriptor_register()
1300 rb_define_method(klass, "lookup_name", EnumDescriptor_lookup_name, 1); in EnumDescriptor_register()
1301 rb_define_method(klass, "lookup_value", EnumDescriptor_lookup_value, 1); in EnumDescriptor_register()
1302 rb_define_method(klass, "each", EnumDescriptor_each, 0); in EnumDescriptor_register()
1303 rb_define_method(klass, "enummodule", EnumDescriptor_enummodule, 0); in EnumDescriptor_register()
1304 rb_define_method(klass, "file_descriptor", EnumDescriptor_file_descriptor, 0); in EnumDescriptor_register()
1305 rb_include_module(klass, rb_mEnumerable); in EnumDescriptor_register()
1307 cEnumDescriptor = klass; in EnumDescriptor_register()
1422 VALUE MessageBuilderContext_alloc(VALUE klass) { in MessageBuilderContext_alloc() argument
1425 klass, &_MessageBuilderContext_type, self); in MessageBuilderContext_alloc()
1431 VALUE klass = rb_define_class_under( in MessageBuilderContext_register() local
1433 rb_define_alloc_func(klass, MessageBuilderContext_alloc); in MessageBuilderContext_register()
1434 rb_define_method(klass, "initialize", in MessageBuilderContext_register()
1436 rb_define_method(klass, "optional", MessageBuilderContext_optional, -1); in MessageBuilderContext_register()
1437 rb_define_method(klass, "proto3_optional", MessageBuilderContext_proto3_optional, -1); in MessageBuilderContext_register()
1438 rb_define_method(klass, "required", MessageBuilderContext_required, -1); in MessageBuilderContext_register()
1439 rb_define_method(klass, "repeated", MessageBuilderContext_repeated, -1); in MessageBuilderContext_register()
1440 rb_define_method(klass, "map", MessageBuilderContext_map, -1); in MessageBuilderContext_register()
1441 rb_define_method(klass, "oneof", MessageBuilderContext_oneof, 1); in MessageBuilderContext_register()
1443 cMessageBuilderContext = klass; in MessageBuilderContext_register()
1864 VALUE OneofBuilderContext_alloc(VALUE klass) { in OneofBuilderContext_alloc() argument
1867 klass, &_OneofBuilderContext_type, self); in OneofBuilderContext_alloc()
1874 VALUE klass = rb_define_class_under( in OneofBuilderContext_register() local
1876 rb_define_alloc_func(klass, OneofBuilderContext_alloc); in OneofBuilderContext_register()
1877 rb_define_method(klass, "initialize", in OneofBuilderContext_register()
1879 rb_define_method(klass, "optional", OneofBuilderContext_optional, -1); in OneofBuilderContext_register()
1881 cOneofBuilderContext = klass; in OneofBuilderContext_register()
1940 VALUE EnumBuilderContext_alloc(VALUE klass) { in EnumBuilderContext_alloc() argument
1943 klass, &_EnumBuilderContext_type, self); in EnumBuilderContext_alloc()
1950 VALUE klass = rb_define_class_under( in EnumBuilderContext_register() local
1952 rb_define_alloc_func(klass, EnumBuilderContext_alloc); in EnumBuilderContext_register()
1953 rb_define_method(klass, "initialize", EnumBuilderContext_initialize, 2); in EnumBuilderContext_register()
1954 rb_define_method(klass, "value", EnumBuilderContext_value, 2); in EnumBuilderContext_register()
1956 cEnumBuilderContext = klass; in EnumBuilderContext_register()
2048 VALUE FileBuilderContext_alloc(VALUE klass) { in FileBuilderContext_alloc() argument
2050 VALUE ret = TypedData_Wrap_Struct(klass, &_FileBuilderContext_type, self); in FileBuilderContext_alloc()
2058 VALUE klass = rb_define_class_under(module, "FileBuilderContext", rb_cObject); in FileBuilderContext_register() local
2059 rb_define_alloc_func(klass, FileBuilderContext_alloc); in FileBuilderContext_register()
2060 rb_define_method(klass, "initialize", FileBuilderContext_initialize, 3); in FileBuilderContext_register()
2061 rb_define_method(klass, "add_message", FileBuilderContext_add_message, 1); in FileBuilderContext_register()
2062 rb_define_method(klass, "add_enum", FileBuilderContext_add_enum, 1); in FileBuilderContext_register()
2064 cFileBuilderContext = klass; in FileBuilderContext_register()
2176 VALUE Builder_alloc(VALUE klass) { in Builder_alloc() argument
2179 klass, &_Builder_type, self); in Builder_alloc()
2186 VALUE klass = rb_define_class_under(module, "Builder", rb_cObject); in Builder_register() local
2187 rb_define_alloc_func(klass, Builder_alloc); in Builder_register()
2188 rb_define_method(klass, "initialize", Builder_initialize, 1); in Builder_register()
2189 rb_define_method(klass, "add_file", Builder_add_file, -1); in Builder_register()
2190 rb_define_method(klass, "add_message", Builder_add_message, 1); in Builder_register()
2191 rb_define_method(klass, "add_enum", Builder_add_enum, 1); in Builder_register()
2193 cBuilder = klass; in Builder_register()
2306 static VALUE get_def_obj(VALUE _descriptor_pool, const void* ptr, VALUE klass) { in get_def_obj() argument
2320 def = rb_class_new_instance(3, args, klass); in get_def_obj()
2331 if (klass == cDescriptor) { in get_def_obj()