class

Bindgen::Cpp::BoehmGcCppCookbook

Inherits Bindgen::Cpp::BareCppCookbook < Bindgen::Cpp::Cookbook < Reference < Object

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

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

Instance methods

constructor_name(method_name : String, class_name : String) : String | Nil

How to call the constructor method of class_name.

Source
plain_constructor_name(method_name : String, class_name : String) : String

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.

Source
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.

Source