Class: GirFFI::Builders::ReturnValueBuilder
- Inherits:
-
BaseReturnValueBuilder
- Object
- BaseArgumentBuilder
- BaseReturnValueBuilder
- GirFFI::Builders::ReturnValueBuilder
- Defined in:
- lib/gir_ffi/builders/return_value_builder.rb
Overview
Implements building post-processing statements for return values.
Direct Known Subclasses
Constant Summary
Constants inherited from BaseArgumentBuilder
Instance Attribute Summary
Attributes inherited from BaseArgumentBuilder
#arginfo, #array_arg, #length_arg, #related_callback_builder
Instance Method Summary collapse
Methods inherited from BaseReturnValueBuilder
#capture_variable_name, #has_return_value_name?, #post_converted_name, #relevant?, #return_value_name, #void_return_value?
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
#has_post_conversion? ⇒ Boolean
19 20 21 |
# File 'lib/gir_ffi/builders/return_value_builder.rb', line 19 def has_post_conversion? user_data? || needs_c_to_ruby_conversion? end |
#needs_c_to_ruby_conversion? ⇒ Boolean
23 24 25 |
# File 'lib/gir_ffi/builders/return_value_builder.rb', line 23 def needs_c_to_ruby_conversion? type_info.needs_c_to_ruby_conversion_for_functions? end |
#post_conversion ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/gir_ffi/builders/return_value_builder.rb', line 11 def post_conversion result = [] if has_post_conversion? result << "#{post_converted_name} = #{post_convertor.conversion}" end result end |