Class: TTextTypingStore

Declaration: TextTypingStoreCore.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TTypingStore

Inherited By:

TDocumentTextTypingStore TSimpleTextTypingStore

Purpose:

TTextTypingStore is derived from TTypingStore, and is used for representing text being edited as typing occurs. It uses a text view to implement some of the pure virtual functions defined by the base class. The remaining functions must be implemented by classes derived from TTextTypingStore.

Instantiation:

Do not instantiate this class directly; instantiate its derived classes.

Deriving Classes:

Derived classes must implement the TTypingStore pure virtual functions not implemented by TTextTypingStore: TypeEnd, LockTextForWriting, and UnlockTextForWriting. They must also implement the TTextTypingStore pure virtual function DoTyping. CommonPoint provides two derived classes: TDocumentTextTypingStore and TSimpleTextTypingStore. The former is for model-based text, and the latter for text that is not model-based.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TTextTypingStore::~TTextTypingStore

virtual ~ TTextTypingStore ()

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: TTextTypingStore::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:

Overrides inherited TTypingStore function.

Member Function: TTextTypingStore::TypeText

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

Interface Category:

API.

Purpose:

Replaces the specified range of text with the specified text. Calls the DoTyping function in classes derived from TTextTypingStore to do the actual text replacement.

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:

Overrides inherited TTypingStore function.

Member Function: TTextTypingStore::TTextTypingStore

  1. TTextTypingStore (TTextView * theView)
  2. TTextTypingStore (const TTextTypingStore & other)

Interface Category:

API.

Purpose:

  1. Constructs a text typing store object that uses the specified view to implement its member functions. This constructor is protected.
  2. Copy constructor. This constructor is protected.

Calling Context:

  1. Called to construct a text typing store object that uses the specified view to implement its member functions.
  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: TTextTypingStore::operator=

TTextTypingStore & operator =(const TTextTypingStore & other)

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: TTextTypingStore::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 protected function overrides the inherited TTypingStore function.

Member Function: TTextTypingStore::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 protected function overrides the inherited TTypingStore function.

Member Function: TTextTypingStore::GetTextView

virtual TTextView * GetTextView () const

Interface Category:

API.

Purpose:

Accessor to return the text view associated with this text typing store.

Calling Context:

Called by the typing configuration to get the text view associated with this text typing store.

Parameters:

Return Value:

A pointer to the text view associated with this text typing store.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTextTypingStore::DoTyping

virtual void DoTyping (const TText & newText, const TTextRange & newRange)

Interface Category:

API.

Purpose:

Replaces the specified range of text with the specified text.

Calling Context:

Called by TypeText to do the actual text replacement.

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