Class: TKeyResultPair

Declaration: Keyboards.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

Concrete class that represents the rules in a virtual keyboard. Used by TKeyMapRuleIterator.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Derive as necessary for derived classes of TStandardEditableVirtualKeyboard that have different rule structures.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TKeyResultPair::SetModifiersOn

virtual void SetModifiersOn (const TModifierKeys & modsOn)

Interface Category:

API.

Purpose:

Sets the modifier keys that must be on for this key mapping rule.

Calling Context:

Called by keyboard editor programs.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TKeyResultPair::SetResult

virtual void SetResult (const TText & text)

Interface Category:

API.

Purpose:

Specifies a TText result for this mapping rule.

Calling Context:

Called by keyboard editor programs and internally.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TKeyResultPair::GetResult

virtual void GetResult (TText & text) const

Interface Category:

API.

Purpose:

Returns the TText result that is generated in this rule.

Calling Context:

Called directly by keyboard editor programs and internally.

Parameters:

Return Value:

The result returned in the text parameter.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TKeyResultPair::operator=

TKeyResultPair & operator =(const TKeyResultPair & copy)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

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

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

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 no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TKeyResultPair::operator>>=

virtual TStream & operator >>=(TStream & toStream) 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: TKeyResultPair::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Generates a hash value.

Calling Context:

Called to generate a hash value.

Parameters:

Return Value:

The numeric value of the hash.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TKeyResultPair::GetVirtualKey

virtual TVirtualKeyCode :: EVirtualKey GetVirtualKey () const

Interface Category:

API.

Purpose:

Returns the virtual key that generates this mapping.

Calling Context:

Called directly by keyboard editor programs and internally.

Parameters:

Return Value:

Returns the key identifier.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TKeyResultPair::SetVirtualKey

virtual void SetVirtualKey (TVirtualKeyCode :: EVirtualKey virtualKey)

Interface Category:

API.

Purpose:

Sets the virtual key that generates this mapping.

Calling Context:

Called directly by keyboard editor programs when adding rules.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TKeyResultPair::GetModifiersOn

virtual const TModifierKeys & GetModifiersOn () const

Interface Category:

API.

Purpose:

Returns the modifier keys that must be on for this rule.

Calling Context:

Called by keyboard editor programs and internally.

Parameters:

Return Value:

The value of the modifier keys that must be on.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TKeyResultPair::TKeyResultPair

  1. TKeyResultPair ()
  2. TKeyResultPair (const TKeyResultPair & from)
  3. TKeyResultPair (const UniChar singleCharResult, TVirtualKeyCode :: EVirtualKey key, const TModifierKeys & modsOn)
  4. TKeyResultPair (const TText & textResult, TVirtualKeyCode :: EVirtualKey key, const TModifierKeys & modsOn)

Interface Category:

API.

Purpose:

  1. Default constructor. Creates an empty rule.
  2. Copy constructor.
  3. Creates a usable rule for mapping to a single UniChar.
  4. Creates a usable rule for mapping to zero or more UniChars.

Calling Context:

  1. Called by the stream-in operators.
  2. Called to copy an object.
  3. Called directly by keyboard editor programs.
  4. Called directly by keyboard editor programs.

Parameters:

Return Value:

None.

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.