System CATSetValCATUnicodeString

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


public class CATSetValCATUnicodeString

Class to implement a mutable ordered set of CATUnicodeStrings.
Role: The purpose of this class is to let C++ classes easily pass and receive sets of . The class handles all the low-level memory allocation tasks such as reallocating the list once it capacity has been exceeded. Set elements are sorted by lexicographic order.
Use the


Constructor and Destructor Index


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

Method Index


o Add(CATUnicodeString&)
Adds a CATUnicodeString to the set if the set does not already contain it.
o Add(CATSetValCATUnicodeString&)
Union with a set.
o Array(CATUnicodeString*)
Fills a C++ array of CATUnicodeStrings with elements from the set.
o Array(CATUnicodeString**)
Fills a C++ array of pointers to CATUnicodeStrings with elements from the set.
o Compare(CATSetValCATUnicodeString&,CATSetValCATUnicodeString&,int(*iPFCompare)(CATUnicodeString*,*))
Compares two sets of CATUnicodeStrings.
o Contains(CATSetValCATUnicodeString&)
Test if the set contains the specified CATUnicodeString.
o Intersection(CATSetValCATUnicodeString&,CATSetValCATUnicodeString&,CATSetValCATUnicodeString&)
Intersection of two sets.
o Locate(CATUnicodeString&)
Finds the index of a CATUnicodeString in the set.
o Remove(CATSetValCATUnicodeString&)
Difference of two sets.
o RemoveAll(CATCollec::MemoryHandling)
Removes all the elements from the set.
o RemovePosition(int)
Removes the CATUnicodeString located at a given index.
o RemoveValue(CATUnicodeString&)
Removes a CATUnicodeString from the set.
o Replace(int,CATUnicodeString&)
Replaces an element at a specified index with another CATUnicodeString value.
o Size()
Returns the size of the set.
o operator !=(CATSetValCATUnicodeString&)
Inequality operator.
o operator >(CATSetValCATUnicodeString&)
Greater than operator.
o operator >=(CATSetValCATUnicodeString&)
Greater than or equal to operator.
o operator <(CATSetValCATUnicodeString&)
Less than operator.
o operator <=(CATSetValCATUnicodeString&)
Less than or equal to operator.
o operator ==(CATSetValCATUnicodeString&)
Equality operator.
o operator=(CATSetValCATUnicodeString&)
Assignment operator.
o operator[](int)
Subscripting operator.

Constructor and Destructor


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

Methods


o Add
public Add( const iAdd)
Adds a CATUnicodeString to the set if the set does not already contain it.
Parameters:
iAdd
The CATUnicodeString to append.
o Add
public Add( const iConcat)
Union with a set.
Role: Adds all the elements from a CATUnicodeString set which are not already contained by the set.
Parameters:
iConcat
The CATUnicodeString set to add.
o Array
public Array( ioArray)
Fills a C++ array of CATUnicodeStrings with elements from the set.
Role: The array has to have the same size as the set.
Parameters:
ioArray
The C++ array to fill.
o Array
public Array( ioArray)
Fills a C++ array of pointers to CATUnicodeStrings with elements from the set.
Role: The array has to have the same size as the set.
Parameters:
ioArray
The C++ array to fill.
o Compare
public static Compare( const iLV1,
const iLV2,
CATUnicodeString)
Compares two sets of CATUnicodeStrings.
Parameters:
iLV1
the first set of CATUnicodeStrings.
iLV2
the second set of CATUnicodeStrings.
iPFCompare
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 sets are equal, -1 if the first set is smaller than the second set (smaller means that the first set contains less elements than the second set 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 Contains
public Contains( const iTest)
Test if the set contains the specified CATUnicodeString.
Parameters:
iTest
The CATUnicodeString to look up.
Returns:

Legal values: 1 if the set contains the specified CATUnicodeString, 0 otherwise.
o Intersection
public static Intersection( const iL1,
const iL2,
ioResult)
Intersection of two sets.
Parameters:
iL1
The first set.
iL2
The second set.
ioResult
A set to which elements in the intersection are added.
o Locate
public Locate( const iLocate)
Finds the index of a CATUnicodeString in the set.
Parameters:
iLocate
The CATUnicodeString to locate.
Returns:

Legal values: The index of the located CATUnicodeString, or 0 if the set does not contain the specified CATUnicodeString.
o Remove
public Remove( const iSubstract)
Difference of two sets.
Role: Removes all the values specifed in iSubstract from the set.
Parameters:
iSubstract
A set of CATUnicodeStrings to remove.
Returns:
The count of CATUnicodeStrings removed from the set.
o RemoveAll
public RemoveAll( iMH= CATCollec::ReleaseAllocation )
Removes all the elements from the set.
Parameters:
iMH

Legal values: Specifies whether the set capacity should be shrunk to 0 (CATCollec::ReleaseAllocation) or not (CATCollec::KeepAllocation).
o RemovePosition
public RemovePosition( iIndex)
Removes the CATUnicodeString located at a given index.
Parameters:
iIndex
The set index of the CATUnicodeString
o RemoveValue
public RemoveValue( const iRemove)
Removes a CATUnicodeString from the set.
Parameters:
iRemove
The CATUnicodeString to remove.
Returns:

Legal values: The index of the removed CATUnicodeString, or 0 if the set 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 set.
Returns:
the size of the set.
o operator !=
public operator !=( const iLV)
Inequality operator.
Parameters:
iLV
The set to test for inequality
Returns:

Legal values: 1 if the two sets are not equal, 0 otherwise.
o operator >
public operator >( const iLV)
Greater than operator.
Parameters:
iLV
The set 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 set 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 set 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 set 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 sets are equal if they contain the same elements in the same order.
Parameters:
iLV
The set to test for equality
Returns:

Legal values: 1 if the two sets are equal, 0 otherwise
o operator=
public operator=( const iCopy)
Assignment operator.
Role: Overwrites the content of the set with another set.
Parameters:
iCopy
The assigned set.
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: CATSetOfCATUnicodeString.h
If needed, your Imakefile.mk should include the module: JS0GROUP

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