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.
- TCharacterPropertyIterator (TUnicode :: ECharacterProperty lowPropertyBound, TUnicode :: ECharacterProperty highPropertyBound, const TUnicode * characterSet =NIL)
- TCharacterPropertyIterator (const TCharacterPropertyIterator & other)
Interface Category:
API.
Purpose:
- Constructor generally used to instantiate the class.
- Copy constructor.
Calling Context:
- Called to create a new iterator object for a given range and given Unicode implementation.
- Called to copy an object.
Parameters:
- TUnicode :: ECharacterProperty lowPropertyBound -The lower bound for the range of character properties you wish to match.
- TUnicode :: ECharacterProperty highPropertyBound -The upper bound for the range of character properties you wish to match.
- const TUnicode * characterSet =NIL -The Unicode implementation you wish to check. The default value of NIL is used to indicate that the implementation is CommonPoint's standard implementation of Unicode. Pointers to TUnicode derived classes may be used to override this with a custom implementation of Unicode using a different definition of Unicode's user zone. Storage for this parameter is not taken over; the TCharacterProperty iterator class makes a copy of the TUnicode object given it for its own use.
- const TCharacterPropertyIterator & other -The object to copy.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
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:
- TUnicode :: ECharacterProperty lowPropertyBound -The lower bound for the range of character properties you wish to match.
- TUnicode :: ECharacterProperty highPropertyBound -The upper bound for the range of character properties you wish to match.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
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:
- TUnicode :: ECharacterProperty & lowPropertyBound -The lower bound for the range of character properties currently used as match.
- TUnicode :: ECharacterProperty & highPropertyBound -The upper bound for the range of character properties currently used as match.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
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.
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.
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.
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.