MATLAB Object-Oriented Programming

(Joyce) #1

Attribute Name Class Description


Access (write-only, cannot
query this meta.property
property. Use GetAccess
and SetAccess in queries.)



  • enumeration, default =
    public

  • meta.class object

  • cell array of
    meta.class objects


Use Access to set both SetAccess and
GetAccess to the same value. Query the
values of SetAccess and GetAccess
directly (not Access).

public – unrestricted access

protected – access from class or
subclasses

private – access by class members only
(not subclasses)

List of classes that have get and set
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

Constant logical


default = false

Set to true if you want only one value for
this property in all instances of the class:


  • Subclasses inherit constant properties,
    but cannot change them.

  • Constant properties cannot be
    Dependent.

  • SetAccess is ignored.


See “Define Class Properties with
Constant Values” on page 15-2 for more
information.

Property Attributes
Free download pdf