Property Attributes

Table of Property Attributes

All properties support the attributes listed in the following table. Attributes enable you to modify the behavior of properties. Attribute values apply to all properties defined within the properties block that specifies the nondefault values.

Attribute Name

Class

Description

Abstract

logical

default = false

If true, the property has no implementation, but a concrete subclass must redefine this property without Abstract being set to true.
  • Abstract properties cannot define set or get access methods. See Controlling Property Access.

  • Abstract properties cannot define initial values. See Assigning an Initial Value.

  • All subclasses must specify the same values as the superclass for the property SetAccess and GetAccess attributes.

  • Abstract=true should be used with the class attribute Sealed=false (the default).

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 Defining Named Constants for more information.

Dependent

logical

default = false

If false, property value is stored in object. If true, property value is not stored in object and the set and get functions cannot access the property by indexing into the object using the property name.

See Property Get Methods

GetAccess

char

default = public

public — unrestricted access

protected -- access from class or derived classes

private — access by class members only

GetObservable

logical

default = false

If true, and it is a handle class property, then listeners can be created for access to this property. The listeners are called whenever property values are queried. See Property-Set and Query Events

Hidden

logical

default = false

Determines whether the property should be shown in a property list (e.g., Property Inspector, call to set or get, etc.).

SetAccess

char

default = public

public — unrestricted access

protected -- access from class or derived classes

private — access by class members only

SetObservable

logical

default = false

If true, and it is a handle class property, then listeners can be created for access to this property. The listeners are called whenever property values are modified. See Property-Set and Query Events

Transient

logical

default = false

If true, property value is not saved when object is saved to a file. See Saving and Loading Objects for more about saving objects.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS