主要内容

万博1manbetxSimulink.findIntEnumType

查找由定义的枚举类万博1manbetxSimulink.defineIntEnumType

描述

例子

结果= 万博1manbetxSimulink.findIntEnumType (typeName返回meta.class对象的类类型定义为万博1manbetxSimulink.defineIntEnumType.使用返回的meta.class对象查询枚举类的属性。如果类不存在,则函数返回空值meta.class对象。

例子

结果= 万博1manbetxSimulink.findIntEnumType ()返回meta.class定义的所有枚举类的万博1manbetxSimulink.defineIntEnumType.使用返回的meta.class对象来查询枚举类的属性。

例子

全部折叠

定义枚举类型。

万博1manbetxSimulink.defineIntEnumType (“myEnumType”, {“e1”“e2”}, (1 2));

检查已创建的枚举类型。

myResult = 万博1manbetxSimulink.findIntEnumType (“myEnumType”
myResult = class with properties: Name: 'myEnumType' Description: " DetailedDescription: " Hidden: 0 Sealed: 0 Abstract: 0 Enumeration: 1 ConstructOnLoad: 0 handlecomcompatible: 0 inferorclasses: {[1×1 meta.class]} ContainingPackage: [0×0 meta.class][0×1 meta. package]方法列表:[150×1 meta. properties][0×1 meta. method]EnumerationMemberList: [2×1 meta. event]SuperclassList: [1×1 meta.class]

定义两种枚举类型。

万博1manbetxSimulink.defineIntEnumType (“myEnumType1”, {“e1”“e2”}, (1 2));万博1manbetxSimulink.defineIntEnumType (“myEnumType2”, {“e3”e4的}, [3 - 4]);

检查已创建的枚举类型。

myResult = 万博1manbetxSimulink.findIntEnumType ()

输入参数

全部折叠

由定义的特定枚举类的名称万博1manbetxSimulink.defineIntEnumType,指定为字符向量或字符串。

例子:“myEnumType”

数据类型:字符|字符串

输出参数

全部折叠

的数组返回的搜索结果meta.class对象。如果没有枚举类,则数组为空。

介绍了R2018b