11.18. C++ bindings generator

The CPP_BIND module provides utilities for generating daslang bindings to C++ code. It helps generate module registration code, type annotations, and function wrappers for exposing C++ APIs to daslang programs.

All functions and symbols are in “cpp_bind” module, use require to get access to it.

require daslib/cpp_bind

11.18.1. Generation of bindings

11.18.1.1. log_cpp_class_adapter

log_cpp_class_adapter(cpp_file: file; name: string; cinfo: TypeDeclPtr )

Generates C++ class adapter for the Daslang class.

Arguments:
log_cpp_class_adapter(cpp_file: StringBuilderWriter; name: string; cinfo: TypeDeclPtr )