module Bindgen::TypeHelper
Overview
Helper functionality for working with types. Useful for all platforms.
TODO Turn into a struct
?
Direct including types
- Bindgen::Cpp::MethodName
- Bindgen::Cpp::Pass
- Bindgen::Crystal::Pass
- Bindgen::Processor::VirtualOverride
Defined in:
bindgen/type_helper.crInstance Method Summary
-
#is_type_copied?(type) : Bool
Is type available in Crystal? It will be if any of: 1.
-
#passthrough(type : Parser::Type)
Builds a result passing-through type without modifications.
-
#reconfigure_pass_type(pass_by, is_ref, ptr)
Helper for
#to_X
, configuring the type according to user-specified rules. -
#type_pointer_depth(type : Parser::Type) : Int32
Returns the pointer-depth without a reference of type.
-
#variadic_argument : Call::VariadicArgument
Builds a
Call::VariadicArgument
.
Instance Method Detail
def is_type_copied?(type) : Bool
#
Is type available in Crystal? It will be if any of:
- The structure will be copied
- It's a built-in type
- It's an enumeration type
Otherwise, false
is returned. If the type is not configured in the
type database, it defaults to false
.
def reconfigure_pass_type(pass_by, is_ref, ptr)
#
Helper for #to_X
, configuring the type according to user-specified
rules.
def type_pointer_depth(type : Parser::Type) : Int32
#
Returns the pointer-depth without a reference of type.
def variadic_argument : Call::VariadicArgument
#
Builds a Call::VariadicArgument
. This is only applicable to directly
bound functions.