All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

System Class CATListValCATUnicodeString

System.CATCollecRoot
  |
  +---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 CATListOfCATUnicodeString


Constructor and Destructor Index


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

Method Index


o Append(CATListValCATUnicodeString&)
Appends the content of a CATUnicodeString list.
o Append(CATUnicodeString&)
Appends a CATUnicodeString to the 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( const CATListValCATUnicodeString& iCopy)
Copy constructor.
Parameters:
iCopy
The list to copy.
o CATListValCATUnicodeString
public CATListValCATUnicodeString(CATUnicodeString** iArray,
int 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(CATUnicodeString* iArray,
int 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(int iInitAlloc)
Constructs an empty list of CATUnicodeStrings with a specified initial capacity.
Parameters:
iInitAlloc
The default capacity of the list.
o ~CATListValCATUnicodeString
public ~CATListValCATUnicodeString()
Destructor.

Methods


o Append
public void Append( const CATListValCATUnicodeString& iConcat)
Appends the content of a CATUnicodeString list.
Parameters:
iConcat
The CATUnicodeString list to append.
o Append
public void Append( const CATUnicodeString& iAdd)
Appends a CATUnicodeString to the list.
Parameters:
iAdd
The CATUnicodeString to append.
o Array
public void Array(CATUnicodeString* ioArray)const
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 void Array(CATUnicodeString** ioArray)const
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 int Compare( const CATListValCATUnicodeString& iLV1,
const CATListValCATUnicodeString& iLV2,
int(*iPFCompare)(CATUnicodeString*,*) 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 void InsertAfter(int iIndex,
const CATUnicodeString& iAdd)
Inserts a CATUnicodeString after the specified index.
Parameters:
iIndex
The index of the element.
iAdd
The element to insert.
o InsertBefore
public void InsertBefore(int iIndex,
const CATUnicodeString& iAdd)
Inserts a CATUnicodeString before the specified index.
Parameters:
iIndex
The index of the element.
iAdd
The element to insert.
o Intersection
public static void Intersection( const CATListValCATUnicodeString& iL1,
const CATListValCATUnicodeString& iL2,
CATListValCATUnicodeString& 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 int Locate( const CATUnicodeString& iLocate,
int iIndex= 1 )const
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 int NbOccur( const CATUnicodeString& 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 void QuickSort(int(*iPFCompare)(CATUnicodeString*,*) 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 int Remove( const CATListValCATUnicodeString& 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 void RemoveAll(CATCollec::MemoryHandling 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 int 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 void RemoveDuplicates(CATListValCATUnicodeString& 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 void RemovePosition(int iIndex)
Removes the CATUnicodeString located at a given index.
Parameters:
iIndex
The list index of the CATUnicodeString to remove.
o RemoveValue
public int RemoveValue( const CATUnicodeString& 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 void Replace(int iIndex,
const CATUnicodeString& 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 int Size()const
Returns the size of the list.
Returns:
the size of the list.
o Size
public void Size(int iSize,
const CATUnicodeString* 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 void Swap(int iIndex1,
int 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 int operator !=( const CATListValCATUnicodeString& iLV)const
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 int operator >( const CATListValCATUnicodeString& iLV)const
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 int operator >=( const CATListValCATUnicodeString& iLV)const
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 int operator <( const CATListValCATUnicodeString& iLV)const
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 int operator <=( const CATListValCATUnicodeString& iLV)const
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 int operator ==( const CATListValCATUnicodeString& iLV)const
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 CATListValCATUnicodeString& operator=( const CATListValCATUnicodeString& iCopy)
Assignment operator.
Role: Overwrites the content of the list with another list.
Parameters:
iCopy
The assigned list.
o operator[]
public CATUnicodeString& operator[](int iIndex)
Subscripting operator.
Parameters:
iIndex
The index of the element.
Returns:
The CATUnicodeString at index iIndex.
o operator[]
public const CATUnicodeString& operator[](int iIndex)const
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 © 2003, Dassault Systèmes. All rights reserved.