Files
OCCT/src/HLRBRep/HLRBRep_EdgeData.lxx
T
kgv dde6883382 0027772: Foundation Classes - define Standard_Boolean using C++ type "bool" instead of "unsigned int"
Code has been updated to remove no-op casts and implicit casts to Standard_Boolean.

Places of inproper use of Standard_Boolean instead of Standard_Integer
have been corrected:
- Bnd_Box, Bnd_Box2d
  Bit flags are now defined as private enum
- HLRAlgo_BiPoint, HLRAlgo_EdgesBlock, HLRBRep_EdgeData, HLRBRep_FaceData
  Bit flags are now defined as enum
- HLRAlgo_EdgeStatus, HLRBRep_BiPnt2D, HLRBRep_BiPoint
  Bit flags are now defined as bool fields
- HLRAlgo_PolyData
  Bit flags are now defined as Standard_Integer
- OSD_DirectoryIterator, OSD_FileIterator
  Boolean flag is now defined as Standard_Boolean
- ShapeAnalysis_Surface::SurfaceNewton()
  now returns Standard_Integer (values 0, 1 or 3)
- ChFi2d_FilletAlgo
  now uses TColStd_SequenceOfBoolean instead of TColStd_SequenceOfInteger
  for storing boolean flags

Method IFSelect_Dispatch::PacketsCount() has been dropped from interface.

ShapeFix_Solid::Status() has been fixed to decode requested status
instead of returning integer value.

TopOpeBRepBuild_Builder1 now defines map storing Standard_Boolean values
instead of Standard_Integer.

Persistence for Standard_Boolean type has been corrected
to keep backward compatibility:
- BinMDataStd, BinTools, FSD_BinaryFile

Broken Draw Harness commands vdisplaymode and verasemode have been removed.

BRepMesh_FastDiscretFace::initDataStructure() - workaround old gcc limitations

BRepMesh_IncrementalMesh::clear() - avoid ambiguity
2016-08-26 10:16:17 +03:00

360 lines
12 KiB
Plaintext

// Created on: 1997-04-17
// Created by: Christophe MARION
// Copyright (c) 1997-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.
//=======================================================================
//function : Selected
//purpose :
//=======================================================================
inline Standard_Boolean HLRBRep_EdgeData::Selected () const
{ return (myFlags & EMaskSelected) != 0; }
//=======================================================================
//function : Selected
//purpose :
//=======================================================================
inline void HLRBRep_EdgeData::Selected (const Standard_Boolean B)
{
if (B) myFlags |= EMaskSelected;
else myFlags &= ~EMaskSelected;
}
//=======================================================================
//function : Rg1Line
//purpose :
//=======================================================================
inline Standard_Boolean HLRBRep_EdgeData::Rg1Line () const
{ return (myFlags & EMaskRg1Line) != 0; }
//=======================================================================
//function : Rg1Line
//purpose :
//=======================================================================
inline void HLRBRep_EdgeData::Rg1Line (const Standard_Boolean B)
{
if (B) myFlags |= EMaskRg1Line;
else myFlags &= ~EMaskRg1Line;
}
//=======================================================================
//function : RgNLine
//purpose :
//=======================================================================
inline Standard_Boolean HLRBRep_EdgeData::RgNLine () const
{ return (myFlags & EMaskRgNLine) != 0; }
//=======================================================================
//function : RgNLine
//purpose :
//=======================================================================
inline void HLRBRep_EdgeData::RgNLine (const Standard_Boolean B)
{
if (B) myFlags |= EMaskRgNLine;
else myFlags &= ~EMaskRgNLine;
}
//=======================================================================
//function : Vertical
//purpose :
//=======================================================================
inline Standard_Boolean HLRBRep_EdgeData::Vertical () const
{ return (myFlags & EMaskVertical) != 0; }
//=======================================================================
//function : Vertical
//purpose :
//=======================================================================
inline void HLRBRep_EdgeData::Vertical(const Standard_Boolean B)
{
if (B) myFlags |= EMaskVertical;
else myFlags &= ~EMaskVertical;
}
//=======================================================================
//function : Simple
//purpose :
//=======================================================================
inline Standard_Boolean HLRBRep_EdgeData::Simple () const
{ return (myFlags & EMaskSimple) != 0; }
//=======================================================================
//function : Simple
//purpose :
//=======================================================================
inline void HLRBRep_EdgeData::Simple (const Standard_Boolean B)
{
if (B) myFlags |= EMaskSimple;
else myFlags &= ~EMaskSimple;
}
//=======================================================================
//function : OutLVSta
//purpose :
//=======================================================================
inline Standard_Boolean HLRBRep_EdgeData::OutLVSta () const
{ return (myFlags & EMaskOutLVSta) != 0; }
//=======================================================================
//function : OutLVSta
//purpose :
//=======================================================================
inline void HLRBRep_EdgeData::OutLVSta (const Standard_Boolean B)
{
if (B) myFlags |= EMaskOutLVSta;
else myFlags &= ~EMaskOutLVSta;
}
//=======================================================================
//function : OutLVEnd
//purpose :
//=======================================================================
inline Standard_Boolean HLRBRep_EdgeData::OutLVEnd () const
{ return (myFlags & EMaskOutLVEnd) != 0; }
//=======================================================================
//function : OutLVEnd
//purpose :
//=======================================================================
inline void HLRBRep_EdgeData::OutLVEnd (const Standard_Boolean B)
{
if (B) myFlags |= EMaskOutLVEnd;
else myFlags &= ~EMaskOutLVEnd;
}
//=======================================================================
//function : CutAtSta
//purpose :
//=======================================================================
inline Standard_Boolean HLRBRep_EdgeData::CutAtSta () const
{ return (myFlags & EMaskCutAtSta) != 0; }
//=======================================================================
//function : CutAtSta
//purpose :
//=======================================================================
inline void HLRBRep_EdgeData::CutAtSta (const Standard_Boolean B)
{
if (B) myFlags |= EMaskCutAtSta;
else myFlags &= ~EMaskCutAtSta;
}
//=======================================================================
//function : CutAtEnd
//purpose :
//=======================================================================
inline Standard_Boolean HLRBRep_EdgeData::CutAtEnd () const
{ return (myFlags & EMaskCutAtEnd) != 0; }
//=======================================================================
//function : CutAtEnd
//purpose :
//=======================================================================
inline void HLRBRep_EdgeData::CutAtEnd (const Standard_Boolean B)
{
if (B) myFlags |= EMaskCutAtEnd;
else myFlags &= ~EMaskCutAtEnd;
}
//=======================================================================
//function : VerAtSta
//purpose :
//=======================================================================
inline Standard_Boolean HLRBRep_EdgeData::VerAtSta () const
{ return (myFlags & EMaskVerAtSta) != 0; }
//=======================================================================
//function : VerAtSta
//purpose :
//=======================================================================
inline void HLRBRep_EdgeData::VerAtSta (const Standard_Boolean B)
{
if (B) myFlags |= EMaskVerAtSta;
else myFlags &= ~EMaskVerAtSta;
}
//=======================================================================
//function : VerAtEnd
//purpose :
//=======================================================================
inline Standard_Boolean HLRBRep_EdgeData::VerAtEnd () const
{ return (myFlags & EMaskVerAtEnd) != 0; }
//=======================================================================
//function : VerAtEnd
//purpose :
//=======================================================================
inline void HLRBRep_EdgeData::VerAtEnd (const Standard_Boolean B)
{
if (B) myFlags |= EMaskVerAtEnd;
else myFlags &= ~EMaskVerAtEnd;
}
//=======================================================================
//function : AutoIntersectionDone
//purpose :
//=======================================================================
inline Standard_Boolean HLRBRep_EdgeData::AutoIntersectionDone () const
{ return (myFlags & EMaskIntDone) != 0; }
//=======================================================================
//function : AutoIntersectionDone
//purpose :
//=======================================================================
inline void
HLRBRep_EdgeData::AutoIntersectionDone (const Standard_Boolean B)
{
if (B) myFlags |= EMaskIntDone;
else myFlags &= ~EMaskIntDone;
}
//=======================================================================
//function : Used
//purpose :
//=======================================================================
inline Standard_Boolean HLRBRep_EdgeData::Used () const
{ return (myFlags & EMaskUsed) != 0; }
//=======================================================================
//function : Used
//purpose :
//=======================================================================
inline void HLRBRep_EdgeData::Used (const Standard_Boolean B)
{
if (B) myFlags |= EMaskUsed;
else myFlags &= ~EMaskUsed;
}
//=======================================================================
//function : HideCount
//purpose :
//=======================================================================
inline Standard_Integer HLRBRep_EdgeData::HideCount () const
{ return myHideCount; }
//=======================================================================
//function : HideCount
//purpose :
//=======================================================================
inline void HLRBRep_EdgeData::HideCount (const Standard_Integer I)
{ myHideCount = I; }
//=======================================================================
//function : VSta
//purpose :
//=======================================================================
inline Standard_Integer HLRBRep_EdgeData::VSta() const
{ return myVSta; }
//=======================================================================
//function : VSta
//purpose :
//=======================================================================
inline void HLRBRep_EdgeData::VSta (const Standard_Integer I)
{ myVSta = I; }
//=======================================================================
//function : VEnd
//purpose :
//=======================================================================
inline Standard_Integer HLRBRep_EdgeData::VEnd () const
{ return myVEnd; }
//=======================================================================
//function : VEnd
//purpose :
//=======================================================================
inline void HLRBRep_EdgeData::VEnd (const Standard_Integer I)
{ myVEnd = I; }
//=======================================================================
//function : MinMax
//purpose :
//=======================================================================
inline Standard_Address HLRBRep_EdgeData::MinMax () const
{ return (Standard_Address)&myMinMax; }
//=======================================================================
//function : Status
//purpose :
//=======================================================================
inline HLRAlgo_EdgeStatus & HLRBRep_EdgeData::Status ()
{ return myStatus; }
//=======================================================================
//function : ChangeGeometry
//purpose :
//=======================================================================
inline HLRBRep_Curve & HLRBRep_EdgeData::ChangeGeometry ()
{ return myGeometry; }
//=======================================================================
//function : Geometry
//purpose :
//=======================================================================
inline const HLRBRep_Curve & HLRBRep_EdgeData::Geometry () const
{ return myGeometry; }
//=======================================================================
//function : Curve
//purpose :
//=======================================================================
inline Standard_Address HLRBRep_EdgeData::Curve ()
{ return ((Standard_Address)&myGeometry); }
//=======================================================================
//function : Tolerance
//purpose :
//=======================================================================
inline Standard_ShortReal HLRBRep_EdgeData::Tolerance () const
{ return myTolerance; }