Class: TBatchNotification

Declaration: Notification.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TNotification

Inherited By:

None.

Purpose:

Transports a group of notifications to a receiver as a single batch notification. The notifications in the batch notification can be distributed individually by calling DispatchNotifications. The receiver can bracket the dispatch of the notifications with whatever handling is required for the notifications as a group. A better name for TBatchNotification might be TCollectionOf_TNotificationInterestPair_Notification because a batch notification actually maintains a collection of notification/interest pairs. These notification/interest pairs are: A notification to be distributed to receivers. An interest. This interest is used to match all receivers connected by the batch's notifier connection. A notifier that is in batch mode initially creates an TBatchNotification and adds the first notification to the batch notification. When the notifier is taken out of batch mode, it sends all of the batch notifications off.

Instantiation:

Always allocate on the heap.

Deriving Classes:

This class is not intended for deriving.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TBatchNotification::TBatchNotification

  1. TBatchNotification (TNotifierConnection * theConnection)
  2. TBatchNotification (const TBatchNotification &)
  3. TBatchNotification ()

Interface Category:

API.

Purpose:

  1. Creates a batch notification with no contained notifications.
  2. Copy constructor.
  3. Default constructor.

Calling Context:

  1. Call this function directly.
  2. Called to copy an object. Call this function directly.
  3. Called by the stream-in operators and directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBatchNotification::~TBatchNotification

virtual ~ TBatchNotification ()

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: TBatchNotification::GetBatchInterest

static const TInterest & GetBatchInterest ()

Interface Category:

API.

Purpose:

Allows clients to get a TInterest with the associated TToken a kBatchNotification token.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a TInterest( kBatchNotification ).

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBatchNotification::DispatchNotifications

virtual void DispatchNotifications () const

Interface Category:

API.

Purpose:

Uses the NotificationConnection with which it was created, to distribute its batched up 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: TBatchNotification::AddLast

virtual void AddLast (TNotificationInterestPair *)

Interface Category:

API.

Purpose:

Adds a notification and a dispatching interest pair to the list of notifications to be dispatched.

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: TBatchNotification::CreateNotificationIterator

TIteratorOver < TNotificationInterestPair > * CreateNotificationIterator () const

Interface Category:

API.

Purpose:

Used by clients of TBatchNotification to iterate over all of its notifications and dispatching interests.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a iterator over the batch's collection of notification/interest pairs.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBatchNotification::Count

unsigned long Count () const

Interface Category:

API.

Purpose:

Determines how many notification/interest pairs that the batch notification contains.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the number of notification/interest pairs that the batch contains.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBatchNotification::operator=

TBatchNotification & operator =(const TBatchNotification &)

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: TBatchNotification::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Generates a hash value for use by collections.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the hash value for the batch notification.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBatchNotification::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: TBatchNotification::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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.