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.
- TSimpleUnicodeArray (const char nullTerminated [])
- TSimpleUnicodeArray (const UniChar that [], TTextCount thatLength)
- TSimpleUnicodeArray (const TText & that)
- TSimpleUnicodeArray (const TSimpleUnicodeArray & that)
- TSimpleUnicodeArray ()
Interface Category:
API.
Purpose:
- Constructs a TSimpleUnicodeArray for the given character string.
- Constructs a TSimpleUnicodeArray for the given character string.
- Constructs a TSimpleUnicodeArray for the character string encapsulated by a text instance.
- Copy constructor.
- Default constructor.
Calling Context:
- Called to construct a TSImpleUnicodeArray for a character string.
- Called to construct a TSImpleUnicodeArray for a character string.
- Called to construct a TSImpleUnicodeArray for a character string encapsulated by a text instance.
- Called to copy an object.
- Called by the stream-in operators.
Parameters:
- const char nullTerminated [] -The character string.
- const UniChar that [] -The character string.
- TTextCount thatLength -The length of the character string.
- const TText & that -The text instance containing the character string.
- const TSimpleUnicodeArray & that -The object to copy.
- Takes no parameters.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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.
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.
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.
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.
virtual TStream & operator >>=(TStream &) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & toWhere -The stream the object streams itself out to.
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.
virtual TStream & operator <<= (TStream &)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromWhere -The stream the object streams itself in from.
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.
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.
- virtual TTextCount GetData (UniChar that [], TTextCount thatLength) const
- virtual TTextCount GetData (UniChar that [], TTextCount thatLength, const TTextRange & thisRange) const
- virtual TTextCount GetData (char that [], TTextCount thatLength) const
- virtual TTextCount GetData (char that [], TTextCount thatLength, const TTextRange & thisRange) const
Interface Category:
API.
Purpose:
- Gets the character string encapsulated by this object as a UniChar array.
- Gets the character string encapsulated by this object as a UniChar array.
- Gets the character string encapsulated by this object as a char array.
- Gets the character string encapsulated by this object as a char array.
Calling Context:
- Called to get the character string encapsulated by this object.
- Called to get the character string encapsulated by this object.
- Called to get the character string encapsulated by this object.
- Called to get the character string encapsulated by this object.
Parameters:
- UniChar that [] -The UniChar array encapsulated by this object.
- TTextCount thatLength -The length of the array.
- UniChar that [] -The UniChar array encapsulated by this object.
- TTextCount thatLength -The length of the array.
- const TTextRange & thisRange -The range to return.
- char that [] -The char array encapsulated by this object.
- TTextCount thatLength -The length of the array.
- char that [] -The char array encapsulated by this object.
- TTextCount thatLength -The length of the array.
- const TTextRange & thisRange -The range to return.
Return Value:
The actual length of the returned array.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
- virtual void SetData (const UniChar that [], const TTextRange & thatRange)
- virtual void SetData (const char that [], const TTextRange & thatRange)
Interface Category:
API.
Purpose:
- Replaces the string in this object with the specified string.
- Replaces the string in this object with the specified string.
Calling Context:
- Called to replace the string in this object with the specified string.
- Called to replace the string in this object with the specified string.
Parameters:
- const UniChar that [] -The string to replace the current string.
- const TTextRange & thatRange -The range of the string to use.
- const char that [] -The string to replace the current string.
- const TTextRange & thatRange -The range of the string to use.
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.