Main Content


Class: coder.ExternalDependency
Namespace: coder

Determine if build context supports external dependency


tf = coder.ExternalDependency.isSupportedContext(bldcfg)


tf = coder.ExternalDependency.isSupportedContext(bldcfg) returns if you can use the external dependency in the build context, bldcfg.

If you cannot use the external dependency in the current build context, display an error message and stop code generation. The error message must describe why you cannot use the external dependency in this build context. If the method returns false (0), the code generator uses a default error message. The default error message uses the name returned by the getDescriptiveName method of the coder.ExternalDependency class.

You must implement this method in a subclass of coder.ExternalDependency.

Input Arguments

expand all

Build context during code generation, specified as a coder.BuildConfig object. Use coder.BuildConfig methods to get information about the build context.

Output Arguments

expand all

Whether the build context supports the external dependency, returned as either true (1) or false (0).

Data Types: logical


expand all

This method returns true(1) if the code generation target is a MATLAB® host target. Otherwise, the method reports an error and stops code generation.

Write isSupportedContext method.

function tf = isSupportedContext(ctx)
    if  ctx.isMatlabHostTarget()
        tf = true;
        error('adder library not available for this target');

More About

expand all

Version History

Introduced in R2013b