1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-05-16 10:54:53 +03:00
occt/src/BooleanOperations/BooleanOperations_AncestorsAndSuccessors.lxx
bugmaster b311480ed5 0023024: Update headers of OCCT files
Added appropriate copyright and license information in source files
2012-03-21 19:43:04 +04:00

139 lines
5.6 KiB
Plaintext
Executable File

// Created on: 2000-07-25
// Created by: Vincent DELOS
// Copyright (c) 2000-2012 OPEN CASCADE SAS
//
// The content of this file is subject to the Open CASCADE Technology Public
// License Version 6.5 (the "License"). You may not use the content of this file
// except in compliance with the License. Please obtain a copy of the License
// at http://www.opencascade.org and read it completely before using this file.
//
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
//
// The Original Code and all software distributed under the License is
// distributed on an "AS IS" basis, without warranty of any kind, and the
// Initial Developer hereby disclaims all such warranties, including without
// limitation, any warranties of merchantability, fitness for a particular
// purpose or non-infringement. Please see the License for the specific terms
// and conditions governing the rights and limitations under the License.
//===========================================================================
//function : GetAncestor
//purpose :
//===========================================================================
inline Standard_Integer BooleanOperations_AncestorsAndSuccessors::GetAncestor
(const Standard_Integer AncestorIndex) const
{
Standard_Integer nIndex=((Standard_Integer*)myAncestors)[AncestorIndex-1];
return nIndex;
}
//===========================================================================
//function : GetAncestors
//purpose : returns the array of ancestors.
//===========================================================================
inline void BooleanOperations_AncestorsAndSuccessors::GetAncestors
(Standard_Address& theArrayOfAncestors,
Standard_Integer& AncestorsNumber) const
{
theArrayOfAncestors = (Standard_Integer*)myAncestors;
AncestorsNumber = myAncestorsSize;
}
//===========================================================================
//function : SetAncestor
//purpose :
//===========================================================================
inline void BooleanOperations_AncestorsAndSuccessors::SetAncestor
(const Standard_Integer AncestorIndex,
const Standard_Integer AncestorNumber)
{
((Standard_Integer*)myAncestors)[AncestorIndex-1] = AncestorNumber;
}
//===========================================================================
//function : GetSuccessor
//purpose :
//===========================================================================
inline Standard_Integer BooleanOperations_AncestorsAndSuccessors::GetSuccessor
(const Standard_Integer SuccessorIndex) const
{
Standard_Integer nIndex=((Standard_Integer*)mySuccessors)[SuccessorIndex-1];
return nIndex;
}
//===========================================================================
//function : GetSuccessors
//purpose :
//===========================================================================
inline void BooleanOperations_AncestorsAndSuccessors::GetSuccessors
(Standard_Address& theArrayOfSuccessors,
Standard_Integer& SuccessorsNumber) const
{
SuccessorsNumber = mySuccessorsSize;
theArrayOfSuccessors = (Standard_Integer*)mySuccessors;
}
//===========================================================================
//function : SetSuccessor
//purpose :
//===========================================================================
inline void BooleanOperations_AncestorsAndSuccessors::SetSuccessor
(const Standard_Integer SuccessorIndex,
const Standard_Integer SuccessorNumber)
{
((Standard_Integer*)mySuccessors)[SuccessorIndex-1] = SuccessorNumber;
}
//===========================================================================
//function : NumberOfAncestors
//purpose : returns the number of ancestors
//===========================================================================
inline Standard_Integer BooleanOperations_AncestorsAndSuccessors::NumberOfAncestors() const
{
return myAncestorsSize;
}
//===========================================================================
//function : NumberOfSuccessors
//purpose : returns the number of successors
//===========================================================================
inline Standard_Integer BooleanOperations_AncestorsAndSuccessors::NumberOfSuccessors() const
{
return mySuccessorsSize;
}
//===========================================================================
//function : GetOrientation
//purpose :
//===========================================================================
inline TopAbs_Orientation BooleanOperations_AncestorsAndSuccessors::GetOrientation(const Standard_Integer OrientationIndex) const
{
return ((TopAbs_Orientation*)myOrientations)[OrientationIndex-1];
}
//===========================================================================
//function : GetOrientations
//purpose : returns the array of orientations.
//===========================================================================
inline void BooleanOperations_AncestorsAndSuccessors::GetOrientations
(Standard_Address& theArrayOfOrientations,
Standard_Integer& OrientationsNumber) const
{
OrientationsNumber = mySuccessorsSize;
theArrayOfOrientations = (TopAbs_Orientation*)myOrientations;
}
//===========================================================================
//function : SetOrientation
//purpose :
//===========================================================================
inline void BooleanOperations_AncestorsAndSuccessors::SetOrientation
(const Standard_Integer OrientationIndex,
const TopAbs_Orientation OrientationNumber)
{
((TopAbs_Orientation*)myOrientations)[OrientationIndex-1] = OrientationNumber;
}