Namespace: PureMVC.Core.View

Class TView

System.TInterfacedObject
  |
  +-- PureMVC.Core.View.TView
All Implemented Interfaces:
IView

public class TView ( System.TInterfacedObject , IView )

Abstract
False
Sealed
False
Persistent
False
summary
A Singleton IView implementation.
remarks
In PureMVC, the View class assumes 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
see

Method Summary
  public Sub Destroy()
 
  public function Boolean HasMediator(MediatorName: string)
Check if a Mediator is registered or not
  public function Boolean HasMediator(Mediator: PureMVC.Interfaces.IMediator.IMediator )
 
  public function PureMVC.Interfaces.IView.IView Instance()
View Singleton Factory method. This method is thread safe.
  public Sub NotifyObservers(Notification: 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

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 the observer for a given notifyContext from an observer list for a given Notification name.
  public function PureMVC.Interfaces.IMediator.IMediator RetrieveMediator(MediatorName: string)
Retrieve an IMediator from the View
 

Method Detail

Destroy

public procedure Destroy()
Abstract
False
Reintroduce
False
Virtual
False
Override
True
Final
False

HasMediator

public function HasMediator(MediatorName: string): Boolean
Abstract
False
Reintroduce
False
Final
False
Returns
Boolean
Virtual
True
Override
False
summary
Check if a Mediator is registered or not
remarks
This method is thread safe and needs to be thread safe in all implementations.
returns
whether a Mediator is registered with the given mediatorName.
Class
False

HasMediator

public function HasMediator(Mediator: PureMVC.Interfaces.IMediator.IMediator ): Boolean
Abstract
False
Reintroduce
False
Final
False
Returns
Boolean
Virtual
False
Override
False
Class
False

Instance

public function Instance(): PureMVC.Interfaces.IView.IView 
Abstract
False
Reintroduce
False
Final
False
Returns
IView
Virtual
False
Override
False
summary
View Singleton Factory method. This method is thread safe.
Class
True

NotifyObservers

public procedure NotifyObservers(Notification: PureMVC.Interfaces.INotification.INotification )
Abstract
False
Reintroduce
False
Final
False
Virtual
True
Override
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
This method is thread safe and needs to be thread safe in all implementations.
param
The INotification to notify IObservers of
Class
False

RegisterMediator

public procedure RegisterMediator(Mediator: PureMVC.Interfaces.IMediator.IMediator )
Abstract
False
Reintroduce
False
Final
False
Virtual
True
Override
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
This method is thread safe and needs to be thread safe in all implementations.
param
A reference to the IMediator instance
Class
False

RegisterObserver

public procedure RegisterObserver(NotificationName: string; Observer: PureMVC.Interfaces.IObserver.IObserver )
Abstract
False
Reintroduce
False
Final
False
Virtual
True
Override
False
summary
Register an IObserver to be notified of INotifications with a given name
remarks
This method is thread safe and needs to be thread safe in all implementations.
param
The name of the INotifications to notify this IObserver of
The IObserver to register
Class
False

RemoveMediator

public function RemoveMediator(MediatorName: string): PureMVC.Interfaces.IMediator.IMediator 
Abstract
False
Reintroduce
False
Final
False
Returns
IMediator
Virtual
True
Override
False
summary
Remove an IMediator from the View

Remove an IMediator from the View
remarks
This method is thread safe and needs to be thread safe in all implementations.
This method is thread safe and needs to be thread safe in all implementations.
param
The name of the IMediator instance to be removed
The name of the IMediator instance to be removed
Class
False

RemoveMediator

public function RemoveMediator(Mediator: PureMVC.Interfaces.IMediator.IMediator ): PureMVC.Interfaces.IMediator.IMediator 
Abstract
False
Reintroduce
False
Final
False
Returns
IMediator
Virtual
False
Override
False
Class
False

RemoveObserver

public procedure RemoveObserver(NotificationName: string; NotifyContext: TObject)
Abstract
False
Reintroduce
False
Final
False
Virtual
True
Override
False
summary
Remove the observer for a given notifyContext from an observer list for a given Notification name.
remarks
This method is thread safe and needs to be thread safe in all implementations.
param
which observer list to remove from
remove the observer with this object as its notifyContext
Class
False

RetrieveMediator

public function RetrieveMediator(MediatorName: string): PureMVC.Interfaces.IMediator.IMediator 
Abstract
False
Reintroduce
False
Final
False
Returns
IMediator
Virtual
True
Override
False
summary
Retrieve an IMediator from the View
remarks
This method is thread safe and needs to be thread safe in all implementations.
returns
The IMediator instance previously registered with the given mediatorName
param
The name of the IMediator instance to retrieve
Class
False

Implementation Link

to Interface IView

Client
TView
Supplier
IView

Association Link

to Interface IView

Client
FInstance
Directed
False
Type
association
Supplier
IView