mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-19 18:07:32 +08:00
88 lines
2.3 KiB
Plaintext
Executable File
88 lines
2.3 KiB
Plaintext
Executable File
#include <Standard_OutOfRange.hxx>
|
|
|
|
#include Array1Item_hxx
|
|
|
|
//=======================================================================
|
|
//function : Length
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
inline Standard_Integer TCollection_Array1::Length () const
|
|
{
|
|
return myUpperBound - myLowerBound + 1 ;
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : Lower
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
inline Standard_Integer TCollection_Array1::Lower () const
|
|
{
|
|
return myLowerBound ;
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : Upper
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
inline Standard_Integer TCollection_Array1::Upper () const
|
|
{
|
|
return myUpperBound ;
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : IsAllocated
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
inline Standard_Boolean TCollection_Array1::IsAllocated () const
|
|
{
|
|
return isAllocated;
|
|
}
|
|
|
|
//=======================================================================
|
|
//function : Value
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
inline const Array1Item& TCollection_Array1::Value
|
|
(const Standard_Integer Index) const
|
|
{
|
|
Standard_OutOfRange_Raise_if((Index < myLowerBound || Index > myUpperBound),NULL);
|
|
return ((Array1Item *)myStart)[Index];
|
|
}
|
|
|
|
//=======================================================================
|
|
//function : SetValue
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
inline void TCollection_Array1::SetValue (const Standard_Integer Index,
|
|
const Array1Item& Value)
|
|
{
|
|
Standard_OutOfRange_Raise_if((Index < myLowerBound || Index > myUpperBound),NULL);
|
|
|
|
((Array1Item *)myStart)[Index] = Value ;
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : ChangeValue
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
inline Array1Item& TCollection_Array1::ChangeValue(const Standard_Integer Index)
|
|
{
|
|
Standard_OutOfRange_Raise_if((Index < myLowerBound || Index > myUpperBound),NULL);
|
|
|
|
return ((Array1Item *)myStart)[Index];
|
|
}
|
|
|
|
|
|
|