Package: coder
Superclasses:
Interface to external code
coder.ExternalDependency
is an abstract class for developing
an interface between external code and MATLAB® code intended for code generation. You can define classes that derive from
coder.ExternalDependency
to encapsulate the
interface to external libraries, object files, and C/C++ source code. This encapsulation
allows you to separate the details of the interface from your MATLAB code.
To define a class derived from coder.ExternalDependency
,
create a subclass. For
example:
classdef myClass < coder.ExternalDependency
You must define all of the methods listed in Methods. These methods are static and are not compiled. The code generator
invokes these methods in MATLAB after code generation is complete to configure the build for the generated
code. The RTW.BuildInfo
and coder.BuildConfig
objects that describe the build information and build
context are automatically created during the build process. The
updateBuildInfo
method provides access to these objects. For more
information on build information customization, see Build Process Customization.
You also define methods that call the external code. These methods are compiled. For each
external function that you want to call, write a method to define the programming
interface to the function. In the method, use coder.ceval
to call
the external function.
getDescriptiveName | Return descriptive name for external dependency |
isSupportedContext | Determine if build context supports external dependency |
updateBuildInfo | Update build information |
coder.BuildConfig
| coder.ceval
| coder.cinclude
| coder.updateBuildInfo