System CATListValCATUnicodeString

Usage: you must use this class as is. You should never derive it.


public class CATListValCATUnicodeString

This class implements a mutable list of CATUnicodeStrings.
Role: The purpose of this class is to let C++ classes easily pass and receive lists of CATUnicodeString. The class handles all the low-level memory allocation tasks such as reallocating the list once it capacity has been exceeded. It also provides high level operations such as sorting, comparison, etc... The first element has index 1.
Use the type


Constructor and Destructor Index


o CATListValCATUnicodeString()
Constructs an empty list of CATUnicodeStrings.
o CATListValCATUnicodeString(int)
Constructs an empty list of CATUnicodeStrings with a specified initial capacity.
o CATListValCATUnicodeString(CATUnicodeString*,int)
Constructs a list and initializes it with a C++ CATUnicodeString array.
o CATListValCATUnicodeString(CATUnicodeString**,int)
Constructs a list and initializes it with a C++ pointer to CATUnicodeString array.
o CATListValCATUnicodeString(CATListValCATUnicodeString&)
Copy constructor.
o ~CATListValCATUnicodeString()
Destructor.

Method Index


o Append(CATUnicodeString&)
Appends a CATUnicodeString to the list.
o Append(CATListValCATUnicodeString&)
Appends the content of a CATUnicodeString list.
o Array(CATUnicodeString*)
Fills a C++ array of CATUnicodeStrings with elements from the list.
o Array(CATUnicodeString**)
Fills a C++ array of pointers to CATUnicodeStrings with elements from the list.
o Compare(CATListValCATUnicodeString&,CATListValCATUnicodeString&,int(*iPFCompare)(CATUnicodeString*,*))
Compares two lists of CATUnicodeStrings.
o InsertAfter(int,CATUnicodeString&)
Inserts a CATUnicodeString after the specified index.
o InsertBefore(int,CATUnicodeString&)
Inserts a CATUnicodeString before the specified index.
o Intersection(CATListValCATUnicodeString&,CATListValCATUnicodeString&,CATListValCATUnicodeString&)
Computes the intersection of two lists.
o Locate(CATUnicodeString&,int)
Finds the first occurrence of a CATUnicodeString from a given index.
o NbOccur(CATUnicodeString&)
Counts the occurrences of a CATUnicodeString in the list.
o QuickSort(int(*iPFCompare)(CATUnicodeString*,*))
Sorts the list using the quicksort algorithm.
o Remove(CATListValCATUnicodeString&)
Removes all the values specifed in iSubstract from the list.
o RemoveAll(CATCollec::MemoryHandling)
Removes all the elements from the list.
o RemoveDuplicates()
Removes all the duplicate occurrences of a CATUnicodeString from the list.
o RemoveDuplicates(CATListValCATUnicodeString&)
Removes all the duplicate occurrences of a CATUnicodeString from the list and appends them to another list.
o RemovePosition(int)
Removes the CATUnicodeString located at a given index.
o RemoveValue(CATUnicodeString&)
Removes the first occurrence of a CATUnicodeString from the list.
o Replace(int,CATUnicodeString&)
Replaces an element at a specified index with another CATUnicodeString value.
o Size()
Returns the size of the list.
o Size(int,CATUnicodeString*)
Forces the size of the list to an arbitrary size.
o Swap(int,int)
Swaps two list elements.
o operator !=(CATListValCATUnicodeString&)
Inequality operator.
o operator >(CATListValCATUnicodeString&)
Greater than operator.
o operator >=(CATListValCATUnicodeString&)
Greater than or equal to operator.
o operator <(CATListValCATUnicodeString&)
Less than operator.
o operator <=(CATListValCATUnicodeString&)
Less than or equal to operator.
o operator ==(CATListValCATUnicodeString&)
Equality operator.
o operator=(CATListValCATUnicodeString&)
Assignment operator.
o operator[](int)
Subscripting operator.
o operator[](int)
Subscripting operator.

Constructor and Destructor


o CATListValCATUnicodeString
public CATListValCATUnicodeString()
Constructs an empty list of CATUnicodeStrings.
o CATListValCATUnicodeString
public CATListValCATUnicodeString( iInitAlloc)
Constructs an empty list of CATUnicodeStrings with a specified initial capacity.
Parameters:
iInitAlloc
The default capacity of the list.
o CATListValCATUnicodeString
public CATListValCATUnicodeString( iArray,
iSize)
Constructs a list and initializes it with a C++ CATUnicodeString array.
Parameters:
iArray
A C++ array CATUnicodeStrings used to initialize the list.
iSize
The size of the C++ array of CATUnicodeStrings used to initialize the list.
o CATListValCATUnicodeString
public CATListValCATUnicodeString( iArray,
iSize)
Constructs a list and initializes it with a C++ pointer to CATUnicodeString array.
Parameters:
iArray
A C++ array of pointers to CATUnicodeStrings used to initialize the list.
iSize
The size of the C++ array of CATUnicodeStrings used to initialize the list.
o CATListValCATUnicodeString
public CATListValCATUnicodeString( const iCopy)
Copy constructor.
Parameters:
iCopy
The list to copy.
o ~CATListValCATUnicodeString
public ~CATListValCATUnicodeString()
Destructor.

Methods


o Append
public Append( const iAdd)
Appends a CATUnicodeString to the list.
Parameters:
iAdd
The CATUnicodeString to append.
o Append
public Append( const iConcat)
Appends the content of a CATUnicodeString list.
Parameters:
iConcat
The CATUnicodeString list to append.
o Array
public Array( ioArray)
Fills a C++ array of CATUnicodeStrings with elements from the list.
Role: The array has to have the same size as the list.
Parameters:
ioArray
The C++ array to fill.
o Array
public Array( ioArray)
Fills a C++ array of pointers to CATUnicodeStrings with elements from the list.
Role: The array has to have the same size as the list.
Parameters:
ioArray
The C++ array to fill.
o Compare
public static Compare( const iLV1,
const iLV2,
CATUnicodeString)
Compares two lists of CATUnicodeStrings.
Parameters:
iLV1
the first list of CATUnicodeStrings.
iLV2
the second list of CATUnicodeStrings.
iPFCompare

Legal values: A pointer to a function which compares two CATUnicodeStrings and returns -1, 0 or 1 depending on the order of the strings.
Returns:

Legal values: 0 if the lists are equal, -1 if the first list is smaller than the second list (smaller means that the first list contains less elements than the second list or that iRC1[i] < iRC2[i] for the first i where iRC1[i] != iRC2[i] and < is a lexicographic comparison of two strings), or 1 otherwise.
o InsertAfter
public InsertAfter( iIndex,
const iAdd)
Inserts a CATUnicodeString after the specified index.
Parameters:
iIndex
The index of the element.
iAdd
The element to insert.
o InsertBefore
public InsertBefore( iIndex,
const iAdd)
Inserts a CATUnicodeString before the specified index.
Parameters:
iIndex
The index of the element.
iAdd
The element to insert.
o Intersection
public static Intersection( const iL1,
const iL2,
ioResult)
Computes the intersection of two lists.
Parameters:
iL1
The first list.
iL2
The second list.
ioResult
A list to which elements in the intersection are appended.
o Locate
public Locate( const iLocate,
iIndex= 1 )
Finds the first occurrence of a CATUnicodeString from a given index.
Parameters:
iLocate
The CATUnicodeString to locate.
iIndex
The index at which the search is to begin.
Returns:

Legal values: The index of the located CATUnicodeString, or 0 if the list does not contain the specified CATUnicodeString.
o NbOccur
public NbOccur( const iTest)
Counts the occurrences of a CATUnicodeString in the list.
Parameters:
iTest
The CATUnicodeString for which the occurrences are to be counted.
Returns:
The count of occurrences of the CATUnicodeString in the list.
o QuickSort
public QuickSort( CATUnicodeString)
Sorts the list using the quicksort algorithm.
Parameters:
iPFCompare
A pointer to a function which compares two CATUnicodeStrings and returns -1, 0 or 1 depending on the order of the strings.
o Remove
public Remove( const iSubstract)
Removes all the values specifed in iSubstract from the list.
Parameters:
iSubstract
A list of CATUnicodeStrings to remove.
Returns:
The count of CATUnicodeStrings removed from the list.
o RemoveAll
public RemoveAll( iMH= CATCollec::ReleaseAllocation )
Removes all the elements from the list.
Parameters:
iMH

Legal values: Specifies whether the list capacity should be shrunk to 0 (CATCollec::ReleaseAllocation) or not (CATCollec::KeepAllocation).
o RemoveDuplicates
public RemoveDuplicates()
Removes all the duplicate occurrences of a CATUnicodeString from the list.
Returns:
The count of duplicate CATUnicodeStrings removed from the list.
o RemoveDuplicates
public RemoveDuplicates( ioExtract)
Removes all the duplicate occurrences of a CATUnicodeString from the list and appends them to another list.
Parameters:
ioExtract
A list to which duplicate CATUnicodeStrings are appended.
o RemovePosition
public RemovePosition( iIndex)
Removes the CATUnicodeString located at a given index.
Parameters:
iIndex
The list index of the CATUnicodeString to remove.
o RemoveValue
public RemoveValue( const iRemove)
Removes the first occurrence of a CATUnicodeString from the list.
Parameters:
iRemove
The CATUnicodeString to remove.
Returns:

Legal values: The index of the removed CATUnicodeString, or 0 if the list does not contain the specified CATUnicodeString.
o Replace
public Replace( iIndex,
const iReplace)
Replaces an element at a specified index with another CATUnicodeString value.
Parameters:
iIndex
index of the element to replace.
iReplace
The new CATUnicodeString value.
o Size
public Size()
Returns the size of the list.
Returns:
the size of the list.
o Size
public Size( iSize,
const iFiller= NULL )
Forces the size of the list to an arbitrary size.
Role: If iSize is larger than the current size, the newly allocated slots contain iFiller.
Parameters:
iSize
The desired size.
iFiller
A CATUnicodeString used to fill newly allocated slots.
o Swap
public Swap( iIndex1,
iIndex2)
Swaps two list elements.
Parameters:
iIndex1
index of the first element to swap.
iIndex2
index of the second element to swap.
o operator !=
public operator !=( const iLV)
Inequality operator.
Parameters:
iLV
The list to test for inequality
Returns:

Legal values: 1 if the two lists are not equal, 0 otherwise.
o operator >
public operator >( const iLV)
Greater than operator.
Parameters:
iLV
The list to compare the receiver to.
Returns:

Legal values: 1 the receiver is greater than iLV, 0 otherwise
o operator >=
public operator >=( const iLV)
Greater than or equal to operator.
Parameters:
iLV
The list to compare the receiver to.
Returns:

Legal values: 1 the receiver is greater than or equal to iLV, 0 otherwise
o operator <
public operator <( const iLV)
Less than operator.
Parameters:
iLV
The list to compare the receiver to.
Returns:

Legal values: 1 the receiver is less than iLV, 0 otherwise
o operator <=
public operator <=( const iLV)
Less than or equal to operator.
Parameters:
iLV
The list to compare the receiver to.
Returns:

Legal values: 1 the receiver is less than or equal to iLV, 0 otherwise
o operator ==
public operator ==( const iLV)
Equality operator.
Role: Two lists are equal if they contain the same elements in the same lexicographic order.
Parameters:
iLV
The list to test for equality
Returns:

Legal values: 1 if the two lists are equal, 0 otherwise.
o operator=
public operator=( const iCopy)
Assignment operator.
Role: Overwrites the content of the list with another list.
Parameters:
iCopy
The assigned list.
o operator[]
public operator[]( iIndex)
Subscripting operator.
Parameters:
iIndex
The index of the element.
Returns:
The CATUnicodeString at index iIndex.
o operator[]
public operator[]( iIndex)
Subscripting operator.
Parameters:
iIndex
The index of the element.
Returns:
The CATUnicodeString at index iIndex.

This object is included in the file: CATListOfCATUnicodeString.h
If needed, your Imakefile.mk should include the module: JS0GROUP

Copyright © 1999-2015, Dassault Systèmes. All rights reserved.