1 #include <Standard_OutOfRange.hxx>
3 #include Array1Item_hxx
5 //=======================================================================
8 //=======================================================================
10 inline Standard_Integer TCollection_Array1::Length () const
12 return myUpperBound - myLowerBound + 1 ;
16 //=======================================================================
19 //=======================================================================
21 inline Standard_Integer TCollection_Array1::Lower () const
27 //=======================================================================
30 //=======================================================================
32 inline Standard_Integer TCollection_Array1::Upper () const
38 //=======================================================================
39 //function : IsAllocated
41 //=======================================================================
43 inline Standard_Boolean TCollection_Array1::IsAllocated () const
48 //=======================================================================
51 //=======================================================================
53 inline const Array1Item& TCollection_Array1::Value
54 (const Standard_Integer Index) const
56 Standard_OutOfRange_Raise_if((Index < myLowerBound || Index > myUpperBound),NULL);
57 return ((Array1Item *)myStart)[Index];
60 //=======================================================================
63 //=======================================================================
65 inline void TCollection_Array1::SetValue (const Standard_Integer Index,
66 const Array1Item& Value)
68 Standard_OutOfRange_Raise_if((Index < myLowerBound || Index > myUpperBound),NULL);
70 ((Array1Item *)myStart)[Index] = Value ;
74 //=======================================================================
75 //function : ChangeValue
77 //=======================================================================
79 inline Array1Item& TCollection_Array1::ChangeValue(const Standard_Integer Index)
81 Standard_OutOfRange_Raise_if((Index < myLowerBound || Index > myUpperBound),NULL);
83 return ((Array1Item *)myStart)[Index];