- •Объектно-ориентированная модель проектирования
- •Объекты и классы
- •Вызов методов
- •Переопределение классов
- •Иерархия объектов. Индексация объектов
- •Индексация объектов.
- •Наследование
- •Создание классов с помощью classdef
- •Описание атрибутов свойств
- •Описание атрибутов методов
- •Описание атрибутов событий
Описание атрибутов свойств
Название |
Тип |
Описание |
AbortSet |
logical default = false |
If true, MATLAB® does not set the property value if the new value is the same as the current value and does not call the property set method, if one exists. For handle classes, setting AbortSet to true also prevent the triggering of property PreSet and PostSet events. |
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.
|
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:
Use Access to set both SetAccess and GetAccess to the same value. Query the values of SetAccess and GetAccess directly (not Access). |
Constant |
logical default = false |
Set to true if you want only one value for this property in all instances of the class:
|
Dependent |
logical default = false |
If false, property value is stored in object. If true, property value is not stored in object. The set and get functions cannot access the property by indexing into the object using the property name. MATLAB does not display in the command window the names and values of Dependent properties that do not define a get method (scalar object display only). |
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:
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. |
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.). MATLAB does not display in the command window the names and values of properties whose Hidden attribute is true or properties having protected or private GetAccess. |
SetAccess |
enumeration default = public |
public — unrestricted access protected — access from class or subclasses private — access by class members only (not from subclasses) immutable — property can be set only in the constructor. List classes that have set access to this property. Specify classes as meta.class objects in the form:
|
SetObservable |
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 modified. |
Transient |
logical default = false |
If true, property value is not saved when object is saved to a file. |
Таблица 4
