1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +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:
abv
2015-07-02 17:06:37 +03:00
parent a1eb3afd0d
commit 543a996496
69 changed files with 270 additions and 198 deletions

View File

@@ -332,7 +332,8 @@ static IFSelect_ReturnStatus XSControl_xoption(const Handle(IFSelect_SessionPilo
Handle(Interface_Static) param = Interface_Static::Static(parname);
if (param.IsNull()) { sout<<"No static parameter is named "<<parname<<endl;
return IFSelect_RetError; }
Handle(MoniTool_Option) opt = new MoniTool_Option(param,arg2);
const Handle(MoniTool_TypedValue)& aparam = param; // to avoid ambiguity
Handle(MoniTool_Option) opt = new MoniTool_Option(aparam,arg2);
prof->AddOption (opt);
return IFSelect_RetDone;
}