What Is Strongly Typed Interface for C++?
A strongly typed interface enforces a strict data type mapping between two programming languages. Use a strongly typed interface to generate C++ header files for MATLAB® functions and classes. When you build a C++ application with these header files, you can use MATLAB functions and classes as C++ functions and classes without writing C++ code. For more information, see Write MATLAB Code for Strongly Typed Interface.
To generate the C++ header files, call the
matlab.engine.typedinterface.generateCPP function. The function reads
the type and validation data from MATLAB function and class definitions and creates corresponding C++ definitions.
For details, see Data Type Mappings Between C++ and Strongly Typed MATLAB Code.
When to Use a C++ Strongly Typed Interface
If you build C++ engine applications and work with object-oriented data using the
function, a strongly typed interface lets you call the MATLAB functions and classes by their MATLAB names in C++ as if they were native C++ functions and classes.
The strongly typed interface for C++ does not support handle classes.
The interface supports only user-authored MATLAB functions, user-authored MATLAB classes, and classes that inherit from user-authored classes.