Class: GirFFI::Builders::RegisteredTypeBuilder

Inherits:
GirFFI::BaseTypeBuilder show all
Defined in:
lib/gir_ffi/builders/registered_type_builder.rb

Overview

Base class for type builders building types specified by subtypes of IRegisteredTypeInfo. These are types whose C representation is complex, i.e., a struct or a union.

Instance Attribute Summary

Attributes inherited from GirFFI::BaseTypeBuilder

#info

Instance Method Summary collapse

Methods inherited from GirFFI::BaseTypeBuilder

#build_class, #initialize, #instantiate_class

Methods included from GirFFI::BuilderHelper

#get_or_define_class, #get_or_define_module, #optionally_define_constant

Constructor Details

This class inherits a constructor from GirFFI::BaseTypeBuilder

Instance Method Details

#setup_instance_method(method) ⇒ Object



20
21
22
23
24
# File 'lib/gir_ffi/builders/registered_type_builder.rb', line 20

def setup_instance_method(method)
  method_info = info.find_instance_method method
  return unless method_info
  attach_and_define_method method_info, build_class
end

#setup_method(method) ⇒ Object



14
15
16
17
18
# File 'lib/gir_ffi/builders/registered_type_builder.rb', line 14

def setup_method(method)
  method_info = info.find_method method
  return unless method_info
  attach_and_define_method method_info, meta_class
end

#target_gtypeObject



26
27
28
# File 'lib/gir_ffi/builders/registered_type_builder.rb', line 26

def target_gtype
  info.g_type
end