mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-16 10:08:36 +03:00
License statement text corrected; compiler warnings caused by Bison 2.41 disabled for MSVC; a few other compiler warnings on 54-bit Windows eliminated by appropriate type cast Wrong license statements corrected in several files. Copyright and license statements added in XSD and GLSL files. Copyright year updated in some files. Obsolete documentation files removed from DrawResources.
121 lines
4.1 KiB
Plaintext
121 lines
4.1 KiB
Plaintext
// 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 <Standard.hxx>
|
|
#include <Standard_OutOfRange.hxx>
|
|
|
|
#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];
|
|
}
|
|
|
|
|
|
|