class Bindgen::Graph::Method

Overview

A method, and its calls. The #calls will be populated later on by processors.

Defined in:

bindgen/graph/method.cr

Constant Summary

EXPLICIT_BIND_TAG = "EXPLICIT_BIND_TAG"

If this tag is set, this method will bind directly to the method named in the value. Processor::CppWrapper won't generate a wrapper for this method. Processor::CrystalBinding will make the fun of this function point to it. The Crystal wrapper is not affected.

REMOVABLE_BINDING_TAG = "REMOVABLE_BINDING_TAG"

If this tag is set, this methods CrystalBinding and Cpp calls can be removed by a later processor. The value is left empty.

SUPERCLASS_BIND_TAG = "SUPERCLASS_BIND_TAG"

If this tag is set, this method is expected to call a base class method without dynamic lookup. The value is left empty.

UNWRAP_INITIALIZE_TAG = "UNWRAP_INITIALIZE_TAG"

If this tag is set, it means this method is a #initialize(unwrap: ). The value is left empty.

Constructors

Instance Method Summary

Instance methods inherited from class Bindgen::Graph::Node

constant? : Bool constant?, crystal_prefix : String crystal_prefix, diagnostics_path : String diagnostics_path, find_root : Node find_root, full_path : Array(Node) full_path, kind_name : String kind_name, name : String name, parent : Container | Nil parent, parent=(parent : Container | Nil) parent=, path_name : String path_name, set_tag(name : String, value : String = "") set_tag, tag(name : String) tag, tag?(name : String) tag?, tags : Hash(String, String) tags, unspecific_parent : Container | Nil unspecific_parent

Constructor methods inherited from class Bindgen::Graph::Node

new(name : String, parent : Container | Nil = nil) new

Constructor Detail

def self.new(origin : Bindgen::Parser::Method, name, parent = nil) #

[View source]

Instance Method Detail

Calls for the various Generators


[View source]
def constant? : Bool #

A method is not a constant in Crystal.


[View source]
def crystal_prefix : String #

Returns a dot (.) if the origin method is static. Returns a number sign (#) otherwise.


[View source]
def diagnostics_path : String #
Description copied from class Bindgen::Graph::Node

Gives a humanly-readable path string, formatted for Crystal.


[View source]
def mangled_name(*args, **options) #

[View source]
def mangled_name(*args, **options, &) #

[View source]
def origin : Parser::Method #

Parser::Method this method node is based on.


[View source]
def parent_class : Graph::Class | Nil #

Returns the class containing this method.


[View source]