MATLAB Object-Oriented Programming

(Joyce) #1
Attribute Name Class Description
InferiorClasses meta.class
object or cell
array of
meta.class
objects

Use this attribute to establish a precedence relationship
among classes. Specify a cell array of meta.class objects
using the? operator.

The fundamental classes are always inferior to user-defined
classes and do not show up in this list.

See “Class Precedence” on page 6-23 and “Dominant
Argument in Overloaded Graphics Functions” on page 9-49.
Sealed logical

(default =
false)

If true, this class cannot be subclassed.

Framework attributes Classes that use certain framework base classes have framework-specific
attributes. See the documentation for the specific base class you are using
for information on these attributes.

Specifying Attributes


Attributes are specified for class members in the classdef, properties, methods, and
events definition blocks. The particular attribute setting applies to all members defined
within that particular block. You can use multiple properties, methods, and events
definition blocks. to apply different attribute setting to different class members.

Superclass Attribute Values Are Not Inherited

Class attributes settings are not inherited, so superclass attribute values do not affect
subclasses.

Attribute Syntax

Specify class attribute values in parentheses, separating each attribute name/attribute
value pair with a comma. The attribute list always follows the classdef or class member
keyword, as shown:
classdef (attribute-name = expression, ...) ClassName
properties (attribute-name = expression, ...)
...
end

6 Defining and Organizing Classes

Free download pdf