Main Content

getDataDefault

Get default storage class or storage class property setting for model data category

    Description

    example

    propertyValue = getDataDefault(myCodeMappingObj,category,property) returns the value from the code mappings of the specified property for the specified data category.

    Examples

    collapse all

    From the model code mappings for model myConfigModel, get the default storage class setting for root-level inports.

    cm = coder.mapping.api.get('myConfigModel');
    defaultStorageClass = getDataDefault(cm,'Inports','StorageClass');
    

    Input Arguments

    collapse all

    Code mapping object (model code mappings) returned by a call to function coder.mapping.api.get.

    Example: myCM

    Category of model data elements that you return a property value for.

    Example: 'Inports'

    Code mapping property that you return a value for. Specify one of these property names.

    Information to ReturnProperty Name
    Name of storage classStorageClass
    Name of variable for data element in the generated codeIdentifier

    Example: 'Identifier'

    Output Arguments

    collapse all

    The property value is one of these values depending on the category and property that you specify.

    PropertyValue Returned
    StorageClassOne of these values: Auto, , Dictionary default, ExportedGlobal, , ImportedExtern, ImportedExternPointer,

    Data Types: char | string

    Introduced in R2020b