Class: TSimpleEventDistributor

Declaration: Input.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MEventDistributor

Inherited By:

None.

Purpose:

Provides a basic targeting service, roughly equivalent to the static target chains found in other frameworks. TSimpleEventDistributor is used by input devices whose events are to be distributed via a simple chain. TSimpleEventDistributor is responsible for iterating through a sequence of MEventTarget objects, distributing events to each event target in turn, and stopping when it finds a target that wants the event.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TSimpleEventDistributor::TSimpleEventDistributor

  1. TSimpleEventDistributor ()
  2. TSimpleEventDistributor (const TSimpleEventDistributor & copy)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSimpleEventDistributor::~TSimpleEventDistributor

virtual ~ TSimpleEventDistributor ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSimpleEventDistributor::operator=

TSimpleEventDistributor & operator =(const TSimpleEventDistributor & assign)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function by using the operator in an assignment statement.

Parameters:

Return Value:

Returns a 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: TSimpleEventDistributor::operator>>=

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

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

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: TSimpleEventDistributor::operator<<=

virtual TStream & operator <<= (TStream & readFrom)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

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

Exceptions:

Throws a TInvalidVersionError if the version of the object on the stream is unknown to the version of the shared library installed.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSimpleEventDistributor::HandleDistributeEvent

virtual bool HandleDistributeEvent (TEvent & theEvent)

Interface Category:

API.

Purpose:

Handles event distribution if DistributeEvent did not successfully distribute the specified event. TSimpleEventDistributor's implementation of this function distributes the event to the event targets registered with the event's standard event receiver.

Calling Context:

Called from DistributeEvent after attempting and failing to distribute the event to various objects.

Parameters:

Return Value:

Returns true if this function handled the event; false otherwise.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function overrides MEventDistributor's pure virtual function of the same name.