MATLAB Object-Oriented Programming

(Joyce) #1

Class Attributes


Attribute Name Class Description
Abstract logical

(default =
false)

If specified as true, this class is an abstract class (cannot be
instantiated).

See “Abstract Classes” on page 12-91 for more information.
AllowedSubclasse
s

meta.class
object or cell
array of
meta.class
objects

List classes that can subclass this class. Specify subclasses
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 a Sealed class (no subclasses).


Specify meta.class objects using the ?ClassName syntax
only.

See “Specify Allowed Subclasses” on page 12-25 for more
information.
ConstructOnLoad logical

(default =
false)

If true, MATLAB calls the class constructor when loading an
object from a MAT-file. Therefore, implement the constructor
so it can be called with no arguments without producing an
error.

See “Initialize Objects When Loading” on page 13-30 for
more information.
HandleCompatible logical

(default =
false) for
value classes

If specified as true, this class can be used as a superclass
for handle classes. All handle classes are
HandleCompatible by definition. See “Handle Compatible
Classes” on page 12-39 for more information.

Hidden logical

(default =
false)

If true, this class does not appear in the output of the
superclasses or help functions.

Class Attributes
Free download pdf