1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0024814: Avoid using explicit names of Handle classes

Sources corrected replacing Handle_XXX by Handle(XXX)
This commit is contained in:
abv
2014-04-09 18:48:28 +04:00
parent 6fc9d72d9d
commit 857ffd5e57
211 changed files with 697 additions and 697 deletions

View File

@@ -25,7 +25,7 @@
//purpose :
//=======================================================================
void Poly_CoherentNode::Clear (const Handle_NCollection_BaseAllocator& theAlloc)
void Poly_CoherentNode::Clear (const Handle(NCollection_BaseAllocator)& theAlloc)
{
Poly_CoherentTriPtr::RemoveList (myTriangles, theAlloc);
myUV[0] = Precision::Infinite();
@@ -55,7 +55,7 @@ void Poly_CoherentNode::SetNormal (const gp_XYZ& theVector)
void Poly_CoherentNode::AddTriangle
(const Poly_CoherentTriangle& theTri,
const Handle_NCollection_BaseAllocator& theAlloc)
const Handle(NCollection_BaseAllocator)& theAlloc)
{
if (myTriangles == NULL)
myTriangles = new (theAlloc) Poly_CoherentTriPtr(theTri);
@@ -70,7 +70,7 @@ void Poly_CoherentNode::AddTriangle
Standard_Boolean Poly_CoherentNode::RemoveTriangle
(const Poly_CoherentTriangle& theTri,
const Handle_NCollection_BaseAllocator& theAlloc)
const Handle(NCollection_BaseAllocator)& theAlloc)
{
Standard_Boolean aResult(Standard_False);
if (&myTriangles->GetTriangle() == &theTri) {

View File

@@ -116,14 +116,14 @@ class Poly_CoherentNode : public gp_XYZ
/**
* Reset the Node to void.
*/
Standard_EXPORT void Clear (const Handle_NCollection_BaseAllocator&);
Standard_EXPORT void Clear (const Handle(NCollection_BaseAllocator)&);
/**
* Connect a triangle to this Node.
*/
Standard_EXPORT void AddTriangle
(const Poly_CoherentTriangle& theTri,
const Handle_NCollection_BaseAllocator& theA);
const Handle(NCollection_BaseAllocator)& theA);
/**
* Disconnect a triangle from this Node.
@@ -131,7 +131,7 @@ class Poly_CoherentNode : public gp_XYZ
Standard_EXPORT Standard_Boolean
RemoveTriangle
(const Poly_CoherentTriangle& theTri,
const Handle_NCollection_BaseAllocator& theA);
const Handle(NCollection_BaseAllocator)& theA);
/**
* Create an iterator of incident triangles.

View File

@@ -37,7 +37,7 @@ void Poly_CoherentTriPtr::Iterator::Next ()
void Poly_CoherentTriPtr::Append
(const Poly_CoherentTriangle * pTri,
const Handle_NCollection_BaseAllocator& theAlloc)
const Handle(NCollection_BaseAllocator)& theAlloc)
{
Handle(NCollection_BaseAllocator) anAlloc = theAlloc;
if (theAlloc.IsNull())
@@ -56,7 +56,7 @@ void Poly_CoherentTriPtr::Append
void Poly_CoherentTriPtr::Prepend
(const Poly_CoherentTriangle * pTri,
const Handle_NCollection_BaseAllocator& theAlloc)
const Handle(NCollection_BaseAllocator)& theAlloc)
{
Handle(NCollection_BaseAllocator) anAlloc = theAlloc;
if (theAlloc.IsNull())
@@ -75,7 +75,7 @@ void Poly_CoherentTriPtr::Prepend
void Poly_CoherentTriPtr::Remove
(Poly_CoherentTriPtr * thePtr,
const Handle_NCollection_BaseAllocator& theAlloc)
const Handle(NCollection_BaseAllocator)& theAlloc)
{
Handle(NCollection_BaseAllocator) anAlloc = theAlloc;
if (theAlloc.IsNull())
@@ -96,7 +96,7 @@ void Poly_CoherentTriPtr::Remove
void Poly_CoherentTriPtr::RemoveList
(Poly_CoherentTriPtr * thePtr,
const Handle_NCollection_BaseAllocator& theAlloc)
const Handle(NCollection_BaseAllocator)& theAlloc)
{
Handle(NCollection_BaseAllocator) anAlloc = theAlloc;
if (theAlloc.IsNull())

View File

@@ -125,7 +125,7 @@ class Poly_CoherentTriPtr
* Allocator where the new pointer instance is created.
*/
Standard_EXPORT void Append (const Poly_CoherentTriangle * pTri,
const Handle_NCollection_BaseAllocator& theA);
const Handle(NCollection_BaseAllocator)& theA);
/**
* Prepend a pointer to triangle into the list before the current instance.
@@ -135,7 +135,7 @@ class Poly_CoherentTriPtr
* Allocator where the new pointer instance is created.
*/
Standard_EXPORT void Prepend (const Poly_CoherentTriangle * pTri,
const Handle_NCollection_BaseAllocator& theA);
const Handle(NCollection_BaseAllocator)& theA);
/**
* Remove a pointer to triangle from its list.
@@ -146,14 +146,14 @@ class Poly_CoherentTriPtr
*/
Standard_EXPORT static void
Remove (Poly_CoherentTriPtr * thePtr,
const Handle_NCollection_BaseAllocator& theA);
const Handle(NCollection_BaseAllocator)& theA);
/**
* Remove the list containing the given pointer to triangle.
*/
Standard_EXPORT static void
RemoveList (Poly_CoherentTriPtr * thePtr,
const Handle_NCollection_BaseAllocator&);
const Handle(NCollection_BaseAllocator)&);
protected:
// ---------- PROTECTED METHODS ----------

View File

@@ -33,7 +33,7 @@ IMPLEMENT_STANDARD_RTTIEXT (Poly_CoherentTriangulation, Standard_Transient)
//=======================================================================
Poly_CoherentTriangulation::Poly_CoherentTriangulation
(const Handle_NCollection_BaseAllocator& theAlloc)
(const Handle(NCollection_BaseAllocator)& theAlloc)
: myAlloc (theAlloc.IsNull() ? NCollection_BaseAllocator::CommonBaseAllocator()
: theAlloc),
myDeflection (0.)
@@ -46,7 +46,7 @@ Poly_CoherentTriangulation::Poly_CoherentTriangulation
Poly_CoherentTriangulation::Poly_CoherentTriangulation
(const Handle(Poly_Triangulation)& theTriangulation,
const Handle_NCollection_BaseAllocator& theAlloc)
const Handle(NCollection_BaseAllocator)& theAlloc)
: myAlloc (theAlloc.IsNull() ? NCollection_BaseAllocator::CommonBaseAllocator()
: theAlloc)
{
@@ -114,7 +114,7 @@ Poly_CoherentTriangulation::~Poly_CoherentTriangulation ()
//purpose :
//=======================================================================
Handle_Poly_Triangulation Poly_CoherentTriangulation::GetTriangulation() const
Handle(Poly_Triangulation) Poly_CoherentTriangulation::GetTriangulation() const
{
Handle(Poly_Triangulation) aResult;
const Standard_Integer nNodes = NNodes();
@@ -277,7 +277,7 @@ Standard_Boolean Poly_CoherentTriangulation::RemoveDegenerated
//=======================================================================
Poly_CoherentTriangulation::IteratorOfTriangle::IteratorOfTriangle
(const Handle_Poly_CoherentTriangulation& theTri)
(const Handle(Poly_CoherentTriangulation)& theTri)
{
if (!theTri.IsNull()) {
Init(theTri->myTriangles);
@@ -312,7 +312,7 @@ void Poly_CoherentTriangulation::IteratorOfTriangle::Next()
//=======================================================================
Poly_CoherentTriangulation::IteratorOfNode::IteratorOfNode
(const Handle_Poly_CoherentTriangulation& theTri)
(const Handle(Poly_CoherentTriangulation)& theTri)
{
if (!theTri.IsNull()) {
Init(theTri->myNodes);
@@ -345,7 +345,7 @@ void Poly_CoherentTriangulation::IteratorOfNode::Next()
//=======================================================================
Poly_CoherentTriangulation::IteratorOfLink::IteratorOfLink
(const Handle_Poly_CoherentTriangulation& theTri)
(const Handle(Poly_CoherentTriangulation)& theTri)
{
if (!theTri.IsNull()) {
Init(theTri->myLinks);
@@ -731,7 +731,7 @@ void Poly_CoherentTriangulation::ClearLinks ()
//=======================================================================
Handle(Poly_CoherentTriangulation) Poly_CoherentTriangulation::Clone
(const Handle_NCollection_BaseAllocator& theAlloc) const
(const Handle(NCollection_BaseAllocator)& theAlloc) const
{
Handle(Poly_CoherentTriangulation) newTri;

View File

@@ -22,7 +22,7 @@
#include <Poly_CoherentLink.hxx>
#include <NCollection_Vector.hxx>
class Handle_Poly_CoherentTriangulation;
class Handle(Poly_CoherentTriangulation);
class Poly_CoherentTriangulation;
template <class A> class NCollection_List;
@@ -108,7 +108,7 @@ class Poly_CoherentTriangulation : public Standard_Transient
public:
//! Constructor
Standard_EXPORT IteratorOfTriangle
(const Handle_Poly_CoherentTriangulation& theTri);
(const Handle(Poly_CoherentTriangulation)& theTri);
//! Make step
Standard_EXPORT virtual void Next ();
};
@@ -121,7 +121,7 @@ class Poly_CoherentTriangulation : public Standard_Transient
public:
//! Constructor
Standard_EXPORT IteratorOfNode
(const Handle_Poly_CoherentTriangulation& theTri);
(const Handle(Poly_CoherentTriangulation)& theTri);
//! Make step
Standard_EXPORT virtual void Next ();
};
@@ -134,7 +134,7 @@ class Poly_CoherentTriangulation : public Standard_Transient
public:
//! Constructor
Standard_EXPORT IteratorOfLink
(const Handle_Poly_CoherentTriangulation& theTri);
(const Handle(Poly_CoherentTriangulation)& theTri);
//! Make step
Standard_EXPORT virtual void Next ();
};
@@ -157,15 +157,15 @@ class Poly_CoherentTriangulation : public Standard_Transient
* Empty constructor.
*/
Standard_EXPORT Poly_CoherentTriangulation
(const Handle_NCollection_BaseAllocator& theAlloc = 0L);
(const Handle(NCollection_BaseAllocator)& theAlloc = 0L);
/**
* Constructor. It does not create Links, you should call ComputeLinks
* following this constructor if you need these links.
*/
Standard_EXPORT Poly_CoherentTriangulation
(const Handle_Poly_Triangulation& theTriangulation,
const Handle_NCollection_BaseAllocator& theAlloc = 0L);
(const Handle(Poly_Triangulation)& theTriangulation,
const Handle(NCollection_BaseAllocator)& theAlloc = 0L);
/**
* Destructor.
@@ -175,7 +175,7 @@ class Poly_CoherentTriangulation : public Standard_Transient
/**
* Create an instance of Poly_Triangulation from this object.
*/
Standard_EXPORT Handle_Poly_Triangulation
Standard_EXPORT Handle(Poly_Triangulation)
GetTriangulation () const;
/**
@@ -349,7 +349,7 @@ class Poly_CoherentTriangulation : public Standard_Transient
* Query the allocator of elements, this allocator can be used for other
* objects
*/
inline const Handle_NCollection_BaseAllocator&
inline const Handle(NCollection_BaseAllocator)&
Allocator () const
{
return myAlloc;
@@ -357,8 +357,8 @@ class Poly_CoherentTriangulation : public Standard_Transient
/**
* Create a copy of this Triangulation, using the given allocator.
*/
Standard_EXPORT Handle_Poly_CoherentTriangulation Clone
(const Handle_NCollection_BaseAllocator& theAlloc) const;
Standard_EXPORT Handle(Poly_CoherentTriangulation) Clone
(const Handle(NCollection_BaseAllocator)& theAlloc) const;
/**
* Debugging output.
@@ -376,7 +376,7 @@ class Poly_CoherentTriangulation : public Standard_Transient
NCollection_Vector<Poly_CoherentTriangle> myTriangles;
NCollection_Vector<Poly_CoherentNode> myNodes;
NCollection_Vector<Poly_CoherentLink> myLinks;
Handle_NCollection_BaseAllocator myAlloc;
Handle(NCollection_BaseAllocator) myAlloc;
Standard_Real myDeflection;
public:

View File

@@ -23,6 +23,6 @@
* List of Poly_Triangulation instances.
*/
typedef NCollection_List<Handle_Poly_Triangulation> Poly_ListOfTriangulation;
typedef NCollection_List<Handle(Poly_Triangulation)> Poly_ListOfTriangulation;
#endif

View File

@@ -29,7 +29,7 @@ static Standard_Integer doDebug = 0;
//=======================================================================
Poly_MakeLoops::Poly_MakeLoops(const Helper* theHelper,
const Handle_NCollection_BaseAllocator& theAlloc)
const Handle(NCollection_BaseAllocator)& theAlloc)
: myHelper (theHelper),
myAlloc (theAlloc),
myMapLink (4000, myAlloc),
@@ -45,7 +45,7 @@ Poly_MakeLoops::Poly_MakeLoops(const Helper* theHelper,
void Poly_MakeLoops::Reset
(const Helper* theHelper,
const Handle_NCollection_BaseAllocator& theAlloc)
const Handle(NCollection_BaseAllocator)& theAlloc)
{
myHelper = theHelper;
myMapLink.Clear();
@@ -245,8 +245,8 @@ Standard_Integer Poly_MakeLoops::Perform()
Standard_Integer Poly_MakeLoops::findContour
(Standard_Integer theIndexS,
NCollection_IndexedMap<Standard_Integer> &theContour,
const Handle_NCollection_BaseAllocator& theTempAlloc,
const Handle_NCollection_IncAllocator& theTempAlloc1) const
const Handle(NCollection_BaseAllocator)& theTempAlloc,
const Handle(NCollection_IncAllocator)& theTempAlloc1) const
{
theContour.Clear();
Standard_Integer aStartIndex = 0;
@@ -579,7 +579,7 @@ void Poly_MakeLoops::GetHangingLinks(ListOfLink& theLinks) const
//=======================================================================
Poly_MakeLoops3D::Poly_MakeLoops3D(const Helper* theHelper,
const Handle_NCollection_BaseAllocator& theAlloc)
const Handle(NCollection_BaseAllocator)& theAlloc)
: Poly_MakeLoops (theHelper, theAlloc)
{
}
@@ -651,7 +651,7 @@ Standard_Integer Poly_MakeLoops3D::chooseLeftWay
Poly_MakeLoops2D::Poly_MakeLoops2D(const Standard_Boolean theLeftWay,
const Helper* theHelper,
const Handle_NCollection_BaseAllocator& theAlloc)
const Handle(NCollection_BaseAllocator)& theAlloc)
: Poly_MakeLoops (theHelper, theAlloc),
myRightWay(!theLeftWay)
{

View File

@@ -23,7 +23,7 @@
#include <NCollection_BaseAllocator.hxx>
#include <NCollection_List.hxx>
class Handle_NCollection_IncAllocator;
class Handle(NCollection_IncAllocator);
/**
* Make loops from a set of connected links. A link is represented by
@@ -154,12 +154,12 @@ public:
//! Constructor. If helper is NULL then the algorithm will
//! probably return a wrong result
Standard_EXPORT Poly_MakeLoops(const Helper* theHelper,
const Handle_NCollection_BaseAllocator& theAlloc = 0L);
const Handle(NCollection_BaseAllocator)& theAlloc = 0L);
//! It is to reset the algorithm to the initial state.
Standard_EXPORT void Reset
(const Helper* theHelper,
const Handle_NCollection_BaseAllocator& theAlloc = 0L);
const Handle(NCollection_BaseAllocator)& theAlloc = 0L);
//! Adds a link to the set. theOrient defines which orientations of the link
//! are allowed.
@@ -233,8 +233,8 @@ protected:
private:
int findContour(Standard_Integer theIndexS, NCollection_IndexedMap<Standard_Integer>& theContour,
const Handle_NCollection_BaseAllocator& theTempAlloc,
const Handle_NCollection_IncAllocator& theTempAlloc1) const;
const Handle(NCollection_BaseAllocator)& theTempAlloc,
const Handle(NCollection_IncAllocator)& theTempAlloc1) const;
void acceptContour(const NCollection_IndexedMap<Standard_Integer>& theContour,
Standard_Integer theStartNumber);
Standard_Integer getFirstNode(Standard_Integer theIndexS) const;
@@ -244,7 +244,7 @@ private:
// FIELDS
const Helper* myHelper;
Handle_NCollection_BaseAllocator myAlloc;
Handle(NCollection_BaseAllocator) myAlloc;
NCollection_IndexedMap<Link> myMapLink;
NCollection_Sequence<Loop> myLoops;
HeapOfInteger myStartIndices;
@@ -300,7 +300,7 @@ public:
//! Constructor. If helper is NULL then the algorithm will
//! probably return a wrong result
Standard_EXPORT Poly_MakeLoops3D(const Helper* theHelper,
const Handle_NCollection_BaseAllocator& theAlloc);
const Handle(NCollection_BaseAllocator)& theAlloc);
protected:
Standard_EXPORT virtual Standard_Integer chooseLeftWay
@@ -341,7 +341,7 @@ public:
//! probably return a wrong result
Standard_EXPORT Poly_MakeLoops2D(const Standard_Boolean theLeftWay,
const Helper* theHelper,
const Handle_NCollection_BaseAllocator& theAlloc);
const Handle(NCollection_BaseAllocator)& theAlloc);
protected:
Standard_EXPORT virtual Standard_Integer chooseLeftWay