Class: TEventSenderSurrogate

Declaration: Input.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

A concrete class whose sole purpose is to identify input devices (TEventSenders) across tasks. TEventSenderSurrogate objects are lightweight and provide a simple protocol for validity and for identity comparison to other surrogates or to TEventSenders. TEventSenderSurrogates maintain an identifier that is used to determine both validity and identity.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TEventSenderSurrogate::TEventSenderSurrogate

  1. TEventSenderSurrogate ()
  2. TEventSenderSurrogate (const TEventSender & original)
  3. TEventSenderSurrogate (const TEventSenderSurrogate & copy)

Interface Category:

API.

Purpose:

  1. Default constructor. This constructor creates an invalid event sender surrogate.
  2. Creates a valid event sender surrogate that is the surrogate for the specified event sender.
  3. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. Call this function directly.
  3. 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: TEventSenderSurrogate::~TEventSenderSurrogate

virtual ~ TEventSenderSurrogate ()

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

TEventSenderSurrogate & operator =(const TEventSenderSurrogate & 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: TEventSenderSurrogate::operator==

bool operator ==(const TEventSenderSurrogate & other) const

Interface Category:

API.

Purpose:

Determines whether this event sender surrogate and the one specified are equal to one another. Valid surrogates are equal if and only if their identifiers are equal. Invalid surrogates are all equal to each other.

Calling Context:

Call this function by using the operator in an expression.

Parameters:

Return Value:

Returns true if the two objects are equal; false otherwise.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TEventSenderSurrogate::operator!=

bool operator != (const TEventSenderSurrogate & other) const

Interface Category:

API.

Purpose:

Determines whether this event sender surrogate and the one specified are not equal to one another. Valid surrogates are equal if and only if their identifiers are equal. Invalid surrogates are all equal to each other.

Calling Context:

Call this function by using the operator in an expression.

Parameters:

Return Value:

Returns true if the two objects are not equal; false otherwise.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TEventSenderSurrogate::Compare

virtual EComparisonResult Compare (const TEventSenderSurrogate & other) const

Interface Category:

API.

Purpose:

Compares this event sender surrogate object with the specified TEventSenderSurrogate object. Valid surrogates are equal if and only if their identifiers are equal. Invalid surrogates are all equal to each other.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns kEqual if the objects are equal, or kNotEqual if the objects are not equal.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TEventSenderSurrogate::GetHash

virtual HashResult GetHash () const

Interface Category:

API.

Purpose:

Returns the hash value that uniquely identifies this object within its type. Hash values are used to build dictionaries of objects.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the hash value that uniquely identifies this object within its type.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TEventSenderSurrogate::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: TEventSenderSurrogate::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 that is installed.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TEventSenderSurrogate::IsValid

bool IsValid () const

Interface Category:

API.

Purpose:

Determines whether this event sender surrogate is valid. A valid TEventSenderSurrogate represents an input device (TEventSender) that has been registered with the Input system.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if this event sender surrogate is valid; otherwise, returns false.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.