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

124 lines
4.8 KiB
Plaintext
Executable File

// File: BooleanOperations_AncestorsAndSuccessors.lxx
// Created: Tue Jul 25 11:46:44 2000
// Author: Vincent DELOS
// <vds@bulox.paris1.matra-dtv.fr>
//===========================================================================
//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;
}