The IObserverList class provides the interface for a list of IObserver objects. This class implements the list of observers as an ordered list.
Constructors & DestructorYou can construct and destruct objects of this class.
![]() |
public:
virtual ~IObserverList()
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
Construct an IObserverList object.
public:
IObserverList(const IObserverList& obsList)
The IObserverList object is created based on the contents of another IObserverList object.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
IObserverList()
This is the default constructor that takes no arguments.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Assignment![]() |
public:
IObserverList& operator =(const IObserverList& obsList)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Observer Addition and RemovalUse these members to add, remove, and find IObserver objects in the observer list's collection.
![]() |
public:
virtual bool add(IObserver& observer, void* userData)
Adds an observer to the end of the list.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
bool isEmpty() const
Returns true if there are no observers in the list.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IObserverList& remove(const IObserver& observer)
Removes the specified observer from the list.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IObserverList& removeAll()
Removes all observers from the list.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Observer NotificationThese members notify observers of a change in a notifier.
![]() |
public:
IObserverList& notifyObservers( const INotificationEvent& event )
Traverses the list of observers and calls each member's dispatchNotificationEvent function passing a specified notification event object.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
IObserverList& notifyObserversAsync( const INotificationEvent& anEvent )
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |