Class: TInterest

Declaration: Notification.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

TSystemWindowInterest TTelephoneCallInterest TTelephoneFeatureInterest TTelephoneInterest TClipboardChangedInterest TGUIBundleInterest TModelInterest TModelPresenterStateInterest TModelStyleAllChangesInterest TModelStyleChangedInterest TModelStyleRemovedInterest TPresenterInterest TTextStoreInterest TWindowGroupInterest TWindowInterest

Purpose:

Describes a receiver's interest in a notification. TInterest supports specification of a notification interest as a name (TToken) and a notifier (MNotifier*), but might be derived to include additional parameters for interest specification. Use TInterest when generating a notification to select the appropriate clients of the notification. All clients that have included an interest that is equal to the dispatching interest used at the time of distributing the notification will receive the notification.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

TInterest supports specification of a notification interest as a name (TToken) and a notifier (MNotifier*), but might be derived to include additional parameters for interest specification. Additional information such as an object ID or handle might be used to express interest in changes to a specific object or field. See the member function description for "IsEqual" for special requirements when deriving.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TInterest::TInterest

  1. TInterest (MNotifier * theNotifier, const TToken & theName)
  2. TInterest (const TInterest &)
  3. TInterest ()

Interface Category:

API.

Purpose:

  1. Creates a TInterest.
  2. Copy constructor.
  3. Default constructor.

Calling Context:

  1. Call this function directly.
  2. Called to copy an object. Call this function directly.
  3. Only for internal use by Resurrect. Developers should treat this as protected.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TInterest::~TInterest

virtual ~ TInterest ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TInterest::GetName

TToken GetName () const

Interface Category:

API.

Purpose:

Returns the token that indicates the reason why a notification will be generated.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TInterest::SetName

virtual void SetName (const TToken & theName)

Interface Category:

API.

Purpose:

Changes the token that indicates the reason why a notification will be generated.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TInterest::GetNotifier

MNotifier * GetNotifier () const

Interface Category:

API.

Purpose:

Determines from which notifier that the receiver is in is interested in obtaining notifications.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the notifier that will be generating the notifications.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TInterest::SetNotifier

virtual void SetNotifier (MNotifier * theNotifier)

Interface Category:

API.

Purpose:

Specifies from which notifier that the receiver is in is interested in obtaining notifications.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TInterest::operator=

TInterest & operator =(const TInterest &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object. Call this function directly.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TInterest::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Used by the collection classes to generate a hash value.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The hash value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TInterest::operator>>=

virtual TStream & operator >>=(TStream &) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data. Call this function directly.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TInterest::operator<<=

virtual TStream & operator <<= (TStream &)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data. Call this function directly.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TInterest::IsEqual

virtual bool IsEqual (const MCollectible *) const

Interface Category:

API.

Purpose:

Tests two objects for equality.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the other object is an interest with the same token as this o ne.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.