Class: TCharacterPropertyIterator

Declaration: Unicode.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

This class is used to scan the set of defined Unicode characters for characters matching a certain set of character properties. This class uses a range of enumerated values from the TUnicode::ECharacterProperty enum as the set of values to check. Derived classes may use more sophisticated matching techniques.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Clients might want to derive this class in order to define match criteria more sophisticated than a simple range check.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Member Function: TCharacterPropertyIterator::TCharacterPropertyIterator

  1. TCharacterPropertyIterator (TUnicode :: ECharacterProperty lowPropertyBound, TUnicode :: ECharacterProperty highPropertyBound, const TUnicode * characterSet =NIL)
  2. TCharacterPropertyIterator (const TCharacterPropertyIterator & other)

Interface Category:

API.

Purpose:

  1. Constructor generally used to instantiate the class.
  2. Copy constructor.

Calling Context:

  1. Called to create a new iterator object for a given range and given Unicode implementation.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCharacterPropertyIterator::SetRange

void SetRange (TUnicode :: ECharacterProperty lowPropertyBound, TUnicode :: ECharacterProperty highPropertyBound)

Interface Category:

API.

Purpose:

Sets the range of TUnicode::ECharacterProperty values considered a valid match.

Calling Context:

Resets the range of matching values for a TCharacterPropertyIterator after they were originally set by the constructor.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCharacterPropertyIterator::GetRange

void GetRange (TUnicode :: ECharacterProperty & lowPropertyBound, TUnicode :: ECharacterProperty & highPropertyBound) const

Interface Category:

API.

Purpose:

Returns the range of matching values for a TCharacterPropertyIterator.

Calling Context:

Used to return the range of matching values for a TCharacterPropertyIterator.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCharacterPropertyIterator::First

UniChar First ()

Interface Category:

API.

Purpose:

Finds the first character in Unicode whose character properties, as determined by TUnicode::GetType, are within the set range.

Calling Context:

Called immediately after instantiating the class or to reset the scan of Unicode values.

Parameters:

Return Value:

The first (that is, lowest-valued) Unicode character whose character properties are within the set range. The check is an inclusive one; any value greater than or equal to the lower bound and less than or equal to the upper bound is taken as a match. TUnicodeSpecial::kNotAUnicode is returned to indicate there is no match.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCharacterPropertyIterator::Next

UniChar Next ()

Interface Category:

API.

Purpose:

Finds the next character in Unicode whose character properties, as determined by TUnicode::GetType, are within the set range.

Calling Context:

Called after TCharacterPropertyIterator::First has started the scan of Unicode, or after a prior call to TCharacterPropertyIterator::Next.

Parameters:

Return Value:

The next (that is, next lowest-valued) Unicode character whose character properties are within the set range. The check is an inclusive one; any value greater than or equal to the lower bound and less than or equal to the upper bound is taken as a match. TUnicodeSpecial::kNotAUnicode is returned to indicate there is no further match.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TCharacterPropertyIterator::operator=

TCharacterPropertyIterator & operator =(const TCharacterPropertyIterator &)

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:

Multithread safe.

Other Considerations:

None.

Member Function: TCharacterPropertyIterator::~TCharacterPropertyIterator

virtual ~ TCharacterPropertyIterator ()

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:

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.