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.
# File lib/gir_ffi/builders/registered_type_builder.rb, line 41 def fields info.fields end
# File lib/gir_ffi/builders/registered_type_builder.rb, line 37 def parent nil end
FIXME: Only used in some of the subclases. Make mixin?
# File lib/gir_ffi/builders/registered_type_builder.rb, line 29 def provide_constructor return if info.find_method 'new' (class << @klass; self; end).class_eval { alias_method :new, :_allocate } end
TODO: Rename the created method, or use a constant. FIXME: Only used in some of the subclases. Make mixin?
# File lib/gir_ffi/builders/registered_type_builder.rb, line 18 def setup_gtype_getter gtype = target_gtype return if gtype.nil? @klass.instance_eval " def self.get_gtype #{gtype} end " end
# File lib/gir_ffi/builders/registered_type_builder.rb, line 45 def superclass ClassBase end
# File lib/gir_ffi/builders/registered_type_builder.rb, line 12 def target_gtype info.g_type end