Simulink.findIntEnumType - Find enumeration classes defined by
Simulink.defineIntEnumType - MATLAB ([original](https://in.mathworks.com/help/simulink/slref/simulink.findintenumtype.html)) ([raw](?raw))
Main Content
Find enumeration classes defined bySimulink.defineIntEnumType
Syntax
Description
[result](#mw%5F5790da01-9012-4cd8-80b5-65760e87375a) = Simulink.findIntEnumType([typeName](#mw%5Fd596c994-55ee-4f53-b0c4-9ffaa539a51f))
returns the matlab.metadata.Class
object for class type
that is defined by Simulink.defineIntEnumType
. Use the returnedmatlab.metadata.Class
object to query attributes of the enumeration class. If the class does not exist, the function returns an emptymatlab.metadata.Class
object.
[result](#mw%5F5790da01-9012-4cd8-80b5-65760e87375a) = Simulink.findIntEnumType()
returnsmatlab.metadata.Class
objects for all enumeration classes that are defined by Simulink.defineIntEnumType
. Use the returned matlab.metadata.Class
objects to query attributes of the enumeration classes.
Examples
Define an enumeration type.
Simulink.defineIntEnumType('myEnumType', {'e1', 'e2'}, [1 2]);
Check for the enumeration type that you have created.
myResult = Simulink.findIntEnumType('myEnumType')
myResult =
class with properties:
Name: 'myEnumType'
Description: ''
DetailedDescription: ''
Hidden: 0
Sealed: 0
Abstract: 0
Enumeration: 1
ConstructOnLoad: 0
HandleCompatible: 0
InferiorClasses: {[1×1 matlab.metadata.Class]}
Namespace: [0×0 matlab.metadata.Namespace]
RestrictsSubclassing: 0
PropertyList: [0×1 matlab.metadata.Property]
MethodList: [150×1 matlab.metadata.Method]
EventList: [0×1 matlab.metadata.Event]
EnumerationMemberList: [2×1 matlab.metadata.EnumerationMember]
SuperclassList: [1×1 matlab.metadata.Class]
Define two enumeration types.
Simulink.defineIntEnumType('myEnumType1', {'e1', 'e2'}, [1 2]); Simulink.defineIntEnumType('myEnumType2', {'e3', 'e4'}, [3 4]);
Check for the enumeration types that you have created.
myResult = Simulink.findIntEnumType()
Input Arguments
Name of a specific enumeration class that is defined bySimulink.defineIntEnumType
, specified as a character vector or string.
Example: 'myEnumType'
Data Types: char
| string
Output Arguments
Search result, returned as an array of matlab.metadata.Class
objects. If there are no enumeration classes, the array is empty.
Version History
Introduced in R2018b