Class: TUnicodeArray

Declaration: UnicodeArray.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

TSimpleUnicodeArray TToken

Purpose:

Provides base protocol for encapsulating and manipulating nonstyled, nondisplayable strings of Unicode characters.

Instantiation:

Abstract base class; do not allocate directly.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TUnicodeArray::~TUnicodeArray

virtual ~ TUnicodeArray ()

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

bool operator ==(const TUnicodeArray & that) const

Interface Category:

API.

Purpose:

Determines if two objects are equal.

Calling Context:

Called to compare two objects of this class.

Parameters:

Return Value:

Returns true if the objects are equal.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TUnicodeArray::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Returns the hash value for the collection. Note: This is a required override for every MCollectible derived class.

Calling Context:

Called by the static function ComputeHash.

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

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

virtual TStream & operator <<= (TStream &)

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: TUnicodeArray::GetLength

virtual TTextCount GetLength () const

Interface Category:

API.

Purpose:

Returns the length of the encapsulated character string.

Calling Context:

Called to get the length of the encapsulated character string.

Parameters:

Return Value:

The length of the encapsulated character string.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TUnicodeArray::GetData

  1. virtual TTextCount GetData (UniChar that [], TTextCount thatLength) const
  2. virtual TTextCount GetData (UniChar that [], TTextCount thatLength, const TTextRange & thisRange) const
  3. virtual TTextCount GetData (char that [], TTextCount thatLength) const
  4. virtual TTextCount GetData (char that [], TTextCount thatLength, const TTextRange & thisRange) const

Interface Category:

API.

Purpose:

  1. Gets the character string encapsulated by this object as a UniChar array.
  2. Gets the character string encapsulated by this object as a UniChar array.
  3. Gets the character string encapsulated by this object as a char array.
  4. Gets the character string encapsulated by this object as a char array.

Calling Context:

  1. Called to get the character string encapsulated by this object.
  2. Called to get the character string encapsulated by this object.
  3. Called to get the character string encapsulated by this object.
  4. Called to get the character string encapsulated by this object.

Parameters:

Return Value:

The actual length of the returned array.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TUnicodeArray::SetData

  1. virtual void SetData (const UniChar that [], const TTextRange & thatRange)
  2. virtual void SetData (const char that [], const TTextRange & thatRange)

Interface Category:

API.

Purpose:

  1. Replaces the string in this object with the specified string.
  2. Replaces the string in this object with the specified string.

Calling Context:

  1. Called to replace the string in this object with the specified string.
  2. Called to replace the string in this object with the specified string.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TUnicodeArray::ComputeHash

static long ComputeHash (UniChar fieldData [], TTextCount length)

Interface Category:

API.

Purpose:

Computes the hash value of a UniChar array of a specified length.

Calling Context:

Called by derived classes to compute the hash value of a UniChar array of a specified length.

Parameters:

Return Value:

The numeric hash value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The value returned by this function must be the value returned by Hash for all derived classes of TUnicodeArray.

Member Function: TUnicodeArray::CheapUniCharCopy

static void CheapUniCharCopy (const UniChar source [], UniChar target [], TTextCount characterCount)

Interface Category:

API.

Purpose:

Copies a UniChar array into another UniChar array.

Calling Context:

Called to copy a UniChar array into another UniChar array.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TUnicodeArray::CopyUniCharToChar

static void CopyUniCharToChar (const UniChar source [], char target [], TTextCount characterCount)

Interface Category:

API.

Purpose:

Copies a UniChar array to a char array.

Calling Context:

Called to copy a UniChar array to a char array.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TUnicodeArray::CopyCharToUniChar

static void CopyCharToUniChar (const unsigned char source [], UniChar target [], TTextCount characterCount)

Interface Category:

API.

Purpose:

Copies a char array to a UniChar array.

Calling Context:

Called to copy a char array to a UniChar array.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TUnicodeArray::TUnicodeArray

  1. TUnicodeArray ()
  2. TUnicodeArray (const TUnicodeArray &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

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

TUnicodeArray & operator =(const TUnicodeArray &)

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