IInterest

IInterest is used by an observer to register with a notifier. It specifies what types of notification events an observer is interested in. Typically a notifier publishes interests which an observer can use to register for notifications.


IInterest - Member Functions and Data by Group

Constructors & Destructor

Construct, destruct and assign IInterest objects.


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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IInterest


Overload 1
public:
IInterest(const INotifier&, const INotificationId&)
Constructs an interest from a notifier and notification id. The notifier is a reference to the notifier from which the notification originates. The notifier id identifies the type of interest.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
public:
IInterest(const IInterest& src)
Copy construct an IInterest. This will clear the observerlist cache used by the convenience methods.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 3
public:
IInterest()

Construct an IInterest object for all types of notification events.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
operator =
public:
IInterest& operator =(const IInterest& rhs)

This operator assigns the value of one IInterest object to another.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Accessors

Use these methods to access the data of this class.


[view class]
hashValue
public:
unsigned long hashValue() const
Returns the hash value used to compare this interest.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
notificationId
public:
INotificationId notificationId() const
Returns the notification id associated with this interest.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
notifierAddress
public:
INotifierAddress notifierAddress() const
Returns the notifier address associated with this interest.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Comparison Operators

Use these members to compare one IInterest object to another.


[view class]
operator !=
public:
bool operator !=(const IInterest& theInterest) const

This function compares this object to another interest object for inequality. Returns true if this object is not equal to the passed object, otherwise returns false.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
operator <
public:
bool operator <(const IInterest& rhs) const

This function compares this object to another interest object for relative magnitude. The parameter fName is the interest to compare to this interest. Retuns true if this object represents interest that is less than that of the comparison interest.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
operator ==
public:
bool operator ==(const IInterest& theInterest) const

This function compares this object to another interest object for equality. Returns true if this object is equal to the passed object, otherwise returns false.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Convenience member functions


[view class]
computeHashValue
protected:
static unsigned long computeHashValue(const char* pString)
Computes a hashvalue given a string pointer.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Observer Notification

There members notify observers related to this interest object.


[view class]
notifyObservers
public:
virtual void notifyObservers(INotificationEvent&)
Notifies any observers registered for this interest.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
notifyObserversAsync
public:
virtual void notifyObserversAsync(INotificationEvent&)
Asynchronously notifies any observers registered for this interest.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IInterest - Associated Globals


hash
unsigned long hash(IInterest const& k, unsigned long n)


IInterest - Inherited Member Functions and Data

Inherited Public Functions

Inherited Public Data

Inherited Protected Functions

Inherited Protected Data