Contenuto principale

Classi handle

Le classi handle supportano la semantica di riferimento

Un costruttore di classe handle restituisce un oggetto handle che è un riferimento all'oggetto creato. È possibile assegnare l'oggetto handle a più variabili o passarlo alle funzioni senza che MATLAB® faccia una copia dell'oggetto originale. Per una discussione su come lavorare con gli oggetti handle, vedere Handle Object Behavior.

Funzioni

isequalDetermine array equality
eqDetermine equality
matlab.lang.invalidHandleConstruct array of invalid handles (Da R2024b)

Classi

handleSuperclass of all handle classes
matlab.mixin.SetGetProvide handle classes with set and get methods
matlab.mixin.SetGetExactNamesRequire exact name match for set and get methods
dynamicpropsSuperclass for classes that support dynamic properties
matlab.mixin.CopyableSuperclass providing copy functionality for handle objects
matlab.lang.WeakReferenceWeak reference to handle object (Da R2024b)
matlab.lang.HandlePlaceholderBasic subclass of handle (Da R2024b)

Metodi

addlistenerCreate event listener bound to event source
listenerCreate event listener without binding to event source
notifyNotify listeners that event is occurring
deleteDelete handle object
findobjFind handle objects
findpropFind matlab.metadata.Property object
isvalidDetermine valid handles
relationaloperatorsDetermine equality or sort handle objects

Argomenti

Caratteristiche delle classi handle e di valore

Costruzione sulla classe handle

  • The Handle Superclass
    The handle class implements methods to support events and listeners, destructors, relational operations, and other operations.
  • Handle Class Destructor
    Define a delete method to customize what happens when MATLAB destroys handle objects.

Utilizzo delle classi handle