Skip to content

IFPObserved

[Properties (by Name)][Methods (by Name)][Events (by Name)]

Interface implemented by an object that can be observed.

Declaration

Source position: classesh.inc line 165

Type
  IFPObserved = interface [SGUIDObserved]
    procedure FPOAttachObserver(AObserver: TObject);
    procedure FPODetachObserver(AObserver: TObject);
    procedure FPONotifyObservers(ASender: TObject; 
                                AOperation: TFPObservedOperation; 
                                Data: Pointer);
  end
  ;

Description

IFPObserved is an interface which can be implemented in objects that must be observable. Objects that wish to observe the object can register themselves with the FPOAttachObserver]() call, and must be detached using the FPODetachObserver]() call.

This interface is not reference counted, so care must be taken that the ooFree message is sent with FPONotifyObservers]() when the object is freed.

Members

Member Type Visibility Description
FPOAttachObserver Method default Attach a new observer to the object
FPODetachObserver Method default Remove an observer from the list of observers.
FPONotifyObservers Method default Notify all observers

Inheritance

Class Description
IFPObserved Interface implemented by an object that can be observed.

See also

Name Description
FPONotifyObservers