mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0026005: Problem with transient TFunction_Logbook
This commit is contained in:
@@ -75,14 +75,14 @@ DNaming_BooleanOperationDriver::DNaming_BooleanOperationDriver()
|
||||
//function : Validate
|
||||
//purpose : Validates labels of a function in <log>.
|
||||
//=======================================================================
|
||||
void DNaming_BooleanOperationDriver::Validate(TFunction_Logbook&) const
|
||||
void DNaming_BooleanOperationDriver::Validate(Handle(TFunction_Logbook)&) const
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : MustExecute
|
||||
//purpose : Analyse in <log> if the loaded function must be executed
|
||||
//=======================================================================
|
||||
Standard_Boolean DNaming_BooleanOperationDriver::MustExecute(const TFunction_Logbook&) const
|
||||
Standard_Boolean DNaming_BooleanOperationDriver::MustExecute(const Handle(TFunction_Logbook)&) const
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
@@ -91,7 +91,7 @@ Standard_Boolean DNaming_BooleanOperationDriver::MustExecute(const TFunction_Log
|
||||
//function : Execute
|
||||
//purpose : Execute the function and push in <log> the impacted labels
|
||||
//=======================================================================
|
||||
Standard_Integer DNaming_BooleanOperationDriver::Execute(TFunction_Logbook& theLog) const
|
||||
Standard_Integer DNaming_BooleanOperationDriver::Execute(Handle(TFunction_Logbook)& theLog) const
|
||||
{
|
||||
Handle(TFunction_Function) aFunction;
|
||||
Label().FindAttribute(TFunction_Function::GetID(),aFunction);
|
||||
@@ -162,7 +162,7 @@ Standard_Integer DNaming_BooleanOperationDriver::Execute(TFunction_Logbook& theL
|
||||
}
|
||||
if(!anIsDone) return -1;
|
||||
else {
|
||||
theLog.SetValid(RESPOSITION(aFunction),Standard_True);
|
||||
theLog->SetValid(RESPOSITION(aFunction),Standard_True);
|
||||
aFunction->SetFailure(DONE);
|
||||
return 0;
|
||||
}
|
||||
|
@@ -49,17 +49,17 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT virtual void Validate (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual void Validate (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
//! If the Function label itself is modified, the function must
|
||||
//! be executed.
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Execute the function and push in <log> the impacted
|
||||
//! labels (see method SetImpacted).
|
||||
Standard_EXPORT virtual Standard_Integer Execute (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Integer Execute (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
@@ -44,14 +44,14 @@ DNaming_BoxDriver::DNaming_BoxDriver()
|
||||
//function : Validate
|
||||
//purpose : Validates labels of a function in <log>.
|
||||
//=======================================================================
|
||||
void DNaming_BoxDriver::Validate(TFunction_Logbook&) const
|
||||
void DNaming_BoxDriver::Validate(Handle(TFunction_Logbook)&) const
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : MustExecute
|
||||
//purpose : Analyse in <log> if the loaded function must be executed
|
||||
//=======================================================================
|
||||
Standard_Boolean DNaming_BoxDriver::MustExecute(const TFunction_Logbook&) const
|
||||
Standard_Boolean DNaming_BoxDriver::MustExecute(const Handle(TFunction_Logbook)&) const
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
@@ -60,7 +60,7 @@ Standard_Boolean DNaming_BoxDriver::MustExecute(const TFunction_Logbook&) const
|
||||
//function : Execute
|
||||
//purpose : Execute the function and push in <log> the impacted labels
|
||||
//=======================================================================
|
||||
Standard_Integer DNaming_BoxDriver::Execute(TFunction_Logbook& theLog) const
|
||||
Standard_Integer DNaming_BoxDriver::Execute(Handle(TFunction_Logbook)& theLog) const
|
||||
{
|
||||
Handle(TFunction_Function) aFunction;
|
||||
Label().FindAttribute(TFunction_Function::GetID(),aFunction);
|
||||
@@ -103,7 +103,7 @@ Standard_Integer DNaming_BoxDriver::Execute(TFunction_Logbook& theLog) const
|
||||
if(!aLocation.IsIdentity())
|
||||
TNaming::Displace(RESPOSITION(aFunction), aLocation, Standard_True);
|
||||
|
||||
theLog.SetValid(RESPOSITION(aFunction), Standard_True);
|
||||
theLog->SetValid(RESPOSITION(aFunction), Standard_True);
|
||||
|
||||
aFunction->SetFailure(DONE);
|
||||
return 0;
|
||||
|
@@ -48,17 +48,17 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT virtual void Validate (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual void Validate (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
//! If the Function label itself is modified, the function must
|
||||
//! be executed.
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Execute the function and push in <log> the impacted
|
||||
//! labels (see method SetImpacted).
|
||||
Standard_EXPORT virtual Standard_Integer Execute (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Integer Execute (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
@@ -51,14 +51,14 @@ DNaming_CylinderDriver::DNaming_CylinderDriver()
|
||||
//function : Validate
|
||||
//purpose : Validates labels of a function in <log>.
|
||||
//=======================================================================
|
||||
void DNaming_CylinderDriver::Validate(TFunction_Logbook&) const
|
||||
void DNaming_CylinderDriver::Validate(Handle(TFunction_Logbook)&) const
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : MustExecute
|
||||
//purpose : Analyse in <log> if the loaded function must be executed
|
||||
//=======================================================================
|
||||
Standard_Boolean DNaming_CylinderDriver::MustExecute(const TFunction_Logbook&) const
|
||||
Standard_Boolean DNaming_CylinderDriver::MustExecute(const Handle(TFunction_Logbook)&) const
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
@@ -67,7 +67,7 @@ Standard_Boolean DNaming_CylinderDriver::MustExecute(const TFunction_Logbook&) c
|
||||
//function : Execute
|
||||
//purpose : Execute the function and push in <log> the impacted labels
|
||||
//=======================================================================
|
||||
Standard_Integer DNaming_CylinderDriver::Execute(TFunction_Logbook& theLog) const
|
||||
Standard_Integer DNaming_CylinderDriver::Execute(Handle(TFunction_Logbook)& theLog) const
|
||||
{
|
||||
Handle(TFunction_Function) aFunction;
|
||||
Label().FindAttribute(TFunction_Function::GetID(),aFunction);
|
||||
@@ -155,8 +155,7 @@ Standard_Integer DNaming_CylinderDriver::Execute(TFunction_Logbook& theLog) cons
|
||||
if(!aLocation.IsIdentity())
|
||||
TNaming::Displace(RESPOSITION(aFunction), aLocation, Standard_True);
|
||||
|
||||
|
||||
theLog.SetValid(RESPOSITION(aFunction), Standard_True);
|
||||
theLog->SetValid(RESPOSITION(aFunction), Standard_True);
|
||||
aFunction->SetFailure(DONE);
|
||||
return 0;
|
||||
}
|
||||
|
@@ -48,17 +48,17 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT virtual void Validate (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual void Validate (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
//! If the Function label itself is modified, the function must
|
||||
//! be executed.
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Execute the function and push in <log> the impacted
|
||||
//! labels (see method SetImpacted).
|
||||
Standard_EXPORT virtual Standard_Integer Execute (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Integer Execute (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
@@ -52,14 +52,14 @@ DNaming_FilletDriver::DNaming_FilletDriver()
|
||||
//function : Validate
|
||||
//purpose : Validates labels of a function in <log>.
|
||||
//=======================================================================
|
||||
void DNaming_FilletDriver::Validate(TFunction_Logbook&) const
|
||||
void DNaming_FilletDriver::Validate(Handle(TFunction_Logbook)&) const
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : MustExecute
|
||||
//purpose : Analyse in <log> if the loaded function must be executed
|
||||
//=======================================================================
|
||||
Standard_Boolean DNaming_FilletDriver::MustExecute(const TFunction_Logbook&) const
|
||||
Standard_Boolean DNaming_FilletDriver::MustExecute(const Handle(TFunction_Logbook)&) const
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
@@ -68,7 +68,7 @@ Standard_Boolean DNaming_FilletDriver::MustExecute(const TFunction_Logbook&) con
|
||||
//function : Execute
|
||||
//purpose : Execute the function and push in <log> the impacted labels
|
||||
//=======================================================================
|
||||
Standard_Integer DNaming_FilletDriver::Execute(TFunction_Logbook& theLog) const
|
||||
Standard_Integer DNaming_FilletDriver::Execute(Handle(TFunction_Logbook)& theLog) const
|
||||
{
|
||||
Handle(TFunction_Function) aFunction;
|
||||
Label().FindAttribute(TFunction_Function::GetID(),aFunction);
|
||||
@@ -160,7 +160,7 @@ Standard_Integer DNaming_FilletDriver::Execute(TFunction_Logbook& theLog) const
|
||||
// Naming
|
||||
LoadNamingDS(RESPOSITION(aFunction), aMkFillet, aCONTEXT);
|
||||
|
||||
theLog.SetValid(RESPOSITION(aFunction),Standard_True);
|
||||
theLog->SetValid(RESPOSITION(aFunction),Standard_True);
|
||||
aFunction->SetFailure(DONE);
|
||||
return 0;
|
||||
}
|
||||
|
@@ -49,17 +49,17 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT virtual void Validate (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual void Validate (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
//! If the Function label itself is modified, the function must
|
||||
//! be executed.
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Execute the function and push in <log> the impacted
|
||||
//! labels (see method SetImpacted).
|
||||
Standard_EXPORT virtual Standard_Integer Execute (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Integer Execute (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
@@ -64,14 +64,14 @@ DNaming_Line3DDriver::DNaming_Line3DDriver()
|
||||
//function : Validate
|
||||
//purpose : Validates labels of a function in <theLog>.
|
||||
//=======================================================================
|
||||
void DNaming_Line3DDriver::Validate(TFunction_Logbook&) const
|
||||
void DNaming_Line3DDriver::Validate(Handle(TFunction_Logbook)&) const
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : MustExecute
|
||||
//purpose : Analyse in <theLog> if the loaded function must be executed
|
||||
//=======================================================================
|
||||
Standard_Boolean DNaming_Line3DDriver::MustExecute(const TFunction_Logbook&) const
|
||||
Standard_Boolean DNaming_Line3DDriver::MustExecute(const Handle(TFunction_Logbook)&) const
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
@@ -80,7 +80,7 @@ Standard_Boolean DNaming_Line3DDriver::MustExecute(const TFunction_Logbook&) con
|
||||
//function : Execute
|
||||
//purpose : Execute the function
|
||||
//=======================================================================
|
||||
Standard_Integer DNaming_Line3DDriver::Execute(TFunction_Logbook& theLog) const
|
||||
Standard_Integer DNaming_Line3DDriver::Execute(Handle(TFunction_Logbook)& theLog) const
|
||||
{
|
||||
Handle(TFunction_Function) aFunction;
|
||||
Label().FindAttribute(TFunction_Function::GetID(),aFunction);
|
||||
@@ -185,7 +185,7 @@ Standard_Integer DNaming_Line3DDriver::Execute(TFunction_Logbook& theLog) const
|
||||
if(!aLocation.IsIdentity())
|
||||
TNaming::Displace(aResultLabel, aLocation, Standard_True);
|
||||
|
||||
theLog.SetValid(aResultLabel, Standard_True);
|
||||
theLog->SetValid(aResultLabel, Standard_True);
|
||||
|
||||
aFunction->SetFailure(DONE);
|
||||
return 0;
|
||||
|
@@ -49,17 +49,17 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT virtual void Validate (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual void Validate (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
//! If the Function label itself is modified, the function must
|
||||
//! be executed.
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Execute the function and push in <log> the impacted
|
||||
//! labels (see method SetImpacted).
|
||||
Standard_EXPORT virtual Standard_Integer Execute (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Integer Execute (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
@@ -455,18 +455,12 @@ static Standard_Integer DNaming_BoxDZ (Draw_Interpretor& theDI,
|
||||
return 1;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
static TFunction_Logbook& GetLogBook ()
|
||||
{
|
||||
static TFunction_Logbook myLog;
|
||||
return myLog;
|
||||
}
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : Performs the calling to a driver with the given Function ID.
|
||||
//=======================================================================
|
||||
static Standard_Integer ComputeFunction(const Handle(TFunction_Function)& theFun,
|
||||
TFunction_Logbook& theLog)
|
||||
Handle(TFunction_Logbook)& theLog)
|
||||
{
|
||||
Handle(TFunction_DriverTable) aTable = TFunction_DriverTable::Get();
|
||||
Handle(TFunction_Driver) aDriver;
|
||||
@@ -506,6 +500,7 @@ static Standard_Integer DNaming_SolveFlatFrom (Draw_Interpretor& /*theDI*/,
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "DNaming_SolveFlatFrom: Father label = " << entry << endl;
|
||||
#endif
|
||||
Handle(TFunction_Logbook) logbook = TFunction_Logbook::Set(FatherLab);
|
||||
Standard_Boolean found(Standard_False);
|
||||
TDF_ChildIterator it(FatherLab, Standard_False);
|
||||
for(;it.More(); it.Next()) {
|
||||
@@ -526,7 +521,9 @@ static Standard_Integer DNaming_SolveFlatFrom (Draw_Interpretor& /*theDI*/,
|
||||
else {
|
||||
TDF_Tool::Entry(funLabel, entry);
|
||||
try {
|
||||
Standard_Integer aRes = ComputeFunction(aFun, GetLogBook());
|
||||
// We clear the logbook because the execution starts not from the begining of the function list (some functions ar skipped).
|
||||
logbook->Clear();
|
||||
Standard_Integer aRes = ComputeFunction(aFun, logbook);
|
||||
if(aRes != 0) {
|
||||
cout << "DNaming_SolveFlatFrom: Driver failed at label = " << entry << endl;
|
||||
return 1;
|
||||
@@ -558,13 +555,14 @@ static Standard_Integer DNaming_InitLogBook (Draw_Interpretor& /*theDI*/,
|
||||
Handle(TDocStd_Document) aDoc;
|
||||
Standard_CString aDocS(theArg[1]);
|
||||
if (!DDocStd::GetDocument(aDocS, aDoc)) return 1;
|
||||
if(GetLogBook().IsEmpty()) {
|
||||
Handle(TFunction_Logbook) logbook = TFunction_Logbook::Set(aDoc->Main());
|
||||
if(logbook->IsEmpty()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "DNaming_InitLogBook : is empty" <<endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
GetLogBook().Clear();
|
||||
logbook->Clear();
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "DNaming_InitLogBook : cleaned" <<endl;
|
||||
#endif
|
||||
@@ -586,12 +584,12 @@ static Standard_Integer DNaming_CheckLogBook (Draw_Interpretor& /*theDI*/,
|
||||
if (theNb == 2) {
|
||||
Handle(TDocStd_Document) aDoc;
|
||||
Standard_CString aDocS(theArg[1]);
|
||||
if (!DDocStd::GetDocument(aDocS, aDoc)) return 1;
|
||||
if(GetLogBook().IsEmpty())
|
||||
if (!DDocStd::GetDocument(aDocS, aDoc)) return 1;
|
||||
Handle(TFunction_Logbook) logbook = TFunction_Logbook::Set(aDoc->Main());
|
||||
if(logbook->IsEmpty())
|
||||
cout << "DNaming_CheckLogBook : is empty" <<endl;
|
||||
else {
|
||||
TDF_LabelMap aMap;
|
||||
aMap = GetLogBook().GetValid();
|
||||
const TDF_LabelMap& aMap = logbook->GetValid();
|
||||
TDF_MapIteratorOfLabelMap it(aMap);
|
||||
TCollection_AsciiString entry;
|
||||
cout << "DNaming_CheckLogBook : LogBook current state:" <<endl;
|
||||
@@ -625,7 +623,8 @@ static Standard_Integer DNaming_ComputeFun (Draw_Interpretor& /*theDI*/,
|
||||
funLabel.FindAttribute(TFunction_Function::GetID(), aFun);
|
||||
if(aFun.IsNull()) return 1;
|
||||
if(!aFun.IsNull()) {
|
||||
Standard_Integer aRes = ComputeFunction(aFun, GetLogBook());
|
||||
Handle(TFunction_Logbook) logbook = TFunction_Logbook::Set(funLabel);
|
||||
Standard_Integer aRes = ComputeFunction(aFun, logbook);
|
||||
if(aRes != 0) {
|
||||
cout << "DNaming_ComputeFun : No Driver or Driver failed" << endl;
|
||||
return 1;
|
||||
@@ -2169,7 +2168,7 @@ void DNaming::ModelingCommands (Draw_Interpretor& theCommands)
|
||||
__FILE__, DNaming_AddObject, g2);
|
||||
|
||||
theCommands.Add ("AddFunction",
|
||||
"AddFunction D ObjEntry FunNane[Box|Sph|Cyl|Cut|Fuse|Prism|Revol|PMove|Fillet|Attach|XAttach]",
|
||||
"AddFunction D ObjEntry FunName[Box|Sph|Cyl|Cut|Fuse|Prism|Revol|PMove|Fillet|Attach|XAttach]",
|
||||
__FILE__, DNaming_AddFunction, g2);
|
||||
|
||||
theCommands.Add ("AddBox", "AddBox Doc dx dy dz", __FILE__, DNaming_AddBox, g2);
|
||||
|
@@ -47,14 +47,14 @@ DNaming_PointDriver::DNaming_PointDriver()
|
||||
//function : Validate
|
||||
//purpose : Validates labels of a function in <log>.
|
||||
//=======================================================================
|
||||
void DNaming_PointDriver::Validate(TFunction_Logbook&) const
|
||||
void DNaming_PointDriver::Validate(Handle(TFunction_Logbook)&) const
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : MustExecute
|
||||
//purpose : Analyse in <log> if the loaded function must be executed
|
||||
//=======================================================================
|
||||
Standard_Boolean DNaming_PointDriver::MustExecute(const TFunction_Logbook&) const
|
||||
Standard_Boolean DNaming_PointDriver::MustExecute(const Handle(TFunction_Logbook)&) const
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
@@ -63,7 +63,7 @@ Standard_Boolean DNaming_PointDriver::MustExecute(const TFunction_Logbook&) cons
|
||||
//function : Execute
|
||||
//purpose : Execute the function and push in <log> the impacted labels
|
||||
//=======================================================================
|
||||
Standard_Integer DNaming_PointDriver::Execute(TFunction_Logbook& theLog) const
|
||||
Standard_Integer DNaming_PointDriver::Execute(Handle(TFunction_Logbook)& theLog) const
|
||||
{
|
||||
Handle(TFunction_Function) aFunction;
|
||||
Label().FindAttribute(TFunction_Function::GetID(),aFunction);
|
||||
@@ -117,7 +117,7 @@ Standard_Integer DNaming_PointDriver::Execute(TFunction_Logbook& theLog) const
|
||||
if(!aLocation.IsIdentity())
|
||||
TNaming::Displace(aResultLabel, aLocation, Standard_True);
|
||||
|
||||
theLog.SetValid(aResultLabel, Standard_True);
|
||||
theLog->SetValid(aResultLabel, Standard_True);
|
||||
|
||||
aFunction->SetFailure(DONE);
|
||||
return 0;
|
||||
|
@@ -46,17 +46,17 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT virtual void Validate (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual void Validate (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
//! If the Function label itself is modified, the function must
|
||||
//! be executed.
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Execute the function and push in <log> the impacted
|
||||
//! labels (see method SetImpacted).
|
||||
Standard_EXPORT virtual Standard_Integer Execute (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Integer Execute (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
@@ -66,14 +66,14 @@ DNaming_PrismDriver::DNaming_PrismDriver()
|
||||
//function : Validate
|
||||
//purpose : Validates labels of a function in <theLog>.
|
||||
//=======================================================================
|
||||
void DNaming_PrismDriver::Validate(TFunction_Logbook&) const
|
||||
void DNaming_PrismDriver::Validate(Handle(TFunction_Logbook)&) const
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : MustExecute
|
||||
//purpose : Analyses in <theLog> if the loaded function must be executed
|
||||
//=======================================================================
|
||||
Standard_Boolean DNaming_PrismDriver::MustExecute(const TFunction_Logbook&) const
|
||||
Standard_Boolean DNaming_PrismDriver::MustExecute(const Handle(TFunction_Logbook)&) const
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
@@ -94,7 +94,7 @@ static void Write(const TopoDS_Shape& shape,
|
||||
//function : Execute
|
||||
//purpose : Executes the function
|
||||
//=======================================================================
|
||||
Standard_Integer DNaming_PrismDriver::Execute(TFunction_Logbook& theLog) const {
|
||||
Standard_Integer DNaming_PrismDriver::Execute(Handle(TFunction_Logbook)& theLog) const {
|
||||
Handle(TFunction_Function) aFunction;
|
||||
Label().FindAttribute(TFunction_Function::GetID(), aFunction);
|
||||
if(aFunction.IsNull()) return -1;
|
||||
@@ -206,7 +206,7 @@ Standard_Integer DNaming_PrismDriver::Execute(TFunction_Logbook& theLog) const {
|
||||
if(!aLocation.IsIdentity())
|
||||
TNaming::Displace(RESPOSITION(aFunction), aLocation, Standard_True);
|
||||
|
||||
theLog.SetValid(RESPOSITION(aFunction),Standard_True);
|
||||
theLog->SetValid(RESPOSITION(aFunction),Standard_True);
|
||||
aFunction->SetFailure(DONE);
|
||||
return 0;
|
||||
}
|
||||
|
@@ -49,17 +49,17 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT virtual void Validate (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual void Validate (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
//! If the Function label itself is modified, the function must
|
||||
//! be executed.
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Execute the function and push in <log> the impacted
|
||||
//! labels (see method SetImpacted).
|
||||
Standard_EXPORT virtual Standard_Integer Execute (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Integer Execute (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
@@ -70,14 +70,14 @@ DNaming_RevolutionDriver::DNaming_RevolutionDriver()
|
||||
//function : Validate
|
||||
//purpose : Validates labels of a function in <theLog>.
|
||||
//=======================================================================
|
||||
void DNaming_RevolutionDriver::Validate(TFunction_Logbook&) const
|
||||
void DNaming_RevolutionDriver::Validate(Handle(TFunction_Logbook)&) const
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : MustExecute
|
||||
//purpose : Analyses in <theLog> if the loaded function must be executed
|
||||
//=======================================================================
|
||||
Standard_Boolean DNaming_RevolutionDriver::MustExecute(const TFunction_Logbook&) const
|
||||
Standard_Boolean DNaming_RevolutionDriver::MustExecute(const Handle(TFunction_Logbook)&) const
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ Standard_Boolean DNaming_RevolutionDriver::MustExecute(const TFunction_Logbook&)
|
||||
//function : Execute
|
||||
//purpose : Executes the function
|
||||
//=======================================================================
|
||||
Standard_Integer DNaming_RevolutionDriver::Execute(TFunction_Logbook& theLog) const {
|
||||
Standard_Integer DNaming_RevolutionDriver::Execute(Handle(TFunction_Logbook)& theLog) const {
|
||||
Handle(TFunction_Function) aFunction;
|
||||
Label().FindAttribute(TFunction_Function::GetID(), aFunction);
|
||||
if(aFunction.IsNull()) return -1;
|
||||
@@ -259,7 +259,7 @@ Standard_Integer DNaming_RevolutionDriver::Execute(TFunction_Logbook& theLog) co
|
||||
if(!aLocation.IsIdentity())
|
||||
TNaming::Displace(RESPOSITION(aFunction), aLocation, Standard_True);
|
||||
|
||||
theLog.SetValid(RESPOSITION(aFunction),Standard_True);
|
||||
theLog->SetValid(RESPOSITION(aFunction),Standard_True);
|
||||
aFunction->SetFailure(DONE);
|
||||
return 0;
|
||||
}
|
||||
|
@@ -49,17 +49,17 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT virtual void Validate (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual void Validate (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
//! If the Function label itself is modified, the function must
|
||||
//! be executed.
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Execute the function and push in <log> the impacted
|
||||
//! labels (see method SetImpacted).
|
||||
Standard_EXPORT virtual Standard_Integer Execute (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Integer Execute (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
@@ -45,7 +45,7 @@ DNaming_SelectionDriver::DNaming_SelectionDriver()
|
||||
//function : Validate
|
||||
//purpose : Validates labels of a function in <theLog>.
|
||||
//=======================================================================
|
||||
void DNaming_SelectionDriver::Validate(TFunction_Logbook& ) const
|
||||
void DNaming_SelectionDriver::Validate(Handle(TFunction_Logbook)& ) const
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
@@ -53,7 +53,7 @@ void DNaming_SelectionDriver::Validate(TFunction_Logbook& ) const
|
||||
//purpose : Analyse in <theLog> if the loaded function must be
|
||||
// executed (i.e.arguments are modified) or not.
|
||||
//=======================================================================
|
||||
Standard_Boolean DNaming_SelectionDriver::MustExecute(const TFunction_Logbook& ) const {
|
||||
Standard_Boolean DNaming_SelectionDriver::MustExecute(const Handle(TFunction_Logbook)& ) const {
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ static void Write(const TopoDS_Shape& shape,
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TDF_ChildIterator.hxx>
|
||||
|
||||
Standard_Integer DNaming_SelectionDriver::Execute(TFunction_Logbook& theLog) const
|
||||
Standard_Integer DNaming_SelectionDriver::Execute(Handle(TFunction_Logbook)& theLog) const
|
||||
{
|
||||
Handle(TFunction_Function) aFunction;
|
||||
Label().FindAttribute(TFunction_Function::GetID(),aFunction);
|
||||
@@ -105,7 +105,7 @@ Standard_Integer DNaming_SelectionDriver::Execute(TFunction_Logbook& theLog) con
|
||||
TNaming_Selector aSelector(aRLabel);
|
||||
|
||||
TDF_LabelMap aMap;
|
||||
aMap = theLog.ChangeValid();
|
||||
theLog->GetValid(aMap);
|
||||
#ifdef OCCT_DEBUG
|
||||
cout <<"#E_DNaming_SelectionDriver:: Valid Label Map:"<<endl;
|
||||
TDF_MapIteratorOfLabelMap anItr(aMap);
|
||||
@@ -126,7 +126,7 @@ Standard_Integer DNaming_SelectionDriver::Execute(TFunction_Logbook& theLog) con
|
||||
//***
|
||||
|
||||
if(aSelector.Solve(aMap)) {
|
||||
theLog.SetValid(aRLabel);
|
||||
theLog->SetValid(aRLabel);
|
||||
Handle(TNaming_NamedShape) aNS;
|
||||
if(!aRLabel.FindAttribute(TNaming_NamedShape::GetID(),aNS)) {
|
||||
cout <<"%%%WARNING: DNaming_SelectionDriver::NamedShape is not found"<<endl;
|
||||
|
@@ -46,17 +46,17 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT virtual void Validate (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual void Validate (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
//! If the Function label itself is modified, the function must
|
||||
//! be executed.
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Execute the function and push in <log> the impacted
|
||||
//! labels (see method SetImpacted).
|
||||
Standard_EXPORT virtual Standard_Integer Execute (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Integer Execute (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
@@ -55,14 +55,14 @@ DNaming_SphereDriver::DNaming_SphereDriver()
|
||||
//function : Validate
|
||||
//purpose : Validates labels of a function in <theLog>
|
||||
//=======================================================================
|
||||
void DNaming_SphereDriver::Validate(TFunction_Logbook&) const
|
||||
void DNaming_SphereDriver::Validate(Handle(TFunction_Logbook)&) const
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : MustExecute
|
||||
//purpose : Analyses in <theLog> if the loaded function must be executed
|
||||
//=======================================================================
|
||||
Standard_Boolean DNaming_SphereDriver::MustExecute(const TFunction_Logbook&) const {
|
||||
Standard_Boolean DNaming_SphereDriver::MustExecute(const Handle(TFunction_Logbook)&) const {
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ Standard_Boolean DNaming_SphereDriver::MustExecute(const TFunction_Logbook&) con
|
||||
//function : Execute
|
||||
//purpose : Executes the function
|
||||
//=======================================================================
|
||||
Standard_Integer DNaming_SphereDriver::Execute(TFunction_Logbook& theLog) const {
|
||||
Standard_Integer DNaming_SphereDriver::Execute(Handle(TFunction_Logbook)& theLog) const {
|
||||
Handle(TFunction_Function) aFunction;
|
||||
Label().FindAttribute(TFunction_Function::GetID(),aFunction);
|
||||
if(aFunction.IsNull()) return -1;
|
||||
@@ -127,7 +127,7 @@ Standard_Integer DNaming_SphereDriver::Execute(TFunction_Logbook& theLog) const
|
||||
if(!aLocation.IsIdentity())
|
||||
TNaming::Displace(RESPOSITION(aFunction), aLocation, Standard_True);
|
||||
|
||||
theLog.SetValid(RESPOSITION(aFunction), Standard_True);
|
||||
theLog->SetValid(RESPOSITION(aFunction), Standard_True);
|
||||
aFunction->SetFailure(DONE);
|
||||
return 0;
|
||||
}
|
||||
|
@@ -48,17 +48,17 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT virtual void Validate (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual void Validate (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
//! If the Function label itself is modified, the function must
|
||||
//! be executed.
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Execute the function and push in <log> the impacted
|
||||
//! labels (see method SetImpacted).
|
||||
Standard_EXPORT virtual Standard_Integer Execute (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Integer Execute (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
@@ -86,14 +86,14 @@ DNaming_TransformationDriver::DNaming_TransformationDriver()
|
||||
//function : Validate
|
||||
//purpose : Validates labels of a function in <log>.
|
||||
//=======================================================================
|
||||
void DNaming_TransformationDriver::Validate(TFunction_Logbook&) const
|
||||
void DNaming_TransformationDriver::Validate(Handle(TFunction_Logbook)&) const
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : MustExecute
|
||||
//purpose : Analyse in <log> if the loaded function must be executed
|
||||
//=======================================================================
|
||||
Standard_Boolean DNaming_TransformationDriver::MustExecute(const TFunction_Logbook&) const
|
||||
Standard_Boolean DNaming_TransformationDriver::MustExecute(const Handle(TFunction_Logbook)&) const
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
@@ -103,7 +103,7 @@ Standard_Boolean DNaming_TransformationDriver::MustExecute(const TFunction_Logbo
|
||||
//function : Execute
|
||||
//purpose : Execute the function and push in <log> the impacted labels
|
||||
//=======================================================================
|
||||
Standard_Integer DNaming_TransformationDriver::Execute(TFunction_Logbook& theLog) const
|
||||
Standard_Integer DNaming_TransformationDriver::Execute(Handle(TFunction_Logbook)& theLog) const
|
||||
{
|
||||
Handle(TFunction_Function) aFunction;
|
||||
Label().FindAttribute(TFunction_Function::GetID(),aFunction);
|
||||
@@ -178,7 +178,7 @@ Standard_Integer DNaming_TransformationDriver::Execute(TFunction_Logbook& theLog
|
||||
// Naming
|
||||
LoadNamingDS(RESPOSITION(aFunction), aContextNS, aTransformation);
|
||||
|
||||
theLog.SetValid(RESPOSITION(aFunction),Standard_True);
|
||||
theLog->SetValid(RESPOSITION(aFunction),Standard_True);
|
||||
aFunction->SetFailure(DONE);
|
||||
return 0;
|
||||
}
|
||||
|
@@ -49,17 +49,17 @@ public:
|
||||
//! the valid label scope.
|
||||
//! execution of function
|
||||
//! ======================
|
||||
Standard_EXPORT virtual void Validate (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual void Validate (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Analyse in <log> if the loaded function must be executed
|
||||
//! (i.e.arguments are modified) or not.
|
||||
//! If the Function label itself is modified, the function must
|
||||
//! be executed.
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
//! Execute the function and push in <log> the impacted
|
||||
//! labels (see method SetImpacted).
|
||||
Standard_EXPORT virtual Standard_Integer Execute (TFunction_Logbook& theLog) const Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual Standard_Integer Execute (Handle(TFunction_Logbook)& theLog) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user