Main Content

coder.ExternalDependency.getDescriptiveName

Class: coder.ExternalDependency
Namespace: coder

Return descriptive name for external dependency

Syntax

extname = coder.ExternalDependency.getDescriptiveName(bldcfg)

Description

extname = coder.ExternalDependency.getDescriptiveName(bldcfg) returns the name that you want to associate with an external dependency. The code generator uses the external dependency name for error messages.

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

External dependency name, returned as a character vector.

Data Types: char

Examples

expand all

Define a method that always returns the same name.

function myextname = getDescriptiveName(~)
   myextname = 'MyLibrary'; 
end

Define a method that uses the build context to determine the name.

function myextname = getDescriptiveName(context)
    if context.isMatlabHostTarget()
        myextname = 'MyLibrary_MatlabHost';
    else
        myextname = 'MyLibrary_Local';
    end
end

More About

expand all

Version History

Introduced in R2013b