|
CppInterOp
C++ Language Interoperability Layer
|
#include <stdbool.h>#include <stddef.h>#include <stdint.h>

Go to the source code of this file.
Classes | |
| struct | CppDeclRef |
| Opaque handle types for the CppInterOp C and C++ API. More... | |
| struct | CppTypeRef |
| struct | CppFuncRef |
| struct | CppObjectRef |
| struct | CppInterpRef |
| struct | CppConstDeclRef |
| struct | CppConstTypeRef |
| struct | CppConstFuncRef |
| struct | CppInterOpArray |
| C-compatible array of opaque pointers, returned by generated C API wrappers for functions that produce collections. More... | |
| struct | CppInterOpStringArray |
| C-compatible array of strings, returned by generated C API wrappers for functions that produce string collections. More... | |
| struct | TemplateArgInfo |
| Holds information for instantiating a template. More... | |
Macros | |
| #define | CPPINTEROP_API |
| #define | CPPINTEROP_DEPRECATED(msg) |
Typedefs | |
| typedef struct CppDeclRef | CppDeclRef |
| Opaque handle types for the CppInterOp C and C++ API. | |
| typedef struct CppTypeRef | CppTypeRef |
| typedef struct CppFuncRef | CppFuncRef |
| typedef struct CppObjectRef | CppObjectRef |
| typedef struct CppInterpRef | CppInterpRef |
| typedef struct CppConstDeclRef | CppConstDeclRef |
| typedef struct CppConstTypeRef | CppConstTypeRef |
| typedef struct CppConstFuncRef | CppConstFuncRef |
| typedef struct CppInterOpArray | CppInterOpArray |
| C-compatible array of opaque pointers, returned by generated C API wrappers for functions that produce collections. | |
| typedef struct CppInterOpStringArray | CppInterOpStringArray |
| C-compatible array of strings, returned by generated C API wrappers for functions that produce string collections. | |
| typedef struct TemplateArgInfo | TemplateArgInfo |
| Holds information for instantiating a template. | |
| #define CPPINTEROP_API |
Definition at line 25 of file CppInterOpTypes.h.
| #define CPPINTEROP_DEPRECATED | ( | msg | ) |
Definition at line 37 of file CppInterOpTypes.h.
| typedef struct CppConstDeclRef CppConstDeclRef |
| typedef struct CppConstFuncRef CppConstFuncRef |
| typedef struct CppConstTypeRef CppConstTypeRef |
| typedef struct CppDeclRef CppDeclRef |
Opaque handle types for the CppInterOp C and C++ API.
Each handle wraps a single void* and is a distinct type so the compiler rejects cross-kind misuse (e.g. passing a TypeRef where a DeclRef is expected). Layout is identical across all handles — a single pointer — so they are trivially copyable and ABI-stable.
The C and C++ views are declared independently:
struct CppDeclRef { void* data; } etc. at global scope, prefixed so they don't collide with generic names from other C libraries.Cpp::DeclRef etc. in namespace Cpp, no prefix — the namespace already disambiguates. Both have identical layout, so a C-linkage function exchanging these structs across the boundary is byte-identical regardless of which view names it. The TableGen-emitted C-API .inc adds C++ typedef aliases (using CppDeclRef = Cpp::DeclRef;) so the generated C wrappers compile under C++ using the prefixed C-side names. | typedef struct CppFuncRef CppFuncRef |
| typedef struct CppInterOpArray CppInterOpArray |
C-compatible array of opaque pointers, returned by generated C API wrappers for functions that produce collections.
The caller must free the array by calling cppinterop_DisposeArray().
| typedef struct CppInterOpStringArray CppInterOpStringArray |
C-compatible array of strings, returned by generated C API wrappers for functions that produce string collections.
Each string is individually allocated with strdup(). The caller must free the array by calling cppinterop_DisposeStringArray().
| typedef struct CppInterpRef CppInterpRef |
| typedef struct CppObjectRef CppObjectRef |
| typedef struct CppTypeRef CppTypeRef |
| typedef struct TemplateArgInfo TemplateArgInfo |
Holds information for instantiating a template.
Standard-layout, C-compatible.