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

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



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

def setup_instance_method method
  go = info.find_instance_method method
  attach_and_define_method method, go, build_class
end

#setup_method(method) ⇒ Object



11
12
13
14
# File 'lib/gir_ffi/builders/registered_type_builder.rb', line 11

def setup_method method
  go = info.find_method method
  attach_and_define_method method, go, meta_class
end

#target_gtypeObject



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

def target_gtype
  info.g_type
end