IObserverList

The IObserverList class provides the interface for a list of IObserver objects. This class implements the list of observers as an ordered list.


IObserverList - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class.


[view class]
~IObserverList
public:
virtual ~IObserverList()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IObserverList

Construct an IObserverList object.


Overload 1
public:
IObserverList(const IObserverList& obsList)

The IObserverList object is created based on the contents of another IObserverList object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
public:
IObserverList()

This is the default constructor that takes no arguments.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Assignment


[view class]
operator =
public:
IObserverList& operator =(const IObserverList& obsList)
Assigns the contents of one IObserverList object to another.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Observer Addition and Removal

Use these members to add, remove, and find IObserver objects in the observer list's collection.


[view class]
add
public:
virtual bool add(IObserver& observer, void* userData)

Adds an observer to the end of the list.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isEmpty
public:
bool isEmpty() const

Returns true if there are no observers in the list.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
remove
public:
virtual IObserverList& remove(const IObserver& observer)

Removes the specified observer from the list.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
removeAll
public:
virtual IObserverList& removeAll()

Removes all observers from the list.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Observer Notification

These members notify observers of a change in a notifier.


[view class]
notifyObservers
public:
IObserverList& notifyObservers( const INotificationEvent& event )

Traverses the list of observers and calls each member's dispatchNotificationEvent function passing a specified notification event object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
notifyObserversAsync
public:
IObserverList& notifyObserversAsync( const INotificationEvent& anEvent )
Traverses the list of observers and posts a notification request onto the observer's thread which calls each members.dispatchNotificationEvent function passing a specified notification event object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IObserverList - Inherited Member Functions and Data

Inherited Public Functions

Inherited Public Data

Inherited Protected Functions

Inherited Protected Data