struct Bindgen::Cpp::MethodName

Overview

Generator for calling methods by their name.

Included Modules

Defined in:

bindgen/cpp/method_name.cr

Constant Summary

GLOBAL_SCOPE = "::"

Constructors

Instance Method Summary

Instance methods inherited from module Bindgen::TypeHelper

is_type_copied?(type) : Bool is_type_copied?, passthrough(type : Parser::Type) passthrough, reconfigure_pass_type(pass_by, is_ref, ptr) reconfigure_pass_type, type_pointer_depth(type : Parser::Type) : Int32 type_pointer_depth, variadic_argument : Call::VariadicArgument variadic_argument

Constructor Detail

def self.new(db : TypeDatabase) #

[View source]

Instance Method Detail

def generate(method : Parser::Method, self_var : String, type : Parser::Method::Type | Nil = nil) #

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.


[View source]