coder.ExternalDependency.getDescriptiveName

Class: coder.ExternalDependency
Package: 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.

Input Arguments

bldcfg

coder.BuildConfig object. Use coder.BuildConfig methods to get information about the build context

You can use this information when you want to return different names based on the build context.

Output Arguments

extname

External dependency name returned as a character vector.

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 = 'MyLibary_MatlabHost';
    else
        myextname = 'MyLibrary_Local';
    end
end

More About

expand all