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:
@@ -84,7 +84,9 @@ void StepData_StepModel::AddHeaderEntity
|
||||
void StepData_StepModel::VerifyCheck(Handle(Interface_Check)& ach) const
|
||||
{
|
||||
Interface_GeneralLib lib(StepData::HeaderProtocol());
|
||||
Interface_ShareTool sh(this,StepData::HeaderProtocol());
|
||||
Handle(StepData_StepModel) me (this);
|
||||
Handle(Interface_Protocol) aHP = StepData::HeaderProtocol();
|
||||
Interface_ShareTool sh(me,aHP);
|
||||
Handle(Interface_GeneralModule) module; Standard_Integer CN;
|
||||
for (Interface_EntityIterator iter = Header(); iter.More(); iter.Next()) {
|
||||
Handle(Standard_Transient) head = iter.Value();
|
||||
@@ -115,7 +117,8 @@ void StepData_StepModel::DumpHeader
|
||||
<< " --"<<endl;
|
||||
|
||||
Standard_SStream aSStream;
|
||||
StepData_StepWriter SW(this);
|
||||
Handle(StepData_StepModel) me (this);
|
||||
StepData_StepWriter SW(me);
|
||||
SW.SendModel(stepro,Standard_True); // envoi HEADER seul
|
||||
SW.Print(aSStream);
|
||||
S << aSStream.str().c_str();
|
||||
|
@@ -51,7 +51,6 @@
|
||||
// .... Creation et Acces de base aux donnees atomiques du fichier ....
|
||||
|
||||
typedef TCollection_HAsciiString String;
|
||||
typedef Handle(TCollection_HAsciiString) Handle(String);
|
||||
static char txtmes[200]; // plus commode que redeclarer partout
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user