MATLAB Object-Oriented Programming

(Joyce) #1

Attribute Name Class Description


GetAccess enumeration


default = public

public — unrestricted access

protected — access from class or
subclasses

private — access by class members only
(not from subclasses)

List classes that have get access to this
property. Specify classes as meta.class
objects in the form:


  • A single meta.class object

  • A cell array of meta.class objects.
    An empty cell array, {}, is the same as
    private access.


See “Class Members Access” on page 12-
28

MATLAB does not display in the command
window the names and values of
properties having protected or
private GetAccess or properties whose
Hidden attribute is true.

The struct function defines fields for all
properties when converting objects to
structs.

GetObservable logical


default = false

If true, and it is a handle class property,
then you can create listeners for access to
this property. The listeners are called
whenever property values are queried.
See “Property-Set and Query Events” on
page 11-17

Property Attributes
Free download pdf