All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

Mathematics Class CATMathSetOfLongs

CATMathSetOfLongs
 

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


public class CATMathSetOfLongs

Class to define a set of longs.


Constructor and Destructor Index


o CATMathSetOfLongs(CATLONG32)
Constructs a set of longs of a given length.
o CATMathSetOfLongs(CATLONG32,CATLONG32*)
Constructs a set of longs of a given length and initializes with given values.
o CATMathSetOfLongs(CATMathSetOfLongs&)
Copy constructor.
o ~CATMathSetOfLongs()

Method Index


o AddElement(CATLONG32)
Adds one Element at the end of this CATMathSetOfLongs.
o AddSet(CATMathSetOfLongs&)
Concatenates two sets of longs .
o AddSet(CATMathSetOfLongs&,CATBoolean)
Concatenates two sets of longs.
o AutoInvert()
Inverts this CATMathSetOfLongs.
o Beginning()
Resets the iterator in order to read again this CATMathSetOfLongs.
o Find(CATLONG32,CATLONG32*)
Searches for the first occurence of an element in the collection.
o GetElement()
Reads the current element in this CATMathSetOfLongs.
o GetElement(CATLONG32)
Reads a specific element in this CATMathSetOfLongs.
o GetElements()
Returns the array of longs.
o GetMaxNumberOfElements()
Returns the maximum number oflongs of this CATMathSetOfLongs.
o GetNumberOfElements()
Returns the number of valuated longs of this CATMathSetOfLongs.
o InsertElement(CATLONG32,CATLONG32)
Inserts an element in a specific position.
o Next()
Skips to the next element.
o Reset()
Resets this CATMathSetofLongs.
o SetElement(CATLONG32)
Replaces the current element.
o SetElement(CATLONG32,CATLONG32)
Replaces the element at a current index.
o Sort()
Sort a CATMathSetOfLongs by increasing.
o SwapElements(CATLONG32,CATLONG32)
Swap the two elements at the index ipos1 and ipos2.
o operator =(CATMathSetOfLongs&)
Assignment operator.

Constructor and Destructor


o CATMathSetOfLongs
public CATMathSetOfLongs( const CATLONG32 NbElements)
Constructs a set of longs of a given length.
Parameters:
iNbElements
The number of longs of the set.
o CATMathSetOfLongs
public CATMathSetOfLongs( const CATLONG32 iNbElements,
const CATLONG32* iSet)
Constructs a set of longs of a given length and initializes with given values.
Parameters:
iNbElements
The number of longs of the set.
iSet
The array of values.
o CATMathSetOfLongs
public CATMathSetOfLongs( const CATMathSetOfLongs& copy)
Copy constructor.
o ~CATMathSetOfLongs
public ~CATMathSetOfLongs()

Methods


o AddElement
public void AddElement( const CATLONG32 iElement)
Adds one Element at the end of this CATMathSetOfLongs.
Parameters:
iElement
The added element. this is reallocated if needed.
o AddSet
public void AddSet( const CATMathSetOfLongs& iSet)
Concatenates two sets of longs .
Parameters:
iSet
The set to concatenate at the end of this. this is reallocated if needed.
o AddSet
public void AddSet( const CATMathSetOfLongs& set,
CATBoolean iOption)
Concatenates two sets of longs.
Parameters:
iSet
The set to concatenate at the end of this. this is reallocated if needed.
iOption
if Option = 1, lastpoint and firstpoint are merged.
o AutoInvert
public void AutoInvert()
Inverts this CATMathSetOfLongs.
o Beginning
public void Beginning()
Resets the iterator in order to read again this CATMathSetOfLongs.
o Find
public int Find( const CATLONG32 iElement,
CATLONG32* indice= 0) const
Searches for the first occurence of an element in the collection.
Parameters:
iElement
The element.
Returns:
The result of the search, and the position of the element if asked.
Legal values: 1 if the element is found, 0 if nor found.
o GetElement
public CATLONG32 GetElement()const
Reads the current element in this CATMathSetOfLongs.
o GetElement
public CATLONG32 GetElement( const CATLONG32 iIndex) const
Reads a specific element in this CATMathSetOfLongs.
Parameters:
iIndex
The index (0<= position < NumberOfElements) of the point to read.
o GetElements
public CATLONG32 * GetElements()const
Returns the array of longs.
Returns:
The array of longs that you must deallocate after use.
o GetMaxNumberOfElements
public CATLONG32 GetMaxNumberOfElements()const
Returns the maximum number oflongs of this CATMathSetOfLongs.
Returns:
The maximum number of longs.
o GetNumberOfElements
public CATLONG32 GetNumberOfElements()const
Returns the number of valuated longs of this CATMathSetOfLongs.
Returns:
The number of valuated longs.
o InsertElement
public void InsertElement( const CATLONG32 iElement,
const CATLONG32 iIndex)
Inserts an element in a specific position.
this is reallocated if needed.
Parameters:
iElement
The new value of the current element.
iIndex
The index (0<= position < NumberOfElements) of the element.
o Next
public CATLONG32 Next()
Skips to the next element.
Returns:
Legal values: 0 if the iterator reaches the end of the set, 1 otherwise.
o Reset
public void Reset()
Resets this CATMathSetofLongs.
The memory is not deleted and the class can be used again.
o SetElement
public void SetElement( const CATLONG32 iElement)
Replaces the current element.
Parameters:
iElement
The new value of the current element.
o SetElement
public void SetElement( const CATLONG32 iElement,
const CATLONG32 iIndex)
Replaces the element at a current index.
Parameters:
iElement
The new value of the current element.
iIndex
The index (0<= position < NumberOfElements) of the element.
o Sort
public void Sort()
Sort a CATMathSetOfLongs by increasing.
o SwapElements
public void SwapElements( const CATLONG32 ipos1,
const CATLONG32 ipos2)
Swap the two elements at the index ipos1 and ipos2.
o operator =
public CATMathSetOfLongs & operator =( const CATMathSetOfLongs& iElements)
Assignment operator.
Parameters:
iElements
The set of longs to assign.

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

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