1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00

0022742: Not all constructors defined in TNaming_Identifier.cdl are implemented.

This commit is contained in:
SZY 2011-11-11 13:52:53 +00:00 committed by bugmaster
parent 92434a36ef
commit 0ddd904c6a
2 changed files with 38 additions and 11 deletions

View File

@ -22,14 +22,14 @@ is
Create (Lab : Label from TDF;
S : Shape from TopoDS;
Context : Shape from TopoDS;
Geom : Boolean from Standard)
Context : Shape from TopoDS;
Geom : Boolean from Standard)
returns Identifier from TNaming;
Create (Lab : Label from TDF;
S : Shape from TopoDS;
Context : NamedShape from TNaming;
Geom : Boolean from Standard)
ContextNS : NamedShape from TNaming;
Geom : Boolean from Standard)
returns Identifier from TNaming;
@ -80,6 +80,9 @@ is
Localizer : in out Localizer from TNaming;
NS : NamedShape from TNaming);
Init(me : in out; Context : Shape from TopoDS) is private;
fields
myTDFAcces : Label from TDF;

View File

@ -64,17 +64,43 @@ TNaming_Identifier::TNaming_Identifier(const TDF_Label& LabAcces,
:myTDFAcces(LabAcces), myShape(S), myOneOnly(OneOnly),
myDone(Standard_False),myIsFeature(Standard_False)
{
Init(Context);
}
//=======================================================================
//function : TNaming_Identifier
//purpose :
//=======================================================================
TNaming_Identifier::TNaming_Identifier(const TDF_Label& LabAcces,
const TopoDS_Shape& S,
const Handle(TNaming_NamedShape)& ContextNS,
const Standard_Boolean OneOnly)
:myTDFAcces(LabAcces), myShape(S), myOneOnly(OneOnly),
myDone(Standard_False),myIsFeature(Standard_False)
{
const TopoDS_Shape& aContext = TNaming_Tool::GetShape (ContextNS);
Init(aContext);
}
//=======================================================================
//function : Init
//purpose :
//=======================================================================
void TNaming_Identifier::Init(const TopoDS_Shape& Context)
{
Handle(TNaming_UsedShapes) US;
LabAcces.Root().FindAttribute(TNaming_UsedShapes::GetID(),US);
myTDFAcces.Root().FindAttribute(TNaming_UsedShapes::GetID(),US);
TNaming_Localizer Localizer;
Localizer.Init (US,LabAcces.Transaction());
Localizer.Init (US,myTDFAcces.Transaction());
Handle(TNaming_NamedShape) NS;
NS = TNaming_Tool::NamedShape(S,LabAcces);
NS = TNaming_Tool::NamedShape(myShape, myTDFAcces);
if (NS.IsNull()) {
AncestorIdentification(Localizer,Context);
AncestorIdentification(Localizer, Context);
return;
}
#ifdef MDTV_DEB_IDF
@ -97,8 +123,6 @@ myDone(Standard_False),myIsFeature(Standard_False)
}
}
//=======================================================================
//function : Type
//purpose :