System CATSetValCATString
Usage: you must use this class as is. You should never derive it.
public class CATSetValCATString
Class to implement a mutable ordered set of CATString.
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 set once it capacity has
been exceeded. Set elements are sorted by lexicographic order.
Use the type
Constructor and Destructor Index
- o
CATSetValCATString()
- Constructs an empty set of CATString.
- o
CATSetValCATString(int)
- Constructs an empty set of CATString with a
specific initial capacity.
- o
CATSetValCATString(CATString*,int)
- Constructs a set and initializes it with a C++ CATString array.
- o
CATSetValCATString(CATString**,int)
- Constructs a set and initializes it with a C++ CATString pointer array.
- o
CATSetValCATString(CATSetValCATString&)
- Copy constructor.
- o
~CATSetValCATString()
- Destructor.
Method Index
- o
Add(CATString&)
- Adds a CATString to the set if the set does not already contain it.
- o
Add(CATSetValCATString&)
- Union with a set.
- o
Array(CATString*)
- Fills a C++ array of CATString with elements from the set.
- o
Array(CATString**)
- Fills a C++ array of pointers to CATString with elements from the set.
- o
Compare(CATSetValCATString&,CATSetValCATString&,int(*iPFCompare)(CATString*,*))
- Compares two sets of CATString.
- o
Contains(CATSetValCATString&)
- Test if the set contains the specified CATString.
- o
Intersection(CATSetValCATString&,CATSetValCATString&,CATSetValCATString&)
- Intersection of two sets.
- o
Locate(CATString&)
- Finds the index of a CATString in the set.
- o
Remove(CATSetValCATString&)
- Difference of two sets.
- o
RemoveAll(CATCollec::MemoryHandling)
- Removes all the elements from the set.
- o
RemovePosition(int)
- Removes the CATString located at a given index.
- o
RemoveValue(CATString&)
- Removes a CATString from the set.
- o
Replace(int,CATString&)
- Replaces an element at a specified index with another CATString value.
- o
Size()
- Returns the size of the set.
- o
operator !=(CATSetValCATString&)
- Inequality operator.
- o
operator >(CATSetValCATString&)
- Greater than operator.
- o
operator >=(CATSetValCATString&)
- Greater than or equal to operator.
- o
operator <(CATSetValCATString&)
- Less than operator.
- o
operator <=(CATSetValCATString&)
- Less than or equal to operator.
- o
operator ==(CATSetValCATString&)
- Equality operator.
- o
operator=(CATSetValCATString&)
- Assignment operator.
- o
operator[](int)
- Subscripting operator.
Constructor and Destructor
o CATSetValCATString
public CATSetValCATString( | ) |
-
Constructs an empty set of CATString.
o CATSetValCATString
public CATSetValCATString( | | iInitAlloc) |
-
Constructs an empty set of CATString with a
specific initial capacity.
- Parameters:
-
- iInitAlloc
- The default capacity of the set.
o CATSetValCATString
public CATSetValCATString( | | iArray, |
| | iSize) |
-
Constructs a set and initializes it with a C++ CATString array.
- Parameters:
-
- iArray
- A C++ array of
used to initialize the set.
- iSize
- The size of the C++ array of CATString used to initialize the set.
o CATSetValCATString
public CATSetValCATString( | | iArray, |
| | iSize) |
-
Constructs a set and initializes it with a C++ CATString pointer array.
- Parameters:
-
- iArray
- A C++ array of CATString pointers used to initialize the set.
- iSize
- The size of the C++ array of CATString pointers used to initialize the set.
o CATSetValCATString
public CATSetValCATString( | const | iCopy) |
-
Copy constructor.
- Parameters:
-
- iCopy
- The set to copy.
o ~CATSetValCATString
public ~CATSetValCATString( | ) |
-
Destructor.
Methods
o Add
-
Adds a CATString to the set if the set does not already contain it.
- Parameters:
-
- iAdd
- The CATString to append.
o Add
public Add( | const | iConcat) |
-
Union with a set.
Role: Adds all the elements from a CATString set
which are not already contained by the set.
- Parameters:
-
- iConcat
- The CATString set to add.
o Array
-
Fills a C++ array of CATString 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
-
Fills a C++ array of pointers to CATString 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, |
| | CATString) |
-
Compares two sets of CATString.
- Parameters:
-
- iLV1
- the first set of CATString.
- iLV2
- the second set of CATString.
- iPFCompare
- A pointer to a function which compares two CATString 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 CATString.
- Parameters:
-
- iTest
- The CATString to look up.
- Returns:
-
Legal values: 1 if the set contains the
specified CATString, 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 CATString in the set.
- Parameters:
-
- iLocate
- The CATString to locate.
- Returns:
-
Legal values: The index of the located CATString, or
0 if the set does not contain
the specified CATString.
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 CATString to remove.
- Returns:
- The count of CATString 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 CATString located at a given index.
- Parameters:
-
- iIndex
- The set index of the CATString
o RemoveValue
public RemoveValue( | const | iRemove) |
-
Removes a CATString from the set.
- Parameters:
-
- iRemove
- The CATString to remove.
- Returns:
-
Legal values: The index of the removed CATString,
or 0 if the set does not contain
the specified CATString.
o Replace
public Replace( | | iIndex, |
| const | iReplace) |
-
Replaces an element at a specified index with another CATString value.
- Parameters:
-
- iIndex
- index of the element to replace.
- iReplace
- The new CATString value.
o 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 CATString at index iIndex.
This object is included in the file: CATSetOfCATString.h
If needed, your Imakefile.mk should include the module: JS0GROUP
Copyright © 1999-2015, Dassault Systèmes. All rights reserved.