// Copyright (c) 1998-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the Free Software Foundation, with special exception defined in the file // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT // distribution for complete text of the license and disclaimer of any warranty. // // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. #include #include #include Array2Item_hxx //======================================================================= //function : ColLength //purpose : //======================================================================= inline Standard_Integer TCollection_Array2::ColLength () const { return myUpperRow - myLowerRow + 1 ; } //======================================================================= //function : LowerCol //purpose : //======================================================================= inline Standard_Integer TCollection_Array2::LowerCol () const { return myLowerColumn ; } //======================================================================= //function : LowerRow //purpose : //======================================================================= inline Standard_Integer TCollection_Array2::LowerRow () const { return myLowerRow; } //======================================================================= //function : RowLength //purpose : //======================================================================= inline Standard_Integer TCollection_Array2::RowLength () const { return myUpperColumn - myLowerColumn + 1 ; } //======================================================================= //function : UpperRow //purpose : //======================================================================= inline Standard_Integer TCollection_Array2::UpperRow () const { return myUpperRow ; } //======================================================================= //function : UpperCol //purpose : //======================================================================= inline Standard_Integer TCollection_Array2::UpperCol () const { return myUpperColumn ; } //======================================================================= //function : SetValue //purpose : //======================================================================= inline void TCollection_Array2::SetValue ( const Standard_Integer Row, const Standard_Integer Col, const Array2Item& Value ) { Standard_OutOfRange_Raise_if((Row < myLowerRow || Row > myUpperRow || Col < myLowerColumn || Col > myUpperColumn), NULL); ((Array2Item **)myData)[Row][Col] = Value ; } //======================================================================= //function : Value //purpose : //======================================================================= inline const Array2Item& TCollection_Array2::Value(const Standard_Integer Row, const Standard_Integer Col) const { Standard_OutOfRange_Raise_if((Row < myLowerRow || Row > myUpperRow || Col < myLowerColumn || Col > myUpperColumn), NULL); return ((Array2Item **)myData)[Row][Col]; } //======================================================================= //function : ChangeValue //purpose : //======================================================================= inline Array2Item& TCollection_Array2::ChangeValue(const Standard_Integer Row, const Standard_Integer Col) { Standard_OutOfRange_Raise_if((Row < myLowerRow || Row > myUpperRow || Col < myLowerColumn || Col > myUpperColumn), NULL); return ((Array2Item **)myData)[Row][Col]; }