Class: GirFFI::Builders::ErrorArgumentBuilder

Inherits:
BaseArgumentBuilder show all
Defined in:
lib/gir_ffi/builders/error_argument_builder.rb

Overview

Implements argument processing for error handling arguments. These arguments are not part of the introspected signature, but their presence is indicated by the ‘throws’ attribute of the function.

Constant Summary

Constants inherited from BaseArgumentBuilder

BaseArgumentBuilder::KEYWORDS

Instance Attribute Summary

Attributes inherited from BaseArgumentBuilder

#arginfo, #array_arg, #length_arg

Instance Method Summary collapse

Methods inherited from BaseArgumentBuilder

#argument_class_name, #array_length_idx, #call_argument_name, #closure=, #closure?, #direction, #initialize, #name, #new_variable, #safe, #specialized_type_tag, #type_info

Constructor Details

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

Instance Method Details

#capture_variable_nameObject



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

def capture_variable_name
  nil
end

#method_argument_nameObject



9
10
11
# File 'lib/gir_ffi/builders/error_argument_builder.rb', line 9

def method_argument_name
  nil
end

#post_conversionObject



25
26
27
# File 'lib/gir_ffi/builders/error_argument_builder.rb', line 25

def post_conversion
  ["GirFFI::ArgHelper.check_error(#{call_argument_name})"]
end

#pre_conversionObject



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

def pre_conversion
  ["#{call_argument_name} = FFI::MemoryPointer.new(:pointer).write_pointer nil"]
end

#return_value_nameObject



13
14
15
# File 'lib/gir_ffi/builders/error_argument_builder.rb', line 13

def return_value_name
  nil
end