if (thecheckdone) return Standard_True;
if (!IsLoaded()) return Standard_False;
- Interface_Graph& CG = thegraph->CGraph();
- Interface_CheckTool cht(thegraph);
- Interface_CheckIterator checklist = cht.VerifyCheckList();
- myModel->FillSemanticChecks(checklist,Standard_False);
- if(themodelstat)
- {
- // Et on met a jour le Graphe (BitMap) ! Flag Incorrect (STX + SEM)
- Interface_BitMap& BM = CG.CBitMap();
- BM.Init (Standard_False,Flag_Incorrect);
- Standard_Integer num, nb = CG.Size();
- for (checklist.Start(); checklist.More(); checklist.Next()) {
- const Handle(Interface_Check) chk = checklist.Value();
- if (!chk->HasFailed()) continue;
- num = checklist.Number();
- if (num > 0 && num <= nb) BM.SetTrue (num,Flag_Incorrect);
- }
- for (num = 1; num <= nb; num ++)
- if (myModel->IsErrorEntity (num)) BM.SetTrue (num,Flag_Incorrect);
- }
+ //Interface_Graph& CG = thegraph->CGraph();
+ //Interface_CheckTool cht(thegraph);
+ //Interface_CheckIterator checklist = cht.VerifyCheckList();
+ //myModel->FillSemanticChecks(checklist,Standard_False);
+ //if(themodelstat)
+ //{
+ // // Et on met a jour le Graphe (BitMap) ! Flag Incorrect (STX + SEM)
+ // Interface_BitMap& BM = CG.CBitMap();
+ // BM.Init (Standard_False,Flag_Incorrect);
+ // Standard_Integer num, nb = CG.Size();
+ // for (checklist.Start(); checklist.More(); checklist.Next()) {
+ // const Handle(Interface_Check) chk = checklist.Value();
+ // if (!chk->HasFailed()) continue;
+ // num = checklist.Number();
+ // if (num > 0 && num <= nb) BM.SetTrue (num,Flag_Incorrect);
+ // }
+ // for (num = 1; num <= nb; num ++)
+ // if (myModel->IsErrorEntity (num)) BM.SetTrue (num,Flag_Incorrect);
+ //}
return Standard_True;
}
#endif
#include <stdio.h>
-static int errh = 1;
+//static int errh = 1;
static void raisecheck (Standard_Failure& theException,Handle(Interface_Check)& ach)
Standard_Integer CN;
if (thegtool->Select(ent,module,CN)) {
// Sans try/catch (fait par l appelant, evite try/catch en boucle)
- if (!errh) {
- module->CheckCase(CN,ent,sh,ach);
- return;
- }
+ //if (!errh) {
+ // module->CheckCase(CN,ent,sh,ach);
+ // return;
+ //}
// Avec try/catch
try {
OCC_CATCH_SIGNALS
Handle(Interface_InterfaceModel) model = theshare.Model();
Handle(Standard_Transient) ent = model->Value(num);
Handle(Interface_Check) ach = new Interface_Check(ent); // non filtre par "Warning" : tel quel
- errh = 1;
+ //errh = 1;
FillCheck(ent,theshare,ach);
return ach;
}
("Interface Model : Global Check");
Handle(Interface_InterfaceModel) model = theshare.Model();
if (model->GlobalCheck()->NbFails() > 0) throw Interface_CheckFailure("Interface Model : Global Check");
- Handle(Interface_Check) modchk = new Interface_Check;
- model->VerifyCheck(modchk);
- if (!model->Protocol().IsNull()) model->Protocol()->GlobalCheck (theshare.Graph(),modchk);
- if (modchk->HasFailed()) throw Interface_CheckFailure("Interface Model : Verify Check");
- if (thestat == 3) return; // tout teste et ca passe
+ //Handle(Interface_Check) modchk = new Interface_Check;
+ //model->VerifyCheck(modchk);
+ //if (!model->Protocol().IsNull()) model->Protocol()->GlobalCheck (theshare.Graph(),modchk);
+ //if (modchk->HasFailed()) throw Interface_CheckFailure("Interface Model : Verify Check");
+ //if (thestat == 3) return; // tout teste et ca passe
- errh = 0; // Pas de try/catch, car justement on raise
+ //errh = 0; // Pas de try/catch, car justement on raise
Standard_Integer nb = model->NbEntities();
for (Standard_Integer i = 1; i <= nb; i ++) {
if (model->IsErrorEntity(i)) throw Interface_CheckFailure("Interface Model : an Entity is recorded as Erroneous");
Interface_CheckIterator res;
res.SetModel(model);
Handle(Interface_Check) globch = model->GlobalCheck(); // GlobalCheck Statique
- if (!model->Protocol().IsNull()) model->Protocol()->GlobalCheck (theshare.Graph(),globch);
- model->VerifyCheck(globch); // GlobalCheck Dynamique
- if (globch->HasFailed() || globch->HasWarnings()) res.Add(globch,0);
- if (globch->HasFailed()) thestat |= 12;
+ //if (!model->Protocol().IsNull()) model->Protocol()->GlobalCheck (theshare.Graph(),globch);
+ //model->VerifyCheck(globch); // GlobalCheck Dynamique
+ //if (globch->HasFailed() || globch->HasWarnings()) res.Add(globch,0);
+ //if (globch->HasFailed()) thestat |= 12;
Standard_Integer i=0,n0 = 1, nb = model->NbEntities();
- errh = 0;
+ //errh = 0;
while (n0 <= nb) {
Handle(Interface_Check) ach = new Interface_Check;
Handle(Standard_Transient) ent;
res.SetModel(model);
Standard_Integer i=0, n0 = 1, nb = model->NbEntities();
Handle(Interface_Check) globch = model->GlobalCheck();
- if (!model->Protocol().IsNull()) model->Protocol()->GlobalCheck (theshare.Graph(),globch);
- model->VerifyCheck(globch);
- if (globch->HasFailed()) { thestat |= 12; res.Add(globch,0); }
+ //if (!model->Protocol().IsNull()) model->Protocol()->GlobalCheck (theshare.Graph(),globch);
+ //model->VerifyCheck(globch);
+ //if (globch->HasFailed()) { thestat |= 12; res.Add(globch,0); }
- errh = 0;
+ //errh = 0;
while (n0 <= nb) {
Handle(Interface_Check) ach = new Interface_Check;
Handle(Standard_Transient) ent;
res.SetModel(model);
Standard_Integer i=0, n0 = 1, nb = model->NbEntities();
- errh = 0;
+ //errh = 0;
while (n0 <= nb) {
Handle(Interface_Check) ach = new Interface_Check;
try {
res.SetModel(model);
Standard_Integer i=0, n0 = 1, nb = model->NbEntities();
- errh = 0;
+ //errh = 0;
while (n0 <= nb) {
Handle(Standard_Transient) ent;
Handle(Interface_Check) ach = new Interface_Check;
res.SetModel(model);
Standard_Integer i=0, n0 = 1, nb = model->NbEntities();
- errh = 0;
+ //errh = 0;
while (n0 <= nb) {
Handle(Interface_Check) ach = new Interface_Check;
Handle(Standard_Transient) ent;
Standard_Boolean Message_MsgFile::AddMsg (const TCollection_AsciiString& theKeyword,
const TCollection_ExtendedString& theMessage)
{
+ Standard_Mutex::Sentry aSentry(theMutex);
Message_DataMapOfExtendedString& aDataMap = ::msgsDataMap();
- Standard_Mutex::Sentry aSentry (theMutex);
+
aDataMap.Bind (theKeyword, theMessage);
return Standard_True;
}
Standard_Boolean Message_MsgFile::HasMsg (const TCollection_AsciiString& theKeyword)
{
- Standard_Mutex::Sentry aSentry (theMutex);
+ Standard_Mutex::Sentry aSentry(theMutex);
+
return ::msgsDataMap().IsBound (theKeyword);
}
const TCollection_ExtendedString &Message_MsgFile::Msg (const TCollection_AsciiString& theKeyword)
{
+ Standard_Mutex::Sentry aSentry(theMutex);
// find message in the map
Message_DataMapOfExtendedString& aDataMap = ::msgsDataMap();
- Standard_Mutex::Sentry aSentry (theMutex);
+
// if message is not found, generate error message and add it to the map to minimize overhead
// on consequent calls with the same key
#include <RWStepAP214_GeneralModule.hxx>
#include <RWStepAP214_ReadWriteModule.hxx>
#include <StepData_WriterLib.hxx>
+#include <Standard_Mutex.hxx>
static int THE_RWStepAP214_init = 0;
void RWStepAP214::Init(const Handle(StepAP214_Protocol)& theProto)
{
- if (THE_RWStepAP214_init)
- {
- return;
- }
- THE_RWStepAP214_init = 1;
- RWHeaderSection::Init();
- Interface_GeneralLib::SetGlobal (new RWStepAP214_GeneralModule, theProto);
- Interface_ReaderLib::SetGlobal (new RWStepAP214_ReadWriteModule, theProto);
- StepData_WriterLib::SetGlobal (new RWStepAP214_ReadWriteModule, theProto);
+ // static Standard_Mutex aPars;
+ // {
+
+ if (THE_RWStepAP214_init)
+ {
+ return;
+ }
+ THE_RWStepAP214_init = 1;
+ RWHeaderSection::Init();
+ Interface_GeneralLib::SetGlobal(new RWStepAP214_GeneralModule, theProto);
+ Interface_ReaderLib::SetGlobal(new RWStepAP214_ReadWriteModule, theProto);
+ StepData_WriterLib::SetGlobal(new RWStepAP214_ReadWriteModule, theProto);
+ // }
}
void StepData_StepModel::VerifyCheck(Handle(Interface_Check)& ach) const
{
- Interface_GeneralLib lib(StepData::HeaderProtocol());
+ /*Interface_GeneralLib lib(StepData::HeaderProtocol());
Handle(StepData_StepModel) me (this);
Handle(Interface_Protocol) aHP = StepData::HeaderProtocol();
Interface_ShareTool sh(me,aHP);
Handle(Standard_Transient) head = iter.Value();
if (!lib.Select(head,module,CN)) continue;
module->CheckCase(CN,head,sh,ach);
- }
+ }*/
}