struct Bindgen::Cpp::MethodName
- Bindgen::Cpp::MethodName
- Struct
- Value
- Object
Overview
Generator for calling methods by their name.
Included Modules
Defined in:
bindgen/cpp/method_name.crConstant Summary
-
GLOBAL_SCOPE =
"::"
Constructors
Instance Method Summary
-
#generate(method : Parser::Method, self_var : String, type : Parser::Method::Type | Nil = nil, exact_member = false)
Generates the C++ method name.
Instance methods inherited from module Bindgen::TypeHelper
passthrough(type : Parser::Type)
passthrough,
reconfigure_pass_type(pass_by, is_ref, ptr)
reconfigure_pass_type,
type_copied?(type) : Bool
type_copied?,
type_pointer_depth(type : Parser::Type) : Int32
type_pointer_depth,
variadic_argument : Call::VariadicArgument
variadic_argument
Constructor Detail
Instance Method Detail
def generate(method : Parser::Method, self_var : String, type : Parser::Method::Type | Nil = nil, exact_member = false)
#
Generates the C++ method name.
If this kind of method requires an instance, it will use self_var and
use ->
on it.
If the method is any constructor, and the type is copied, the
constructor will be called without .new
, effectively returning a value.
Otherwise, a normal .new
is used to return a pointer.
If exact_member is true and method is a member method, the qualified method is called, bypassing dynamic lookup.