abstract class Bindgen::Cpp::Cookbook
- Bindgen::Cpp::Cookbook
- Reference
- Object
Overview
The cookbook contains snippets for the C++ and C platforms.
The TypeDatabase
stores which cookbook to use. Don't .new
your own.
Which cookbook is used is configured by the user through the platform:
setting. See Configuration#platform
for the code, and TEMPLATE.yml
for user-facing documentation.
The functions all return a Template::Basic
when conversion is
necessary, and Template::None
otherwise.
Direct Known Subclasses
Defined in:
bindgen/cpp/cookbook.crConstructors
-
.create_by_name(name) : Cookbook
Finds and creates a
Cookbook
by name.
Instance Method Summary
-
#constructor_name(method_name : String, class_name : String) : String
How to call the constructor method of class_name.
-
#find(base_name : String, is_reference, is_pointer, pass_by : TypeDatabase::PassBy) : Template::Base
Same, but provides an override of types reference and pointer qualification.
-
#find(type : Parser::Type, pass_by : TypeDatabase::PassBy) : Template::Base
Finds the template to pass type as-is as pass_by.
-
#pointer_to_reference(type : String) : String | Nil
Provides a template to convert a pointer to a reference.
-
#pointer_to_value(type : String) : String | Nil
Provides a template to convert a pointer to a value.
-
#reference_to_pointer(type : String) : String | Nil
Provides a template to convert a reference to a pointer.
-
#reference_to_value(type : String) : String | Nil
Provides a template to convert a reference to a value.
-
#value_to_pointer(type : String) : String | Nil
Provides a template to convert a value to a pointer.
-
#value_to_reference(type : String) : String | Nil
Provides a template to convert a value to a reference.
Constructor Detail
Instance Method Detail
How to call the constructor method of class_name.
Same, but provides an override of types reference and pointer qualification.
Finds the template to pass type as-is as pass_by. The returned template takes an expression returning something of type and turns it into something that can be pass_by'd on.
Provides a template to convert a pointer to a reference.
Provides a template to convert a pointer to a value.
Provides a template to convert a reference to a pointer.
Provides a template to convert a reference to a value.
Provides a template to convert a value to a pointer.
Provides a template to convert a value to a reference.