MATLAB Object-Oriented Programming

(Joyce) #1
Save and Load Enumerations......................... 14-45
Basic Knowledge................................ 14-45
Built-In and Value-Based Enumeration Classes.......... 14-45
Simple and Handle-Based Enumeration Classes ......... 14-45
Causes: Load as struct Instead of Object............... 14-46

Constant Properties


15


Define Class Properties with Constant Values............. 15-2
Defining Named Constants.......................... 15-2
Constant Property Assigned a Handle Object............ 15-4
Constant Property Assigned Any Object................ 15-4
Constant Properties — No Support for Get Events........ 15-6

Information from Class Metadata


16


Class Metadata ..................................... 16-2
What Is Class Metadata?........................... 16-2
The meta Package................................ 16-3
Metaclass Objects ................................ 16-3
Metaclass Object Lifecycle .......................... 16-4

Class Introspection with Metadata..................... 16-5
Using Class Metadata .............................. 16-5
Inspect the EmployeeData Class...................... 16-5
Metaclass EnumeratedValues Property ................. 16-8

Find Objects with Specific Values...................... 16-10
Find Handle Objects.............................. 16-10
Find by Attribute Settings......................... 16-11

Get Information About Properties ..................... 16-14
The meta.property Object.......................... 16-14
How to Find Properties with Specific Attributes......... 16-17

xxvi Contents

Free download pdf