Class: TTypingStore

Declaration: TypingStore.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

TTextTypingStore

Purpose:

TTypingStore is an abstract class that represents text being edited as typing occurs. It is a lightweight version of MTextRepresentation, with fewer functions. The developer of a text editor must derive TTypingStore, and provide the implementation to a TTypingConfigurationHandle so that the typing configuration can call functions in the derived class. Typing may be implemented either by directly changing the text being edited, or by modifying an incremental typing command and letting it update the text. CommonPoint's classes derived from TTypingStore use the latter approach.

Instantiation:

Abstract class; do not instantiate directly.

Deriving Classes:

The developer of a text editor must derive TTypingStore, and provide the implementation to TTypingConfigurationHandle in a call to the Attach function of that class.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TTypingStore::~TTypingStore

virtual ~ TTypingStore ()

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: TTypingStore::GetText

virtual const TText * GetText () const

Interface Category:

API.

Purpose:

Returns a const pointer to a TText object reflecting the text being edited. For synchronized access to text, use a read/write entry class (such as TTypingStoreReadEntry or TTypingStoreWriteEntry), not this function.

Calling Context:

Clients can call this function to obtain the TText pointer, then use TText API to read the text.

Parameters:

Return Value:

A const pointer to the TText object for the text being edited.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This is a pure virtual function and needs to be overridden.

Member Function: TTypingStore::TypeText

virtual void TypeText (const TText & textToInsert, const TTextRange & whereToInsert)

Interface Category:

API.

Purpose:

Replaces the specified range of text with the specified text.

Calling Context:

Called by the typing configuration's TypeText function.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This is a pure virtual function and needs to be overridden.

Member Function: TTypingStore::TypeEnd

virtual void TypeEnd ()

Interface Category:

API.

Purpose:

Terminates the typing transaction.

Calling Context:

Called by the typing configuration's TypeEnd function, to give command-based typing stores a chance to commit typing commands.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This is a pure virtual function and needs to be overridden.

Member Function: TTypingStore::TTypingStore

  1. TTypingStore ()
  2. TTypingStore (const TTypingStore &)

Interface Category:

API.

Purpose:

  1. Default constructor. This constructor is protected.
  2. Copy constructor. This constructor is protected.

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

TTypingStore & operator =(const TTypingStore &)

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:

This function is protected.

Member Function: TTypingStore::LockTextForReading

virtual void LockTextForReading ()

Interface Category:

API.

Purpose:

Establishes a read lock on the text. Called to lock the text for reading, for synchronized read access to the text data stream.

Calling Context:

This function should only be called by the read entry object (TTypingStoreReadEntry), or by delegating wrapper objects; it should not be called directly by clients.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This is a protected pure virtual function and needs to be overridden. The overriding function can do nothing if access control is not an issue.

Member Function: TTypingStore::UnlockTextForReading

virtual void UnlockTextForReading ()

Interface Category:

API.

Purpose:

Releases the read lock on the text. Called when synchronized read access is no longer needed.

Calling Context:

This function should only be called by the read entry object (TTypingStoreReadEntry), or by delegating wrapper objects; it should not be called directly by clients.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This is a protected pure virtual function and needs to be overridden. The overriding function can do nothing if access control is not an issue.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.