class Bindgen::Cpp::BoehmGcCppCookbook

Overview

Cookbook for the C++ language using Boehm-GC for memory management.

Configuration name is boehmgc-cpp, aliased as cpp for convenience.

Defined in:

bindgen/cpp/cookbook.cr

Instance Method Summary

Instance methods inherited from class Bindgen::Cpp::BareCppCookbook

constructor_name(method_name : String, class_name : String) : String constructor_name, pointer_to_reference(type : String) : String | Nil pointer_to_reference, pointer_to_value(type : String) : String | Nil pointer_to_value, reference_to_pointer(type : String) : String | Nil reference_to_pointer, reference_to_value(type : String) : String | Nil reference_to_value, value_to_pointer(type : String) : String | Nil value_to_pointer, value_to_reference(type : String) : String | Nil value_to_reference

Instance methods inherited from class Bindgen::Cpp::Cookbook

constructor_name(method_name : String, class_name : String) : String constructor_name, find(base_name : String, is_reference, is_pointer, pass_by : TypeDatabase::PassBy) : Template::Base
find(type : Parser::Type, pass_by : TypeDatabase::PassBy) : Template::Base
find
, plain_constructor_name(method_name : String, class_name : String) : String plain_constructor_name, pointer_to_reference(type : String) : String | Nil pointer_to_reference, pointer_to_value(type : String) : String | Nil pointer_to_value, reference_to_pointer(type : String) : String | Nil reference_to_pointer, reference_to_value(type : String) : String | Nil reference_to_value, value_to_pointer(type : String) : String | Nil value_to_pointer, value_to_reference(type : String) : String | Nil value_to_reference

Constructor methods inherited from class Bindgen::Cpp::Cookbook

create_by_name(name) : Cookbook create_by_name

Instance Method Detail

def constructor_name(method_name : String, class_name : String) : String | Nil #
Description copied from class Bindgen::Cpp::Cookbook

How to call the constructor method of class_name.


[View source]
def plain_constructor_name(method_name : String, class_name : String) : String #
Description copied from class Bindgen::Cpp::Cookbook

Same as #constructor_name, but guarantees that the constructed type is class_name itself, and not a helper type wrapping it. This is required to brace-initialize an aggregate, and for C++ unions.


[View source]
def value_to_pointer(type : String) : String | Nil #

The copy is of the exact type, so its destructor can be run by a finalizer taking the allocated pointer. CrystalGCWrapper can't be used: It doesn't inherit the copy and move constructors of type.


[View source]