Files
OCCT/src/TCollection/TCollection_Array1.lxx
2012-03-05 19:23:40 +04:00

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];
}