mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0024023: Revamp the OCCT Handle -- ambiguity
Code corrected to avoid ambiguous situations due to changed implementation of Handle (overloaded methods accepting handles of different types). In Adaptor3d_CurveOnSurface added method Load() with two parameters, allowing to avoid ambiguity of cast of handles when calling separate methods Load() for curve and surface, replacing by single call. In DrawTrSurf and IGESData_IGESWriter, template variants of methods Set() and Send(), respectively, are added to avoid ambiguity when these methods are called with handles to derived types (using SFINAE). In NCollection_DefineHSequence, method Append() accepting handle to another HSequence is made template, to be available only if argument has compatible type.
This commit is contained in:
@@ -67,6 +67,11 @@ is
|
||||
---Purpose: Changes the 2d curve.
|
||||
is static;
|
||||
|
||||
Load(me : in out; C : HCurve2d from Adaptor2d;
|
||||
S : HSurface from Adaptor3d)
|
||||
---Purpose: Load both curve and surface.
|
||||
is static;
|
||||
|
||||
GetCurve(me) returns HCurve2d from Adaptor2d
|
||||
---C++: return const &
|
||||
is static;
|
||||
|
@@ -743,6 +743,18 @@ void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor2d_HCurve2d)& C)
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Load
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Adaptor3d_CurveOnSurface::Load (const Handle(Adaptor2d_HCurve2d)& C,
|
||||
const Handle(Adaptor3d_HSurface)& S)
|
||||
{
|
||||
Load (C);
|
||||
Load (S);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : FirstParameter
|
||||
//purpose :
|
||||
|
Reference in New Issue
Block a user