All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

System Class CATSetValCATUnicodeString

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


Constructor and Destructor Index


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

Method Index


o Add(CATSetValCATUnicodeString&)
Union with a set.
o Add(CATUnicodeString&)
Adds a CATUnicodeString to the set if the set does not already contain it.
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( const CATSetValCATUnicodeString& iCopy)
Copy constructor.
Parameters:
iCopy
The set to copy.
o CATSetValCATUnicodeString
public CATSetValCATUnicodeString(CATUnicodeString** iArray,
int 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(CATUnicodeString* iArray,
int 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(int iInitAlloc)
Constructs an empty set of CATUnicodeStrings with a specific initial capacity.
Parameters:
iInitAlloc
The default capacity of the set.
o ~CATSetValCATUnicodeString
public ~CATSetValCATUnicodeString()
Destructor.

Methods


o Add
public int Add( const CATSetValCATUnicodeString& 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 Add
public int Add( const CATUnicodeString& iAdd)
Adds a CATUnicodeString to the set if the set does not already contain it.
Parameters:
iAdd
The CATUnicodeString to append.
o Array
public void Array(CATUnicodeString* ioArray)const
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 void Array(CATUnicodeString** ioArray)const
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 int Compare( const CATSetValCATUnicodeString& iLV1,
const CATSetValCATUnicodeString& iLV2,
int(*iPFCompare)(CATUnicodeString*,*) 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 int Contains( const CATSetValCATUnicodeString& 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 void Intersection( const CATSetValCATUnicodeString& iL1,
const CATSetValCATUnicodeString& iL2,
CATSetValCATUnicodeString& 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 int Locate( const CATUnicodeString& iLocate)const
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 int Remove( const CATSetValCATUnicodeString& 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 void RemoveAll(CATCollec::MemoryHandling 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 void RemovePosition(int iIndex)
Removes the CATUnicodeString located at a given index.
Parameters:
iIndex
The set index of the CATUnicodeString
o RemoveValue
public int RemoveValue( const CATUnicodeString& 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 int 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 set.
Returns:
the size of the set.
o operator !=
public int operator !=( const CATSetValCATUnicodeString& iLV)const
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 int operator >( const CATSetValCATUnicodeString& iLV)const
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 int operator >=( const CATSetValCATUnicodeString& iLV)const
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 int operator <( const CATSetValCATUnicodeString& iLV)const
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 int operator <=( const CATSetValCATUnicodeString& iLV)const
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 int operator ==( const CATSetValCATUnicodeString& iLV)const
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 CATSetValCATUnicodeString& operator=( const CATSetValCATUnicodeString& iCopy)
Assignment operator.
Role: Overwrites the content of the set with another set.
Parameters:
iCopy
The assigned set.
o operator[]
public 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: CATSetOfCATUnicodeString.h
If needed, your Imakefile.mk should include the module: JS0GROUP

Copyright © 2003, Dassault Systèmes. All rights reserved.