Class: GirFFI::Builder::CArrayOutArgument

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

Overview

Implements argument processing for array arguments with direction :out.

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::OutBase

#retname

Methods inherited from Argument::Base

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

Constructor Details

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

Instance Method Details

#postpostObject



205
206
207
# File 'lib/gir_ffi/builder/argument.rb', line 205

def postpost
  [ "#{retname} = #{callarg}.to_sized_array_value #{array_size}" ]
end

#preObject



201
202
203
# File 'lib/gir_ffi/builder/argument.rb', line 201

def pre
  [ "#{callarg} = GirFFI::InOutPointer.for_array #{subtype_tag_or_class_name}" ]
end