Namespace: PureMVC.Interfaces.IView

Interface IView

All Known Implementing Classes:
TView

public interface IView

Persistent
False
see
remarks
In PureMVC, IView implementors assume these responsibilities:Maintain a cache of IMediator instancesProvide methods for registering, retrieving, and removing IMediatorsManaging the observer lists for each INotification in the applicationProviding a method for attaching IObservers to an INotification's observer listProviding a method for broadcasting an INotificationNotifying the IObservers of a given INotification when it broadcast
summary
The interface definition for a PureMVC View

Method Summary
  public function Boolean HasMediator(MediatorName: string)
Check if a Mediator is registered or not
  public Sub NotifyObservers(Note: PureMVC.Interfaces.INotification.INotification )
Notify the IObservers for a particular INotification
  public Sub RegisterMediator(Mediator: PureMVC.Interfaces.IMediator.IMediator )
Register an IMediator instance with the View
  public Sub RegisterObserver(NotificationName: string; Observer: PureMVC.Interfaces.IObserver.IObserver )
Register an IObserver to be notified of INotifications with a given name
  public function PureMVC.Interfaces.IMediator.IMediator RemoveMediator(MediatorName: string)
Remove an IMediator from the View
  public function PureMVC.Interfaces.IMediator.IMediator RemoveMediator(Mediator: PureMVC.Interfaces.IMediator.IMediator )
 
  public Sub RemoveObserver(NotificationName: string; NotifyContext: TObject)
Remove a group of observers from the observer list for a given Notification name.
  public function PureMVC.Interfaces.IMediator.IMediator RetrieveMediator(MediatorName: string)
Retrieve an IMediator from the View
 

Method Detail

HasMediator

public function HasMediator(MediatorName: string): Boolean
Reintroduce
False
Returns
Boolean
summary
Check if a Mediator is registered or not
returns
whether a Mediator is registered with the given mediatorName.
param
The name of the IMediator instance to check for

NotifyObservers

public procedure NotifyObservers(Note: PureMVC.Interfaces.INotification.INotification )
Reintroduce
False
summary
Notify the IObservers for a particular INotification
remarks
All previously attached IObservers for this INotification's list are notified and are passed a reference to the INotification in the order in which they were registered
param
The INotification to notify IObservers of

RegisterMediator

public procedure RegisterMediator(Mediator: PureMVC.Interfaces.IMediator.IMediator )
Reintroduce
False
summary
Register an IMediator instance with the View
remarks
Registers the IMediator so that it can be retrieved by name, and further interrogates the IMediator for its INotification interestsIf the IMediator returns any INotification names to be notified about, an Observer is created encapsulating the IMediator instance's handleNotification method and registering it as an Observer for all INotifications the IMediator is interested in
param
A a reference to the IMediator instance

RegisterObserver

public procedure RegisterObserver(NotificationName: string; Observer: PureMVC.Interfaces.IObserver.IObserver )
Reintroduce
False
summary
Register an IObserver to be notified of INotifications with a given name
param
The name of the INotifications to notify this IObserver of
The IObserver to register

RemoveMediator

public function RemoveMediator(MediatorName: string): PureMVC.Interfaces.IMediator.IMediator 
Reintroduce
False
Returns
IMediator
summary
Remove an IMediator from the View
param
The name of the IMediator instance to be removed

RemoveMediator

public function RemoveMediator(Mediator: PureMVC.Interfaces.IMediator.IMediator ): PureMVC.Interfaces.IMediator.IMediator 
Reintroduce
False
Returns
IMediator

RemoveObserver

public procedure RemoveObserver(NotificationName: string; NotifyContext: TObject)
Reintroduce
False
summary
Remove a group of observers from the observer list for a given Notification name.
param
which observer list to remove from
removed the observers with this object as their notifyContext

RetrieveMediator

public function RetrieveMediator(MediatorName: string): PureMVC.Interfaces.IMediator.IMediator 
Reintroduce
False
Returns
IMediator
summary
Retrieve an IMediator from the View
returns
The IMediator instance previously registered with the given mediatorName
param
The name of the IMediator instance to retrieve