coder.ExternalDependency class
Package:coder
Superclasses:
Interface to external code
Description
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 fromcoder.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 fromcoder.ExternalDependency
, create a subclass. For example:
classdefmyClass < coder.ExternalDependency
You must define all of the methods listed inMethods. 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. TheRTW.BuildInfo
andcoder.BuildConfig
objects that describe the build information and build context are automatically created during the build process. TheupdateBuildInfo
method provides access to these objects. For more information on build information customization, seeCustomize the Post-Code-Generation Build Process(MATLAB Coder).
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, usecoder.ceval
to call the external function.
Methods
getDescriptiveName | Return descriptive name for external dependency |
isSupportedContext | Determine if build context supports external dependency |
updateBuildInfo | Update build information |
Examples
See Also
coder.BuildConfig
|coder.ceval
|coder.cinclude
|coder.updateBuildInfo
Topics
- Develop Interface for External C/C++ Code(MATLAB Coder)
- Customize the Post-Code-Generation Build Process(MATLAB Coder)
- Integrate External/Custom Code(MATLAB Coder)