You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tianxiao Gu edited this page Jan 25, 2022
·
1 revision
The binding generator needs to process each C++ type and its definition to a corresponding Java type.
We use Clang to model C++ types and JavaPoet to model Java types.
Here we actually document how convert a given Clang Type to JavaPoet TypeName
and how to build a Java class via JavaPoet's ClassBuilder for a Clang Decl.
The first thing we need to discuss is about the primitive types.
Indeed if a C++ type (e.g., struct or int) can be allocated in heap, we must create a Java binding for it
because we may use its pointers between Java and C++.
However, boxed primitives in Java may easily lead to performance issues.