Class: GirFFI::Builder::InterfaceInOutArgument

Inherits:
Argument::InOutBase show all
Defined in:
lib/gir_ffi/builder/argument.rb

Overview

Implements argument processing for interface arguments with direction :inout (structs, objects, etc.).

Constant Summary

Constants inherited from Argument::Base

Argument::Base::KEYWORDS, Argument::Base::TAG_TO_WRAPPER_CLASS_MAP

Instance Attribute Summary

Attributes inherited from Argument::Base

#array_arg, #length_arg, #name, #retname

Instance Method Summary collapse

Methods inherited from Argument::InOutBase

#initialize, #retname

Methods inherited from Argument::Base

#argument_class_name, #array_size, #callarg, #cleanup, #elm_t, #inarg, #initialize, #postpost, #retval, #safe, #subtype_tag_or_class_name, #type_info, #type_tag

Constructor Details

This class inherits a constructor from GirFFI::Builder::Argument::InOutBase

Instance Method Details

#postObject



301
302
303
# File 'lib/gir_ffi/builder/argument.rb', line 301

def post
  [ "#{retname} = #{argument_class_name}.wrap(#{callarg}.to_value)" ]
end

#preObject



297
298
299
# File 'lib/gir_ffi/builder/argument.rb', line 297

def pre
  [ "#{callarg} = GirFFI::InOutPointer.from :pointer, #{argument_class_name}.from(#{@name}).to_ptr" ]
end