Class: TSimpleUnicodeArray

Declaration: UnicodeArray.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TUnicodeArray

Inherited By:

None.

Purpose:

Derived from TUnicodeArray, it provides a simpler mechanism that TText for storing and manipulating small strings of Unicode characters. TSimpleUnicodeArray does not provide protocol for displaying or editing the string.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Derive to extend the mechanism for manipulated encapsulated UniChar strings.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TSimpleUnicodeArray::TSimpleUnicodeArray

  1. TSimpleUnicodeArray (const char nullTerminated [])
  2. TSimpleUnicodeArray (const UniChar that [], TTextCount thatLength)
  3. TSimpleUnicodeArray (const TText & that)
  4. TSimpleUnicodeArray (const TSimpleUnicodeArray & that)
  5. TSimpleUnicodeArray ()

Interface Category:

API.

Purpose:

  1. Constructs a TSimpleUnicodeArray for the given character string.
  2. Constructs a TSimpleUnicodeArray for the given character string.
  3. Constructs a TSimpleUnicodeArray for the character string encapsulated by a text instance.
  4. Copy constructor.
  5. Default constructor.

Calling Context:

  1. Called to construct a TSImpleUnicodeArray for a character string.
  2. Called to construct a TSImpleUnicodeArray for a character string.
  3. Called to construct a TSImpleUnicodeArray for a character string encapsulated by a text instance.
  4. Called to copy an object.
  5. Called by the stream-in operators.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSimpleUnicodeArray::~TSimpleUnicodeArray

virtual ~ TSimpleUnicodeArray ()

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

TSimpleUnicodeArray & operator =(const TSimpleUnicodeArray & that)

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.

Member Function: TSimpleUnicodeArray::operator==

bool operator ==(const TSimpleUnicodeArray & 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: TSimpleUnicodeArray::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Generates a hash value.

Calling Context:

Called to generate a hash value.

Parameters:

Return Value:

The numeric value of the hash.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

If you override the Hash member function, then you must also override the IsEqual member function that takes a TSimpleUnicodeArray&, because it uses hash value comparison for performance.

Member Function: TSimpleUnicodeArray::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: TSimpleUnicodeArray::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: TSimpleUnicodeArray::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: TSimpleUnicodeArray::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: TSimpleUnicodeArray::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: TSimpleUnicodeArray::GetEmptyUnicodeArray

static const TSimpleUnicodeArray * GetEmptyUnicodeArray ()

Interface Category:

API.

Purpose:

Returns a TSimpleUnicodeArray that has a length of 0.

Calling Context:

Called when a TSimpleUnicodeArray that has a length of 0 is needed.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function is used internally to return a TSimpleUnicodeArray for a null TToken.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.