Class: GirFFI::Builders::VFuncArgumentBuilder

Inherits:
CallbackArgumentBuilder show all
Defined in:
lib/gir_ffi/builders/vfunc_argument_builder.rb

Overview

Convertor for arguments for vfuncs. Used when building the argument mapper for vfuncs.

Constant Summary

Constants inherited from BaseArgumentBuilder

BaseArgumentBuilder::KEYWORDS

Instance Attribute Summary

Attributes inherited from BaseArgumentBuilder

#arginfo, #array_arg, #length_arg, #related_callback_builder

Instance Method Summary collapse

Methods inherited from CallbackArgumentBuilder

#allow_none?, #block_argument?, #call_argument_name, #capture_variable_name, #method_argument_name, #out_parameter_name, #pre_converted_name

Methods inherited from BaseArgumentBuilder

#argument_class_name, #array_length_idx, #array_length_parameter?, #call_argument_name, #closure_idx, #destroy_idx, #destroy_notifier?, #direction, #helper_argument?, #initialize, #mark_as_destroy_notifier, #mark_as_user_data, #name, #new_variable, #ownership_transfer, #safe, #specialized_type_tag, #type_info, #user_data?

Constructor Details

This class inherits a constructor from GirFFI::Builders::BaseArgumentBuilder

Instance Method Details

#post_conversionObject



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

def post_conversion
  if outgoing_ref_needed?
    ["#{result_name}.ref"] + super
  else
    super
  end
end

#pre_conversionObject



10
11
12
13
14
15
16
# File 'lib/gir_ffi/builders/vfunc_argument_builder.rb', line 10

def pre_conversion
  if ingoing_ref_needed?
    super + ["#{pre_converted_name}&.ref"]
  else
    super
  end
end