From: eap Date: Wed, 16 Sep 2009 12:23:27 +0000 (+0000) Subject: untabify X-Git-Tag: V4_1_0_maintainance_FINAL~25 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=c0420f934c10444cf92c36607e752a0a3a5494f4 untabify --- diff --git a/src/SMESH/SMESH_Gen.cxx b/src/SMESH/SMESH_Gen.cxx index 1f08a9776..505230676 100644 --- a/src/SMESH/SMESH_Gen.cxx +++ b/src/SMESH/SMESH_Gen.cxx @@ -51,9 +51,9 @@ using namespace std; SMESH_Gen::SMESH_Gen() { - MESSAGE("SMESH_Gen::SMESH_Gen"); - _localId = 0; - _hypId = 0; + MESSAGE("SMESH_Gen::SMESH_Gen"); + _localId = 0; + _hypId = 0; } //============================================================================= @@ -64,7 +64,7 @@ SMESH_Gen::SMESH_Gen() SMESH_Gen::~SMESH_Gen() { - MESSAGE("SMESH_Gen::~SMESH_Gen"); + MESSAGE("SMESH_Gen::~SMESH_Gen"); } //============================================================================= @@ -74,26 +74,26 @@ SMESH_Gen::~SMESH_Gen() //============================================================================= /*SMESH_Hypothesis *SMESH_Gen::CreateHypothesis(const char *anHyp, int studyId) - throw(SALOME_Exception) + throw(SALOME_Exception) { - MESSAGE("CreateHypothesis("<GetID(); - myStudyContext->mapHypothesis[hypId] = myHypothesis; - SCRUTE(studyId); - SCRUTE(hypId); + SMESH_Hypothesis *myHypothesis = _hypothesisFactory.Create(anHyp, studyId); + int hypId = myHypothesis->GetID(); + myStudyContext->mapHypothesis[hypId] = myHypothesis; + SCRUTE(studyId); + SCRUTE(hypId); - // store hypothesis in SMESHDS document + // store hypothesis in SMESHDS document - myStudyContext->myDocument->AddHypothesis(myHypothesis); - return myHypothesis; + myStudyContext->myDocument->AddHypothesis(myHypothesis); + return myHypothesis; }*/ //============================================================================= @@ -113,10 +113,10 @@ SMESH_Mesh* SMESH_Gen::CreateMesh(int theStudyId, bool theIsEmbeddedMode) // create a new SMESH_mesh object SMESH_Mesh *aMesh = new SMESH_Mesh(_localId++, - theStudyId, - this, - theIsEmbeddedMode, - aStudyContext->myDocument); + theStudyId, + this, + theIsEmbeddedMode, + aStudyContext->myDocument); aStudyContext->mapMesh[_localId] = aMesh; return aMesh; @@ -323,7 +323,7 @@ static bool checkConformIgnoredAlgos(SMESH_Mesh& aMesh, checkConformIgnoredAlgos (aMesh, (*revItSub).second, aGlobIgnoAlgo, algo, checkConform2, aCheckedMap, theErrors); int key = (*revItSub).first; - SMESH_subMesh* sm = (*revItSub).second; + SMESH_subMesh* sm = (*revItSub).second; if ( aCheckedMap.find( key ) == aCheckedMap.end() ) { aCheckedMap[ key ] = sm; @@ -653,16 +653,16 @@ SMESH_Algo *SMESH_Gen::GetAlgo(SMESH_Mesh & aMesh, StudyContextStruct *SMESH_Gen::GetStudyContext(int studyId) { - // Get studyContext, create it if it does'nt exist, with a SMESHDS_Document - - if (_mapStudyContext.find(studyId) == _mapStudyContext.end()) - { - _mapStudyContext[studyId] = new StudyContextStruct; - _mapStudyContext[studyId]->myDocument = new SMESHDS_Document(studyId); - } - StudyContextStruct *myStudyContext = _mapStudyContext[studyId]; + // Get studyContext, create it if it does'nt exist, with a SMESHDS_Document + + if (_mapStudyContext.find(studyId) == _mapStudyContext.end()) + { + _mapStudyContext[studyId] = new StudyContextStruct; + _mapStudyContext[studyId]->myDocument = new SMESHDS_Document(studyId); + } + StudyContextStruct *myStudyContext = _mapStudyContext[studyId]; // ASSERT(_mapStudyContext.find(studyId) != _mapStudyContext.end()); - return myStudyContext; + return myStudyContext; } //============================================================================= @@ -727,6 +727,6 @@ int SMESH_Gen::GetShapeDim(const TopAbs_ShapeEnum & aShapeType) int SMESH_Gen::GetANewId() { - //MESSAGE("SMESH_Gen::GetANewId"); - return _hypId++; + //MESSAGE("SMESH_Gen::GetANewId"); + return _hypId++; } diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 5a8f63ebf..6ba3217f6 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -81,22 +81,22 @@ SMESH_subMesh::SMESH_subMesh(int Id, SMESHDS_Mesh * meshDS, const TopoDS_Shape & aSubShape) { - _subShape = aSubShape; - _subMeshDS = meshDS->MeshElements(_subShape); // may be null ... - _father = father; - _Id = Id; - _dependenceAnalysed = _alwaysComputed = false; - - if (_subShape.ShapeType() == TopAbs_VERTEX) - { - _algoState = HYP_OK; - _computeState = READY_TO_COMPUTE; - } - else - { + _subShape = aSubShape; + _subMeshDS = meshDS->MeshElements(_subShape); // may be null ... + _father = father; + _Id = Id; + _dependenceAnalysed = _alwaysComputed = false; + + if (_subShape.ShapeType() == TopAbs_VERTEX) + { + _algoState = HYP_OK; + _computeState = READY_TO_COMPUTE; + } + else + { _algoState = NO_ALGO; _computeState = NOT_READY; - } + } } //============================================================================= @@ -391,7 +391,7 @@ const map < int, SMESH_subMesh * >& SMESH_subMesh::DependsOn() } case TopAbs_COMPSOLID: { - //MESSAGE("compsolid"); + //MESSAGE("compsolid"); for (TopExp_Explorer exp(_subShape, TopAbs_SOLID); exp.More(); exp.Next()) { @@ -447,7 +447,7 @@ const map < int, SMESH_subMesh * >& SMESH_subMesh::DependsOn() for (TopExp_Explorer exp(_subShape, TopAbs_VERTEX); exp.More(); exp.Next()) { - InsertDependence(exp.Current()); + InsertDependence(exp.Current()); } break; } @@ -494,8 +494,8 @@ void SMESH_subMesh::InsertDependence(const TopoDS_Shape aSubShape) const TopoDS_Shape & SMESH_subMesh::GetSubShape() const { - //MESSAGE("SMESH_subMesh::GetSubShape"); - return _subShape; + //MESSAGE("SMESH_subMesh::GetSubShape"); + return _subShape; } @@ -1141,48 +1141,48 @@ void SMESH_subMesh::CleanDependsOn() void SMESH_subMesh::DumpAlgoState(bool isMain) { - int dim = SMESH_Gen::GetShapeDim(_subShape); + int dim = SMESH_Gen::GetShapeDim(_subShape); // if (dim < 1) return; - if (isMain) - { - const map < int, SMESH_subMesh * >&subMeshes = DependsOn(); - - map < int, SMESH_subMesh * >::const_iterator itsub; - for (itsub = subMeshes.begin(); itsub != subMeshes.end(); itsub++) - { - SMESH_subMesh *sm = (*itsub).second; - sm->DumpAlgoState(false); - } - } - int type = _subShape.ShapeType(); - MESSAGE("dim = " << dim << " type of shape " << type); - switch (_algoState) - { - case NO_ALGO: - MESSAGE(" AlgoState = NO_ALGO"); - break; - case MISSING_HYP: - MESSAGE(" AlgoState = MISSING_HYP"); - break; - case HYP_OK: - MESSAGE(" AlgoState = HYP_OK"); - break; - } - switch (_computeState) - { - case NOT_READY: - MESSAGE(" ComputeState = NOT_READY"); - break; - case READY_TO_COMPUTE: - MESSAGE(" ComputeState = READY_TO_COMPUTE"); - break; - case COMPUTE_OK: - MESSAGE(" ComputeState = COMPUTE_OK"); - break; - case FAILED_TO_COMPUTE: - MESSAGE(" ComputeState = FAILED_TO_COMPUTE"); - break; - } + if (isMain) + { + const map < int, SMESH_subMesh * >&subMeshes = DependsOn(); + + map < int, SMESH_subMesh * >::const_iterator itsub; + for (itsub = subMeshes.begin(); itsub != subMeshes.end(); itsub++) + { + SMESH_subMesh *sm = (*itsub).second; + sm->DumpAlgoState(false); + } + } + int type = _subShape.ShapeType(); + MESSAGE("dim = " << dim << " type of shape " << type); + switch (_algoState) + { + case NO_ALGO: + MESSAGE(" AlgoState = NO_ALGO"); + break; + case MISSING_HYP: + MESSAGE(" AlgoState = MISSING_HYP"); + break; + case HYP_OK: + MESSAGE(" AlgoState = HYP_OK"); + break; + } + switch (_computeState) + { + case NOT_READY: + MESSAGE(" ComputeState = NOT_READY"); + break; + case READY_TO_COMPUTE: + MESSAGE(" ComputeState = READY_TO_COMPUTE"); + break; + case COMPUTE_OK: + MESSAGE(" ComputeState = COMPUTE_OK"); + break; + case FAILED_TO_COMPUTE: + MESSAGE(" ComputeState = FAILED_TO_COMPUTE"); + break; + } } //================================================================================ @@ -1277,13 +1277,13 @@ bool SMESH_subMesh::ComputeStateEngine(int event) if ( _algoState == HYP_OK ) _computeState = READY_TO_COMPUTE; break; - case COMPUTE: // nothing to do + case COMPUTE: // nothing to do break; case CLEAN: CleanDependants(); RemoveSubMeshElementsAndNodes(); break; - case SUBMESH_COMPUTED: // nothing to do + case SUBMESH_COMPUTED: // nothing to do break; case SUBMESH_RESTORED: ComputeSubMeshStateEngine( SUBMESH_RESTORED );