Open CASCADE Technology  7.1.0.beta
Public Member Functions
IntTools_CArray1OfInteger Class Reference

#include <IntTools_CArray1OfInteger.hxx>

Public Member Functions

 IntTools_CArray1OfInteger (const Standard_Integer Length=0)
 Creates an array of given Length. More...
 
 IntTools_CArray1OfInteger (const Standard_Integer &Item, const Standard_Integer Length)
 Creates an array sharing datas with an other. Example: Item tab[100]; CArray1OfItem thetab (tab[0],100);. More...
 
void Init (const Standard_Integer &V)
 Initializes the array with a given value. More...
 
void Resize (const Standard_Integer theNewLength)
 destroy current content and realloc the new size does nothing if Length() == theLength More...
 
void Destroy ()
 Frees the allocated area corresponding to the array. More...
 
 ~IntTools_CArray1OfInteger ()
 
Standard_Integer Length () const
 Returns the number of elements of <me>. More...
 
void Append (const Standard_Integer &Value)
 
void SetValue (const Standard_Integer Index, const Standard_Integer &Value)
 Sets the <Index>th element of the array to . More...
 
const Standard_IntegerValue (const Standard_Integer Index) const
 Returns the value of the <Index>th element of the array. More...
 
const Standard_Integeroperator() (const Standard_Integer Index) const
 
Standard_IntegerChangeValue (const Standard_Integer Index)
 Returns the value of the <Index>th element of the array. More...
 
Standard_Integeroperator() (const Standard_Integer Index)
 
Standard_Boolean IsEqual (const IntTools_CArray1OfInteger &Other) const
 Applys the == operator on each array item. More...
 
Standard_Boolean operator== (const IntTools_CArray1OfInteger &Other) const
 

Constructor & Destructor Documentation

IntTools_CArray1OfInteger::IntTools_CArray1OfInteger ( const Standard_Integer  Length = 0)

Creates an array of given Length.

IntTools_CArray1OfInteger::IntTools_CArray1OfInteger ( const Standard_Integer Item,
const Standard_Integer  Length 
)

Creates an array sharing datas with an other. Example: Item tab[100]; CArray1OfItem thetab (tab[0],100);.

CArray1OfItem aArray1(100); CArray1OfItem anSharedArray1(aArray1.ChangeValue(0),aArray1.Length());

Warning: The validity of length are under the responsability of the user. The sahred array must have a valid address during the life of the Array1.

IntTools_CArray1OfInteger::~IntTools_CArray1OfInteger ( )
inline

Member Function Documentation

void IntTools_CArray1OfInteger::Append ( const Standard_Integer Value)
Standard_Integer& IntTools_CArray1OfInteger::ChangeValue ( const Standard_Integer  Index)

Returns the value of the <Index>th element of the array.

void IntTools_CArray1OfInteger::Destroy ( )

Frees the allocated area corresponding to the array.

void IntTools_CArray1OfInteger::Init ( const Standard_Integer V)

Initializes the array with a given value.

Standard_Boolean IntTools_CArray1OfInteger::IsEqual ( const IntTools_CArray1OfInteger Other) const

Applys the == operator on each array item.

Standard_Integer IntTools_CArray1OfInteger::Length ( ) const

Returns the number of elements of <me>.

const Standard_Integer& IntTools_CArray1OfInteger::operator() ( const Standard_Integer  Index) const
inline
Standard_Integer& IntTools_CArray1OfInteger::operator() ( const Standard_Integer  Index)
inline
Standard_Boolean IntTools_CArray1OfInteger::operator== ( const IntTools_CArray1OfInteger Other) const
inline
void IntTools_CArray1OfInteger::Resize ( const Standard_Integer  theNewLength)

destroy current content and realloc the new size does nothing if Length() == theLength

void IntTools_CArray1OfInteger::SetValue ( const Standard_Integer  Index,
const Standard_Integer Value 
)

Sets the <Index>th element of the array to .

const Standard_Integer& IntTools_CArray1OfInteger::Value ( const Standard_Integer  Index) const

Returns the value of the <Index>th element of the array.


The documentation for this class was generated from the following file: