주요 콘텐츠

isDerivedFrom

Determine whether stereotype is derived from base stereotype

    Description

    result = isDerivedFrom(derivedStereotype,baseStereotype) returns true if the stereotype derivedStereotype gets its base properties from the stereotype baseStereotype. Otherwise, the function returns false.

    example

    Examples

    collapse all

    Create a profile for latency characteristics.

    profile = systemcomposer.profile.Profile.createProfile("LatencyProfile");
    latencybase  = addStereotype(profile,"LatencyBase");
    latencyderived = addStereotype(profile,"LatencyDerived",Parent=latencybase);
    

    Determine whether the stereotype latencyderived has its base stereotype set as latencybase.

    result = isDerivedFrom(latencyderived,latencybase)
    result =
      logical
       1
    

    Input Arguments

    collapse all

    Stereotype, specified as a systemcomposer.profile.Stereotype object.

    Stereotype, specified as a character vector or string in the form "<profile>.<stereotype>" or as systemcomposer.profile.Stereotype object.

    Data Types: char | string | stereotype object

    Output Arguments

    collapse all

    True or false result, returned as a 1 or 0 of data type logical.

    More About

    collapse all

    Version History

    Introduced in R2021a