struct Bindgen::Cpp::Typename

Overview

C++ type-name generation logic.

Defined in:

bindgen/cpp/typename.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def full(base_name : String, const, pointer, is_reference, extents = nil, array_pointer = 0) : String #

Formats the type in result in C++ style.

A pointer or reference to a C array is spelled through bindgen_type, as C++ can't declare e.g. a variable of type int (*)[4] by appending its name to the type.

The stars of pointer include those of the array_pointer indirections applying to the whole array, like in int (*)[4].


[View source]
def full(result : Call::Expression) : String #

Formats the type in result in C++ style.

A pointer or reference to a C array is spelled through bindgen_type, as C++ can't declare e.g. a variable of type int (*)[4] by appending its name to the type.


[View source]
def full(results : Enumerable(Call::Expression)) : Array(String) #

Formats many results.


[View source]
def initialize #

[View source]
def template_class(template : String, arguments : Enumerable(String)) : String #

Generates the C++ type name of a template class with the given template type arguments.


[View source]