Sha256: e77561bac1e94fe06e0c77363b830bcfa8246f7a8e3dcc7730caf7986b9093cc
Contents?: true
Size: 836 Bytes
Versions: 1
Compression:
Stored size: 836 Bytes
Contents
require 'gir_ffi/builder/type/registered_type' require 'gir_ffi/builder/type/with_layout' require 'gir_ffi/builder/type/with_methods' module GirFFI module Builder module Type # Implements the creation of a class representing one of the types # whose C representation is a struct, i.e., :object and :struct. class StructBased < RegisteredType include WithMethods include WithLayout def pretty_print s = "class #{@classname}\n" s << pretty_print_methods s << "end" end private def setup_class setup_layout setup_constants stub_methods setup_gtype_getter setup_field_accessors end def layout_superclass FFI::Struct end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gir_ffi-0.2.2 | lib/gir_ffi/builder/type/struct_based.rb |