From 920fe932b10ce5e9da132f0fce3be2bbef95fa3a Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 15 Feb 2016 15:08:20 +0300 Subject: [PATCH] 23237: EDF 12367 - SIGSEGV with Remove group (SMESH_Gen_i_1.cxx) IPAL53059: Not all solids are highlighted by magenta (SMESHGUI_ComputeDlg.cxx) + remove "using namespace std" from headers --- src/Controls/SMESH_Controls.cxx | 56 +++++---- src/DriverGMF/DriverGMF_Write.cxx | 8 +- src/DriverMED/DriverMED_W_Field.cxx | 10 +- src/SMDS/SMDS_Mesh.hxx | 2 +- src/SMDS/SMDS_MeshInfo.hxx | 1 - src/SMDS/SMDS_VtkVolume.cxx | 4 +- src/SMESH/SMESH_Algo.hxx | 2 +- src/SMESH/SMESH_MeshEditor.hxx | 8 +- src/SMESH/SMESH_ProxyMesh.cxx | 26 ++-- src/SMESHClient/SMESH_Client.cxx | 3 +- .../SMESHGUI_AddQuadraticElementDlg.cxx | 4 +- src/SMESHGUI/SMESHGUI_ComputeDlg.cxx | 115 +++++++++++------- src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx | 2 +- src/SMESHUtils/SMESH_Comment.hxx | 18 ++- src/SMESHUtils/SMESH_FreeBorders.cxx | 8 +- src/SMESH_I/SMESH_DumpPython.cxx | 2 +- src/SMESH_I/SMESH_Filter_i.cxx | 2 +- src/SMESH_I/SMESH_Gen_i.hxx | 32 ++--- src/SMESH_I/SMESH_Gen_i_1.cxx | 27 ++-- src/SMESH_I/SMESH_Group_i.cxx | 12 +- src/SMESH_I/SMESH_Measurements_i.cxx | 12 +- src/SMESH_I/SMESH_MeshEditor_i.cxx | 18 +-- src/SMESH_I/SMESH_MeshEditor_i.hxx | 3 +- src/SMESH_I/SMESH_Pattern_i.cxx | 2 + src/SMESH_I/SMESH_PreMeshInfo.cxx | 55 +++++---- .../StdMeshers_CompositeHexa_3D.cxx | 1 + .../StdMeshers_CompositeHexa_3D.hxx | 18 +-- src/StdMeshers/StdMeshers_FaceSide.cxx | 22 ++-- src/StdMeshers/StdMeshers_Geometric1D.cxx | 2 +- src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx | 2 + src/StdMeshers/StdMeshers_Prism_3D.hxx | 2 +- src/StdMeshers/StdMeshers_Projection_3D.cxx | 1 + .../StdMeshers_QuadFromMedialAxis_1D2D.cxx | 2 + src/StdMeshers/StdMeshers_Quadrangle_2D.hxx | 2 +- .../StdMeshers_SegmentAroundVertex_0D.cxx | 17 +-- .../StdMeshers_CartesianParameters3D_i.cxx | 12 +- src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx | 2 +- .../StdMeshers_Reversible1D_i.cxx | 2 +- 38 files changed, 282 insertions(+), 235 deletions(-) diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index 0623399e9..bc79e1fc7 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -175,7 +175,7 @@ namespace { n += q2 ^ q3; } double len = n.Modulus(); - bool zeroLen = ( len <= numeric_limits::min()); + bool zeroLen = ( len <= std::numeric_limits::min()); if ( !zeroLen ) n /= len; @@ -312,12 +312,12 @@ double NumericalFunctor::Round( const double & aVal ) */ //================================================================================ -void NumericalFunctor::GetHistogram(int nbIntervals, - std::vector& nbEvents, - std::vector& funValues, - const vector& elements, - const double* minmax, - const bool isLogarithmic) +void NumericalFunctor::GetHistogram(int nbIntervals, + std::vector& nbEvents, + std::vector& funValues, + const std::vector& elements, + const double* minmax, + const bool isLogarithmic) { if ( nbIntervals < 1 || !myMesh || @@ -336,7 +336,7 @@ void NumericalFunctor::GetHistogram(int nbIntervals, } else { - vector::const_iterator id = elements.begin(); + std::vector::const_iterator id = elements.begin(); for ( ; id != elements.end(); ++id ) values.insert( GetValue( *id )); } @@ -2163,7 +2163,7 @@ bool BareBorderVolume::IsSatisfy(long theElementId ) if ( myTool.IsFreeFace( iF )) { const SMDS_MeshNode** n = myTool.GetFaceNodes(iF); - vector< const SMDS_MeshNode*> nodes( n, n+myTool.NbFaceNodes(iF)); + std::vector< const SMDS_MeshNode*> nodes( n, n+myTool.NbFaceNodes(iF)); if ( !myMesh->FindElement( nodes, SMDSAbs_Face, /*Nomedium=*/false)) return true; } @@ -2302,15 +2302,15 @@ void CoincidentNodes::SetMesh( const SMDS_Mesh* theMesh ) while ( nIt->more() ) nodesToCheck.insert( nodesToCheck.end(), nIt->next() ); - list< list< const SMDS_MeshNode*> > nodeGroups; + std::list< std::list< const SMDS_MeshNode*> > nodeGroups; SMESH_OctreeNode::FindCoincidentNodes ( nodesToCheck, &nodeGroups, myToler ); myCoincidentIDs.Clear(); - list< list< const SMDS_MeshNode*> >::iterator groupIt = nodeGroups.begin(); + std::list< std::list< const SMDS_MeshNode*> >::iterator groupIt = nodeGroups.begin(); for ( ; groupIt != nodeGroups.end(); ++groupIt ) { - list< const SMDS_MeshNode*>& coincNodes = *groupIt; - list< const SMDS_MeshNode*>::iterator n = coincNodes.begin(); + std::list< const SMDS_MeshNode*>& coincNodes = *groupIt; + std::list< const SMDS_MeshNode*>::iterator n = coincNodes.begin(); for ( ; n != coincNodes.end(); ++n ) myCoincidentIDs.Add( (*n)->GetID() ); } @@ -2342,7 +2342,7 @@ bool CoincidentElements::IsSatisfy( long theElementId ) if ( const SMDS_MeshElement* e = myMesh->FindElement( theElementId )) { if ( e->GetType() != GetType() ) return false; - set< const SMDS_MeshNode* > elemNodes( e->begin_nodes(), e->end_nodes() ); + std::set< const SMDS_MeshNode* > elemNodes( e->begin_nodes(), e->end_nodes() ); const int nbNodes = e->NbNodes(); SMDS_ElemIteratorPtr invIt = (*elemNodes.begin())->GetInverseElementIterator( GetType() ); while ( invIt->more() ) @@ -2589,18 +2589,20 @@ bool FreeFaces::IsSatisfy( long theId ) int nbNode = aFace->NbNodes(); // collect volumes to check that number of volumes with count equal nbNode not less than 2 - typedef map< SMDS_MeshElement*, int > TMapOfVolume; // map of volume counters - typedef map< SMDS_MeshElement*, int >::iterator TItrMapOfVolume; // iterator + typedef std::map< SMDS_MeshElement*, int > TMapOfVolume; // map of volume counters + typedef std::map< SMDS_MeshElement*, int >::iterator TItrMapOfVolume; // iterator TMapOfVolume mapOfVol; SMDS_ElemIteratorPtr nodeItr = aFace->nodesIterator(); - while ( nodeItr->more() ) { + while ( nodeItr->more() ) + { const SMDS_MeshNode* aNode = static_cast(nodeItr->next()); if ( !aNode ) continue; SMDS_ElemIteratorPtr volItr = aNode->GetInverseElementIterator(SMDSAbs_Volume); - while ( volItr->more() ) { + while ( volItr->more() ) + { SMDS_MeshElement* aVol = (SMDS_MeshElement*)volItr->next(); - TItrMapOfVolume itr = mapOfVol.insert(make_pair(aVol, 0)).first; + TItrMapOfVolume itr = mapOfVol.insert( std::make_pair( aVol, 0 )).first; (*itr).second++; } } @@ -2704,8 +2706,8 @@ void GroupColor::SetMesh( const SMDS_Mesh* theMesh ) return; // iterates on groups and find necessary elements ids - const std::set& aGroups = aMesh->GetGroups(); - set::const_iterator GrIt = aGroups.begin(); + const std::set& aGroups = aMesh->GetGroups(); + std::set::const_iterator GrIt = aGroups.begin(); for (; GrIt != aGroups.end(); GrIt++) { SMESHDS_GroupBase* aGrp = (*GrIt); @@ -2932,10 +2934,10 @@ void ConnectedElements::SetPoint( double x, double y, double z ) // find myNodeID by myXYZ if possible if ( myMeshModifTracer.GetMesh() ) { - auto_ptr searcher + SMESHUtils::Deleter searcher ( SMESH_MeshAlgos::GetElementSearcher( (SMDS_Mesh&) *myMeshModifTracer.GetMesh() )); - vector< const SMDS_MeshElement* > foundElems; + std::vector< const SMDS_MeshElement* > foundElems; searcher->FindElementsByPoint( gp_Pnt(x,y,z), SMDSAbs_All, foundElems ); if ( !foundElems.empty() ) @@ -2961,7 +2963,7 @@ bool ConnectedElements::IsSatisfy( long theElementId ) if ( !node0 ) return false; - list< const SMDS_MeshNode* > nodeQueue( 1, node0 ); + std::list< const SMDS_MeshNode* > nodeQueue( 1, node0 ); std::set< int > checkedNodeIDs; // algo: // foreach node in nodeQueue: @@ -3050,8 +3052,8 @@ void CoplanarFaces::SetMesh( const SMDS_Mesh* theMesh ) const double cosTol = Cos( myToler * M_PI / 180. ); NCollection_Map< SMESH_TLink, SMESH_TLink > checkedLinks; - std::list< pair< const SMDS_MeshElement*, gp_Vec > > faceQueue; - faceQueue.push_back( make_pair( face, myNorm )); + std::list< std::pair< const SMDS_MeshElement*, gp_Vec > > faceQueue; + faceQueue.push_back( std::make_pair( face, myNorm )); while ( !faceQueue.empty() ) { face = faceQueue.front().first; @@ -3074,7 +3076,7 @@ void CoplanarFaces::SetMesh( const SMDS_Mesh* theMesh ) if (!normOK || isLessAngle( myNorm, norm, cosTol)) { myCoplanarIDs.Add( f->GetID() ); - faceQueue.push_back( make_pair( f, norm )); + faceQueue.push_back( std::make_pair( f, norm )); } } } diff --git a/src/DriverGMF/DriverGMF_Write.cxx b/src/DriverGMF/DriverGMF_Write.cxx index 963f1bc17..5beadcd17 100644 --- a/src/DriverGMF/DriverGMF_Write.cxx +++ b/src/DriverGMF/DriverGMF_Write.cxx @@ -70,9 +70,9 @@ extern "C" elem->getshapeId() ); \ }} -#define END_ELEM_WRITE_ADD_TO_MAP( elem, e2id ) \ - elem->getshapeId() ); \ - e2id.insert( e2id.end(), make_pair( elem, gmfID )); \ +#define END_ELEM_WRITE_ADD_TO_MAP( elem, e2id ) \ + elem->getshapeId() ); \ + e2id.insert( e2id.end(), std::make_pair( elem, gmfID )); \ }} #define END_EXTRA_VERTICES_WRITE() \ @@ -145,7 +145,7 @@ Driver_Mesh::Status DriverGMF_Write::Perform() const SMDS_MeshNode* n = nodeIt->next(); n->GetXYZ( xyz ); GmfSetLin( meshID, GmfVertices, xyz[0], xyz[1], xyz[2], n->getshapeId() ); - node2IdMap.insert( node2IdMap.end(), make_pair( n, ++iN )); + node2IdMap.insert( node2IdMap.end(), std::make_pair( n, ++iN )); } if ( iN != nbNodes ) return addMessage("Wrong nb of nodes returned by nodesIterator", /*fatal=*/true); diff --git a/src/DriverMED/DriverMED_W_Field.cxx b/src/DriverMED/DriverMED_W_Field.cxx index e40aac434..5fa6a6317 100644 --- a/src/DriverMED/DriverMED_W_Field.cxx +++ b/src/DriverMED/DriverMED_W_Field.cxx @@ -95,7 +95,7 @@ bool DriverMED_W_Field::Set(SMESHDS_Mesh * mesh, if ( _nbElemsByGeom.empty() || _elemType != type ) { _elemType = type; - _nbElemsByGeom.resize( 1, make_pair( SMDSEntity_Last, 0 )); + _nbElemsByGeom.resize( 1, std::make_pair( SMDSEntity_Last, 0 )); // count nb of elems of each geometry for ( int iG = 0; iG < SMDSEntity_Last; ++iG ) @@ -107,7 +107,7 @@ bool DriverMED_W_Field::Set(SMESHDS_Mesh * mesh, nbElems = mesh->GetMeshInfo().NbElements( geom ); if ( nbElems < 1 ) continue; - _nbElemsByGeom.push_back( make_pair( geom, nbElems + _nbElemsByGeom.back().second )); + _nbElemsByGeom.push_back( std::make_pair( geom, nbElems + _nbElemsByGeom.back().second )); } // add nodes of missing 0D elements on VERTEXes if ( _addODOnVertices && _elemType == SMDSAbs_0DElement ) @@ -118,8 +118,8 @@ bool DriverMED_W_Field::Set(SMESHDS_Mesh * mesh, if ( !nodes.empty() ) { if ( _nbElemsByGeom.size() == 1 ) - _nbElemsByGeom.push_back( make_pair( SMDSEntity_0D, 0)); - _nbElemsByGeom.push_back( make_pair( SMDSEntity_Node, + _nbElemsByGeom.push_back( std::make_pair( SMDSEntity_0D, 0)); + _nbElemsByGeom.push_back( std::make_pair( SMDSEntity_Node, nodes.size() + _nbElemsByGeom.back().second )); } } @@ -314,7 +314,7 @@ Driver_Mesh::Status DriverMED_W_Field::Perform() SMDSAbs_EntityType smdsType = _nbElemsByGeom[iG].first; MED::EGeometrieElement medType = (MED::EGeometrieElement) DriverMED::GetMedGeoType( smdsType ); int nbElems = _nbElemsByGeom[iG].second - _nbElemsByGeom[iG-1].second; - type2nb.insert( make_pair( medType, nbElems )); + type2nb.insert( std::make_pair( medType, nbElems )); } MED::EEntiteMaillage entity = ( _elemType == SMDSAbs_Node ? MED::eNOEUD : MED::eMAILLE ); diff --git a/src/SMDS/SMDS_Mesh.hxx b/src/SMDS/SMDS_Mesh.hxx index b561d7571..d233a00a3 100644 --- a/src/SMDS/SMDS_Mesh.hxx +++ b/src/SMDS/SMDS_Mesh.hxx @@ -747,7 +747,7 @@ public: void incrementNodesCapacity(int nbNodes); void incrementCellsCapacity(int nbCells); void adjustStructure(); - void dumpGrid(string ficdump="dumpGrid"); + void dumpGrid(std::string ficdump="dumpGrid"); static int chunkSize; //! low level modification: add, change or remove node or element diff --git a/src/SMDS/SMDS_MeshInfo.hxx b/src/SMDS/SMDS_MeshInfo.hxx index 4c6dba726..b0ccc82fa 100644 --- a/src/SMDS/SMDS_MeshInfo.hxx +++ b/src/SMDS/SMDS_MeshInfo.hxx @@ -25,7 +25,6 @@ #define SMDS_MeshInfo_HeaderFile #include -using namespace std; #include "SMESH_SMDS.hxx" diff --git a/src/SMDS/SMDS_VtkVolume.cxx b/src/SMDS/SMDS_VtkVolume.cxx index d6da43579..efc0f786c 100644 --- a/src/SMDS/SMDS_VtkVolume.cxx +++ b/src/SMDS/SMDS_VtkVolume.cxx @@ -95,7 +95,7 @@ void SMDS_VtkVolume::initPoly(const std::vector& nodeIds, SMDS_UnstructuredGrid* grid = mesh->getGrid(); //double center[3]; //this->gravityCenter(grid, &nodeIds[0], nodeIds.size(), ¢er[0]); - vector ptIds; + std::vector ptIds; vtkIdType nbFaces = nbNodesPerFace.size(); int k = 0; for (int i = 0; i < nbFaces; i++) @@ -365,7 +365,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetFaceNode(const int face_ind, const int n */ std::vector SMDS_VtkVolume::GetQuantities() const { - vector quantities; + std::vector quantities; SMDS_Mesh *mesh = SMDS_Mesh::_meshList[myMeshId]; vtkUnstructuredGrid* grid = mesh->getGrid(); vtkIdType aVtkType = grid->GetCellType(this->myVtkID); diff --git a/src/SMESH/SMESH_Algo.hxx b/src/SMESH/SMESH_Algo.hxx index 6363dc469..a362ed290 100644 --- a/src/SMESH/SMESH_Algo.hxx +++ b/src/SMESH/SMESH_Algo.hxx @@ -215,7 +215,7 @@ class SMESH_EXPORT SMESH_Algo : public SMESH_Hypothesis * have a name (type) listed in the algorithm. Hypothesis associated to * father shape -are not- taken into account (see GetUsedHypothesis) */ - const list & + const std::list & GetAppliedHypothesis(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape, const bool ignoreAuxiliary=true) const; diff --git a/src/SMESH/SMESH_MeshEditor.hxx b/src/SMESH/SMESH_MeshEditor.hxx index a2039ac8a..f9695c9a1 100644 --- a/src/SMESH/SMESH_MeshEditor.hxx +++ b/src/SMESH/SMESH_MeshEditor.hxx @@ -93,11 +93,11 @@ public: SMESH_EXPORT ElemFeatures& Init( double diameter ) { myType = SMDSAbs_Ball; myBallDiameter = diameter; return *this; } - SMESH_EXPORT ElemFeatures& Init( vector& quanities, bool isQuad=false ) + SMESH_EXPORT ElemFeatures& Init( std::vector& quanities, bool isQuad=false ) { myType = SMDSAbs_Volume; myIsPoly = 1; myIsQuad = isQuad; myPolyhedQuantities.swap( quanities ); return *this; } - SMESH_EXPORT ElemFeatures& Init( const vector& quanities, bool isQuad=false ) + SMESH_EXPORT ElemFeatures& Init( const std::vector& quanities, bool isQuad=false ) { myType = SMDSAbs_Volume; myIsPoly = 1; myIsQuad = isQuad; myPolyhedQuantities = quanities; return *this; } @@ -777,8 +777,8 @@ public: const bool theHasRefPoint, const gp_Pnt& theRefPoint, const bool theMakeGroups); - void LinearAngleVariation(const int NbSteps, - list& theAngles); + void LinearAngleVariation(const int NbSteps, + std::list& theAngles); bool doubleNodes( SMESHDS_Mesh* theMeshDS, const TIDSortedElemSet& theElems, diff --git a/src/SMESH/SMESH_ProxyMesh.cxx b/src/SMESH/SMESH_ProxyMesh.cxx index 962ba92a5..5271a6c17 100644 --- a/src/SMESH/SMESH_ProxyMesh.cxx +++ b/src/SMESH/SMESH_ProxyMesh.cxx @@ -45,7 +45,7 @@ SMESH_ProxyMesh::SMESH_ProxyMesh():_mesh(0) */ //================================================================================ -SMESH_ProxyMesh::SMESH_ProxyMesh(vector& components): +SMESH_ProxyMesh::SMESH_ProxyMesh(std::vector& components): _mesh(0) { if ( components.empty() ) return; @@ -68,8 +68,8 @@ SMESH_ProxyMesh::SMESH_ProxyMesh(vector& components): if ( _subMeshes[j] ) { // unite 2 sub-meshes - set< const SMDS_MeshElement * > elems( _subMeshes[j]->_elements.begin(), - _subMeshes[j]->_elements.end()); + std::set< const SMDS_MeshElement * > elems( _subMeshes[j]->_elements.begin(), + _subMeshes[j]->_elements.end()); elems.insert( m->_subMeshes[j]->_elements.begin(), m->_subMeshes[j]->_elements.end()); _subMeshes[j]->_elements.assign( elems.begin(), elems.end() ); @@ -103,7 +103,7 @@ SMESH_ProxyMesh::~SMESH_ProxyMesh() delete _subMeshes[i]; _subMeshes.clear(); - set< const SMDS_MeshElement* >::iterator i = _elemsInMesh.begin(); + std::set< const SMDS_MeshElement* >::iterator i = _elemsInMesh.begin(); for ( ; i != _elemsInMesh.end(); ++i ) GetMeshDS()->RemoveFreeElement( *i, 0 ); _elemsInMesh.clear(); @@ -203,12 +203,12 @@ namespace class TFilteringIterator : public SMDS_ElemIterator { - SMDS_ElemIteratorPtr _iter; - const SMDS_MeshElement * _curElem; - vector< SMDSAbs_EntityType> _okTypes; + SMDS_ElemIteratorPtr _iter; + const SMDS_MeshElement * _curElem; + std::vector< SMDSAbs_EntityType> _okTypes; public: - TFilteringIterator( const vector< SMDSAbs_EntityType>& okTypes, - const SMDS_ElemIteratorPtr& elemIterator) + TFilteringIterator( const std::vector< SMDSAbs_EntityType>& okTypes, + const SMDS_ElemIteratorPtr& elemIterator) :_iter(elemIterator), _curElem(0), _okTypes(okTypes) { next(); @@ -282,11 +282,11 @@ SMDS_ElemIteratorPtr SMESH_ProxyMesh::GetFaces() const // ... else elements filtered using allowedTypes are additionally returned SMDS_ElemIteratorPtr facesIter = GetMeshDS()->elementsIterator(SMDSAbs_Face); SMDS_ElemIteratorPtr filterIter( new TFilteringIterator( _allowedTypes, facesIter )); - vector< SMDS_ElemIteratorPtr > iters(2); + std::vector< SMDS_ElemIteratorPtr > iters(2); iters[0] = proxyIter; iters[1] = filterIter; - typedef vector< SMDS_ElemIteratorPtr > TElemIterVector; + typedef std::vector< SMDS_ElemIteratorPtr > TElemIterVector; typedef SMDS_IteratorOnIterators TItersIter; return SMDS_ElemIteratorPtr( new TItersIter( iters )); } @@ -431,7 +431,7 @@ void SMESH_ProxyMesh::removeTmpElement( const SMDS_MeshElement* elem ) { if ( elem && elem->GetID() > 0 ) { - set< const SMDS_MeshElement* >::iterator i = _elemsInMesh.find( elem ); + std::set< const SMDS_MeshElement* >::iterator i = _elemsInMesh.find( elem ); if ( i != _elemsInMesh.end() ) { GetMeshDS()->RemoveFreeElement( elem, 0 ); @@ -468,7 +468,7 @@ void SMESH_ProxyMesh::setNode2Node(const SMDS_MeshNode* srcNode, SubMesh* sm = const_cast( subMesh ); if ( !subMesh->_n2n ) sm->_n2n = new TN2NMap; - sm->_n2n->insert( make_pair( srcNode, proxyNode )); + sm->_n2n->insert( std::make_pair( srcNode, proxyNode )); } //================================================================================ diff --git a/src/SMESHClient/SMESH_Client.cxx b/src/SMESHClient/SMESH_Client.cxx index 4c9cac353..a1cee8e4e 100644 --- a/src/SMESHClient/SMESH_Client.cxx +++ b/src/SMESHClient/SMESH_Client.cxx @@ -61,6 +61,7 @@ static int MYDEBUG = 0; namespace { + using std::runtime_error; //======================================================================= //function : FindNode @@ -972,7 +973,7 @@ SMESH_Client::Update(bool theIsClear) int nbNodes = anIndexes[i++]; // nodes //ASSERT( nbNodes < 9 ); - vector aNodes( nbNodes ); + std::vector aNodes( nbNodes ); for ( int iNode = 0; iNode < nbNodes; iNode++ ) aNodes[ iNode ] = FindNode( mySMDSMesh, anIndexes[i++] ); // change diff --git a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx index deacb22f0..f28b8c95c 100644 --- a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx @@ -118,8 +118,8 @@ namespace static int FirstHexahedronIds[] = {0,1,2,3,4,5,6,7,0,1,2,3}; static int LastHexahedronIds[] = {1,2,3,0,5,6,7,4,4,5,6,7}; - static vector FirstPolygonIds; - static vector LastPolygonIds; + static std::vector FirstPolygonIds; + static std::vector LastPolygonIds; void ReverseConnectivity( std::vector & ids, SMDSAbs_EntityType type, bool toReverse, // inverse element diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx index 6f509bc17..e9bb818eb 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx @@ -108,6 +108,7 @@ #define MARGIN 11 #define COLONIZE(str) (QString(str).contains(":") > 0 ? QString(str) : QString(str) + " :" ) +#define __SHAPE_RGB__ 250, 0, 250 enum TCol { COL_ALGO = 0, COL_SHAPE, COL_ERROR, COL_SHAPEID, COL_PUBLISHED, COL_BAD_MESH, NB_COLUMNS @@ -147,10 +148,10 @@ namespace SMESH { myProperty = vtkProperty::New(); myProperty->SetRepresentationToWireframe(); - myProperty->SetColor( 250, 0, 250 ); - myProperty->SetAmbientColor( 250, 0, 250 ); - myProperty->SetDiffuseColor( 250, 0, 250 ); - //myProperty->SetSpecularColor( 250, 0, 250 ); + myProperty->SetColor( __SHAPE_RGB__ ); + myProperty->SetAmbientColor( __SHAPE_RGB__ ); + myProperty->SetDiffuseColor( __SHAPE_RGB__ ); + //myProperty->SetSpecularColor( __SHAPE_RGB__ ); myProperty->SetLineWidth( 5 ); } // ----------------------------------------------------------------------- @@ -278,13 +279,18 @@ namespace SMESH actor = GEOM_Actor::New(); if ( actor ) { actor->SetShape(shape,0,0); - actor->SetProperty(myProperty); - actor->SetShadingProperty(myProperty); - actor->SetWireframeProperty(myProperty); - actor->SetPreviewProperty(myProperty); + // actor->SetProperty(myProperty); + // actor->SetShadingProperty(myProperty); + // actor->SetWireframeProperty(myProperty); + // actor->SetPreviewProperty(myProperty); actor->PickableOff(); - // if ( shape.ShapeType() == TopAbs_EDGE ) - // actor->SubShapeOn(); + // + actor->SetWidth( myProperty->GetLineWidth() ); + actor->SetIsosWidth( myProperty->GetLineWidth() ); + actor->SetIsosColor( __SHAPE_RGB__ ); + actor->SetColor( __SHAPE_RGB__ ); + // if ( shape.ShapeType() == TopAbs_EDGE ) + // actor->SubShapeOn(); myViewWindow->AddActor( actor ); } } @@ -736,10 +742,11 @@ void SMESHGUI_ComputeDlg_QThread::cancel() //================================================================================ //================================================================================ -SMESHGUI_ComputeDlg_QThreadQDialog::SMESHGUI_ComputeDlg_QThreadQDialog(QWidget * parent, - SMESH::SMESH_Gen_var gen, - SMESH::SMESH_Mesh_var mesh, - GEOM::GEOM_Object_var mainShape) +SMESHGUI_ComputeDlg_QThreadQDialog:: +SMESHGUI_ComputeDlg_QThreadQDialog(QWidget * parent, + SMESH::SMESH_Gen_var gen, + SMESH::SMESH_Mesh_var mesh, + GEOM::GEOM_Object_var mainShape) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint | @@ -920,23 +927,28 @@ void SMESHGUI_BaseComputeOp::computeMesh() if ( !memoryLack ) { // List of objects that will be updated automatically - QList< QPair< SMESH::SMESH_IDSource_var, _PTR(SObject) > > aListToUpdate; - SMESH::SMESH_IDSource_var aMeshObj = SMESH::SObjectToInterface( aMeshSObj ); + typedef QList< QPair< SMESH::SMESH_IDSource_var, _PTR(SObject) > > TListOf_IDSrc_SObj; + TListOf_IDSrc_SObj aListToUpdate; + SMESH::SMESH_IDSource_var aMeshObj = + SMESH::SObjectToInterface( aMeshSObj ); // put Mesh into list - aListToUpdate.append( QPair< SMESH::SMESH_IDSource_var, _PTR(SObject) >(aMeshObj, aMeshSObj) ); + aListToUpdate.append( TListOf_IDSrc_SObj::value_type( aMeshObj, aMeshSObj )); SMESH::submesh_array_var aSubMeshes = myMesh->GetSubMeshes(); // put SubMeshes into list - for ( CORBA::ULong i = 0; i < aSubMeshes->length(); i++ ) { + for ( CORBA::ULong i = 0; i < aSubMeshes->length(); i++ ) + { SMESH::SMESH_subMesh_var sm = aSubMeshes[i]; if ( CORBA::is_nil( sm ) ) continue; _PTR(SObject) smSObj = SMESH::ObjectToSObject( sm ); if ( !smSObj ) continue; - SMESH::SMESH_IDSource_var aSubMeshObj = SMESH::SObjectToInterface( smSObj ); - aListToUpdate.append( QPair< SMESH::SMESH_IDSource_var, _PTR(SObject) >(aSubMeshObj, smSObj) ); + SMESH::SMESH_IDSource_var aSubMeshObj = + SMESH::SObjectToInterface( smSObj ); + aListToUpdate.append( TListOf_IDSrc_SObj::value_type( aSubMeshObj, smSObj )); } // put Groups into list - SMESH::ListOfGroups_var aGroups = myMesh->GetGroups(); - for ( size_t i = 0; i < aGroups->length(); ++i ) { + SMESH::ListOfGroups_var aGroups = myMesh->GetGroups(); + for ( size_t i = 0; i < aGroups->length(); ++i ) + { SMESH::SMESH_GroupBase_var aGrp = aGroups[i]; if ( CORBA::is_nil( aGrp ) ) continue; SMESH::SMESH_Group_var aStdGroup = SMESH::SMESH_Group::_narrow( aGrp ); @@ -945,26 +957,31 @@ void SMESHGUI_BaseComputeOp::computeMesh() if ( !aStdGroup->_is_nil() ) continue; // don't update the standalone groups _PTR(SObject) aGroupSO = SMESH::FindSObject( aGrp ); if ( !aGroupSO ) continue; - SMESH::SMESH_IDSource_var aGroupObj = SMESH::SObjectToInterface( aGroupSO ); - aListToUpdate.append( QPair< SMESH::SMESH_IDSource_var, _PTR(SObject) >(aGroupObj, aGroupSO) ); + SMESH::SMESH_IDSource_var aGroupObj = + SMESH::SObjectToInterface( aGroupSO ); + aListToUpdate.append( TListOf_IDSrc_SObj::value_type( aGroupObj, aGroupSO )); } // update mesh, sub-mesh and groups, if it's possible - QList< QPair< SMESH::SMESH_IDSource_var, _PTR(SObject) > >::iterator anIter; - for( anIter = aListToUpdate.begin(); anIter != aListToUpdate.end(); anIter++ ) { - SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( SMESH::SObjectToObject( (*anIter).second )); - if ( getSMESHGUI()->automaticUpdate( (*anIter).first, &entities, &limitExceeded, &hidden, &nbElements ) ) + TListOf_IDSrc_SObj::iterator anIter; + for ( anIter = aListToUpdate.begin(); anIter != aListToUpdate.end(); anIter++ ) + { + SMESH::SMESH_Mesh_var aMesh = + SMESH::SMESH_Mesh::_narrow( SMESH::SObjectToObject( (*anIter).second )); + + if ( getSMESHGUI()->automaticUpdate( (*anIter).first, &entities, &limitExceeded, + &hidden, &nbElements ) ) { try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 OCC_CATCH_SIGNALS; -#endif bool toDisplay = false; - - if ( !aMesh->_is_nil() ) { // display a mesh only + if ( !aMesh->_is_nil() ) // display only a mesh + { toDisplay = true; SMESH_Actor *anActor = SMESH::FindActorByObject( aMesh ); - if ( !anActor ) anActor = SMESH::CreateActor( (*anIter).second->GetStudy(), (*anIter).second->GetID().c_str(), true ); + if ( !anActor ) anActor = SMESH::CreateActor( (*anIter).second->GetStudy(), + (*anIter).second->GetID().c_str(), + /*clearLog =*/ true ); if ( anActor ) // actor is not created for an empty mesh { anActor->SetEntityMode( entities ); @@ -985,7 +1002,10 @@ void SMESHGUI_BaseComputeOp::computeMesh() if ( hidden & SMESH_Actor::eBallElem ) hiddenMsg << tr( "SMESH_BALLS" ); SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ), - tr( "SMESH_WRN_SIZE_INC_LIMIT_EXCEEDED" ).arg( nbElements ).arg( limitSize ).arg( hiddenMsg.join(", ") ) ); + tr( "SMESH_WRN_SIZE_INC_LIMIT_EXCEEDED" ). + arg( nbElements ). + arg( limitSize ). + arg( hiddenMsg.join(", "))); } } catch (...) { @@ -1004,12 +1024,12 @@ void SMESHGUI_BaseComputeOp::computeMesh() { SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ), - tr( "SMESH_WRN_SIZE_LIMIT_EXCEEDED" ).arg( nbElements ).arg( limitSize ) ); + tr( "SMESH_WRN_SIZE_LIMIT_EXCEEDED" ). + arg( nbElements ).arg( limitSize ) ); } } } - LightApp_SelectionMgr *Sel = selectionMgr(); - if ( Sel ) + if ( LightApp_SelectionMgr *Sel = selectionMgr() ) { SALOME_ListIO selected; selected.Append( myIObject ); @@ -1021,10 +1041,11 @@ void SMESHGUI_BaseComputeOp::computeMesh() if ( memoryLack ) aMemoryReserve.release(); - myCompDlg->setWindowTitle(tr( computeFailed ? "SMESH_WRN_COMPUTE_FAILED" : "SMESH_COMPUTE_SUCCEED")); + myCompDlg->setWindowTitle + ( tr( computeFailed ? "SMESH_WRN_COMPUTE_FAILED" : "SMESH_COMPUTE_SUCCEED" )); // SHOW ERRORS - + bool noCompError = ( !aCompErrors.operator->() || aCompErrors->length() == 0 ); bool noHypoError = ( aHypErrors.isEmpty() ); @@ -1238,8 +1259,9 @@ void SMESHGUI_BaseComputeOp::onPublishShape() if ( !SMESH::getSubShapeSO( 1, myMainShape )) // the main shape not published { QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( myMainShape, "MAIN_SHAPE" )); - SALOMEDS::SObject_wrap so = - geomGen->AddInStudy( study, myMainShape, name.toLatin1().data(), GEOM::GEOM_Object::_nil()); + SALOMEDS::SObject_wrap so = geomGen->AddInStudy( study, myMainShape, + name.toLatin1().data(), + GEOM::GEOM_Object::_nil()); // look for myMainShape in the table for ( int r = 0, nr = table()->rowCount(); r < nr; ++r ) { if ( table()->item( r, COL_SHAPEID )->text() == "1" ) { @@ -1256,7 +1278,8 @@ void SMESHGUI_BaseComputeOp::onPublishShape() if ( curSub == 1 ) continue; } QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( shape, "ERROR_SHAPE" )); - SALOMEDS::SObject_wrap so = geomGen->AddInStudy( study, shape, name.toLatin1().data(), myMainShape); + SALOMEDS::SObject_wrap so = geomGen->AddInStudy( study, shape, + name.toLatin1().data(), myMainShape); if ( !so->_is_nil() ) { CORBA::String_var name = so->GetName(); CORBA::String_var entry = so->GetID(); @@ -1999,7 +2022,8 @@ void SMESHGUI_PrecomputeOp::onPreview() if ( isShowError ) { myDlg->hide(); - aCompDlg->setWindowTitle(tr( computeFailed ? "SMESH_WRN_COMPUTE_FAILED" : "SMESH_COMPUTE_SUCCEED")); + aCompDlg->setWindowTitle + ( tr( computeFailed ? "SMESH_WRN_COMPUTE_FAILED" : "SMESH_COMPUTE_SUCCEED" )); showComputeResult( memoryLack, noCompError, aCompErrors, noHypoError, aHypErrors ); } } @@ -2202,10 +2226,11 @@ void SMESHGUI_BaseComputeOp::evaluateMesh() aMemoryReserve.release(); evaluateFailed = ( aCompErrors->length() > 0 ); - myCompDlg->setWindowTitle(tr( evaluateFailed ? "SMESH_WRN_EVALUATE_FAILED" : "SMESH_EVALUATE_SUCCEED")); + myCompDlg->setWindowTitle + ( tr( evaluateFailed ? "SMESH_WRN_EVALUATE_FAILED" : "SMESH_EVALUATE_SUCCEED" )); // SHOW ERRORS - + bool noCompError = ( !aCompErrors.operator->() || aCompErrors->length() == 0 ); bool noHypoError = ( aHypErrors.isEmpty() ); diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx index d598d95e9..ffae8359b 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx @@ -1852,7 +1852,7 @@ void SMESHGUI_SplitVolumesDlg::showFacetByElement( int elemID ) gp_XYZ bc( 0,0,0 ); Bnd_B3d bbox; SMDS_NodeIteratorPtr nIt = elem->nodeIterator(); - vector< const SMDS_MeshNode* > nodes; + std::vector< const SMDS_MeshNode* > nodes; nodes.reserve( elem->NbNodes() ); while ( nIt->more() ) { diff --git a/src/SMESHUtils/SMESH_Comment.hxx b/src/SMESHUtils/SMESH_Comment.hxx index 5e6420fda..bb4c9b487 100644 --- a/src/SMESHUtils/SMESH_Comment.hxx +++ b/src/SMESHUtils/SMESH_Comment.hxx @@ -30,40 +30,38 @@ # include # include -using namespace std; - /*! * \brief Class to generate string from any type */ -class SMESH_Comment : public string +class SMESH_Comment : public std::string { - ostringstream _s ; + std::ostringstream _s ; public : - SMESH_Comment():string("") {} + SMESH_Comment():std::string("") {} - SMESH_Comment(const SMESH_Comment& c):string() { + SMESH_Comment(const SMESH_Comment& c):std::string() { _s << c.c_str() ; - this->string::operator=( _s.str() ); + this->std::string::operator=( _s.str() ); } SMESH_Comment & operator=(const SMESH_Comment& c) { _s << c.c_str() ; - this->string::operator=( _s.str() ); + this->std::string::operator=( _s.str() ); return *this; } template SMESH_Comment( const T &anything ) { _s << anything ; - this->string::operator=( _s.str() ); + this->std::string::operator=( _s.str() ); } template SMESH_Comment & operator<<( const T &anything ) { _s << anything ; - this->string::operator=( _s.str() ); + this->std::string::operator=( _s.str() ); return *this ; } diff --git a/src/SMESHUtils/SMESH_FreeBorders.cxx b/src/SMESHUtils/SMESH_FreeBorders.cxx index 52018179e..87951012c 100644 --- a/src/SMESHUtils/SMESH_FreeBorders.cxx +++ b/src/SMESHUtils/SMESH_FreeBorders.cxx @@ -290,7 +290,7 @@ namespace void BNode::AddClose ( const BEdge* e, double u ) const { if ( ! e->Contains( this )) - myCloseEdges.push_back( make_pair( const_cast< BEdge* >( e ), u )); + myCloseEdges.push_back( std::make_pair( const_cast< BEdge* >( e ), u )); } BEdge* BNode::GetCloseEdgeOfBorder( int borderID, double * uPtr ) const { @@ -569,9 +569,9 @@ void SMESH_MeshAlgos::FindCoincidentFreeBorders(SMDS_Mesh& mesh, // form groups of coincident parts of free borders - TFreeBorderPart part; - TCoincidentGroup group; - vector< BEdge* > ranges; // couples of edges delimiting parts + TFreeBorderPart part; + TCoincidentGroup group; + std::vector< BEdge* > ranges; // couples of edges delimiting parts BEdge* be = 0; // a current edge int skipGroup = bEdges.size(); // a group ID used to avoid repeating treatment of edges diff --git a/src/SMESH_I/SMESH_DumpPython.cxx b/src/SMESH_I/SMESH_DumpPython.cxx index 187055df5..8b589ce00 100644 --- a/src/SMESH_I/SMESH_DumpPython.cxx +++ b/src/SMESH_I/SMESH_DumpPython.cxx @@ -1297,7 +1297,7 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl TCollection_AsciiString aLongString, aFunctionType; int where = 1; - set< string > functionNameSet; + std::set< std::string > functionNameSet; while ( SMESH::TPythonDump::CutoutLongString( anUpdatedScript, where, aLongString, aFunctionType )) { // make a python string literal diff --git a/src/SMESH_I/SMESH_Filter_i.cxx b/src/SMESH_I/SMESH_Filter_i.cxx index 36808eed4..42db79ef4 100644 --- a/src/SMESH_I/SMESH_Filter_i.cxx +++ b/src/SMESH_I/SMESH_Filter_i.cxx @@ -1628,7 +1628,7 @@ void ConnectedElements_i::SetThreshold ( const char* { case SMESH::ConnectedElements::POINT: // read 3 node coordinates /////////////////// { - vector< double > xyz; + std::vector< double > xyz; char* endptr; do { diff --git a/src/SMESH_I/SMESH_Gen_i.hxx b/src/SMESH_I/SMESH_Gen_i.hxx index e2be6042d..b60ef8d24 100644 --- a/src/SMESH_I/SMESH_Gen_i.hxx +++ b/src/SMESH_I/SMESH_Gen_i.hxx @@ -71,16 +71,16 @@ public: mapIdToId.clear(); } // register object in the internal map and return its id - int addObject( string theIOR ) + int addObject( std::string theIOR ) { int nextId = getNextId(); mapIdToIOR[ nextId ] = theIOR; return nextId; } // find the object id in the internal map by the IOR - int findId( string theIOR ) + int findId( std::string theIOR ) { - map::iterator imap; + std::map::iterator imap; for ( imap = mapIdToIOR.begin(); imap != mapIdToIOR.end(); ++imap ) { if ( imap->second == theIOR ) return imap->first; @@ -88,18 +88,18 @@ public: return 0; } // get object's IOR by id - string getIORbyId( const int theId ) + std::string getIORbyId( const int theId ) { if ( mapIdToIOR.find( theId ) != mapIdToIOR.end() ) return mapIdToIOR[ theId ]; - return string( "" ); + return std::string( "" ); } // get object's IOR by old id - string getIORbyOldId( const int theOldId ) + std::string getIORbyOldId( const int theOldId ) { if ( mapIdToId.find( theOldId ) != mapIdToId.end() ) return getIORbyId( mapIdToId[ theOldId ] ); - return string( "" ); + return std::string( "" ); } // maps old object id to the new one (used when restoring data) void mapOldToNew( const int oldId, const int newId ) { @@ -107,7 +107,7 @@ public: } // get old id by a new one int getOldId( const int newId ) { - map::iterator imap; + std::map::iterator imap; for ( imap = mapIdToId.begin(); imap != mapIdToId.end(); ++imap ) { if ( imap->second == newId ) return imap->first; @@ -125,8 +125,8 @@ private: return id; } - map mapIdToIOR; // persistent-to-transient map - map mapIdToId; // used to translate object from persistent to transient form + std::map mapIdToIOR; // persistent-to-transient map + std::map mapIdToId; // to translate object from persistent to transient form }; // =========================================================== @@ -568,7 +568,7 @@ public: typename TInterface::_var_type GetObjectByOldId( const int oldID ) { if ( StudyContext* myStudyContext = GetCurrentStudyContext() ) { - string ior = myStudyContext->getIORbyOldId( oldID ); + std::string ior = myStudyContext->getIORbyOldId( oldID ); if ( !ior.empty() ) return TInterface::_narrow(GetORB()->string_to_object( ior.c_str() )); } @@ -671,13 +671,13 @@ private: ::SMESH_Gen myGen; // SMESH_Gen local implementation // hypotheses managing - map myHypCreatorMap; + std::map myHypCreatorMap; - map myStudyContextMap; // Map of study context objects + std::map myStudyContextMap; // Map of study context objects - GEOM_Client* myShapeReader; // Shape reader - SALOMEDS::Study_var myCurrentStudy; // Current study - CORBA::Boolean myIsEmbeddedMode; // Current mode + GEOM_Client* myShapeReader; // Shape reader + SALOMEDS::Study_var myCurrentStudy; // Current study + CORBA::Boolean myIsEmbeddedMode; // Current mode // Default color of groups std::string myDefaultGroupColor; diff --git a/src/SMESH_I/SMESH_Gen_i_1.cxx b/src/SMESH_I/SMESH_Gen_i_1.cxx index 66422047d..322b13d58 100644 --- a/src/SMESH_I/SMESH_Gen_i_1.cxx +++ b/src/SMESH_I/SMESH_Gen_i_1.cxx @@ -47,12 +47,12 @@ #ifdef _DEBUG_ static int MYDEBUG = 0; -//static int VARIABLE_DEBUG = 0; #else static int MYDEBUG = 0; -//static int VARIABLE_DEBUG = 0; #endif +using namespace std; + //============================================================================= /*! * Get...Tag [ static ] @@ -281,7 +281,8 @@ static SALOMEDS::SObject_ptr publish(SALOMEDS::Study_ptr theStudy, SALOMEDS::SObject_wrap curObj; if ( theFatherObject->GetLastChildTag() > theTag ) { - SALOMEDS::UseCaseIterator_wrap anUseCaseIter = useCaseBuilder->GetUseCaseIterator(theFatherObject); + SALOMEDS::UseCaseIterator_wrap + anUseCaseIter = useCaseBuilder->GetUseCaseIterator(theFatherObject); for ( ; anUseCaseIter->More(); anUseCaseIter->Next() ) { curObj = anUseCaseIter->Value(); if ( curObj->Tag() > theTag ) { @@ -294,21 +295,29 @@ static SALOMEDS::SObject_ptr publish(SALOMEDS::Study_ptr theStudy, } SALOMEDS::GenericAttribute_wrap anAttr; - if ( !CORBA::is_nil( theIOR )) { + if ( !CORBA::is_nil( theIOR )) + { anAttr = aStudyBuilder->FindOrCreateAttribute( SO, "AttributeIOR" ); CORBA::String_var objStr = SMESH_Gen_i::GetORB()->object_to_string( theIOR ); SALOMEDS::AttributeIOR_wrap iorAttr = anAttr; - iorAttr->SetValue( objStr.in() ); - // UnRegister() !!! - SALOME::GenericObj_var genObj = SALOME::GenericObj::_narrow( theIOR ); - if ( !genObj->_is_nil() ) - genObj->UnRegister(); + CORBA::String_var objStrCur = iorAttr->Value(); + bool sameIOR = ( objStrCur.in() && strcmp( objStr.in(), objStrCur.in() ) == 0 ); + if ( !sameIOR ) + { + iorAttr->SetValue( objStr.in() ); + // UnRegister() !!! + SALOME::GenericObj_var genObj = SALOME::GenericObj::_narrow( theIOR ); + if ( !genObj->_is_nil() ) + genObj->UnRegister(); + } } + if ( thePixMap ) { anAttr = aStudyBuilder->FindOrCreateAttribute( SO, "AttributePixMap" ); SALOMEDS::AttributePixMap_wrap pm = anAttr; pm->SetPixMap( thePixMap ); } + if ( !theSelectable ) { anAttr = aStudyBuilder->FindOrCreateAttribute( SO, "AttributeSelectable" ); SALOMEDS::AttributeSelectable_wrap selAttr = anAttr; diff --git a/src/SMESH_I/SMESH_Group_i.cxx b/src/SMESH_I/SMESH_Group_i.cxx index 9d3b3ee02..8bae7fb5b 100644 --- a/src/SMESH_I/SMESH_Group_i.cxx +++ b/src/SMESH_I/SMESH_Group_i.cxx @@ -502,8 +502,8 @@ namespace */ //================================================================================ - void getNodesOfElements(SMDS_ElemIteratorPtr elemIt, - set& nodes) + void getNodesOfElements(SMDS_ElemIteratorPtr elemIt, + std::set& nodes) { while ( elemIt->more() ) { @@ -531,7 +531,7 @@ CORBA::Long SMESH_GroupBase_i::GetNumberOfNodes() { if ( myNbNodes < 0 || g->GetTic() != myGroupDSTic ) { - set nodes; + std::set nodes; getNodesOfElements( g->GetElements(), nodes ); myNbNodes = nodes.size(); myGroupDSTic = g->GetTic(); @@ -574,10 +574,10 @@ SMESH::long_array* SMESH_GroupBase_i::GetNodeIDs() SMESH::long_array_var aRes = new SMESH::long_array(); if ( SMESHDS_GroupBase* g = GetGroupDS()) { - set nodes; + std::set nodes; getNodesOfElements( g->GetElements(), nodes ); aRes->length( nodes.size() ); - set::iterator nIt = nodes.begin(), nEnd = nodes.end(); + std::set::iterator nIt = nodes.begin(), nEnd = nodes.end(); for ( int i = 0; nIt != nEnd; ++nIt, ++i ) aRes[i] = (*nIt)->GetID(); } @@ -918,7 +918,7 @@ SMESH::long_array* SMESH_GroupOnFilter_i::GetMeshInfo() if ( g->GetType() != SMDSAbs_Node ) { - vector< int > nbElems = static_cast< SMESHDS_GroupOnFilter* >( g )->GetMeshInfo(); + std::vector< int > nbElems = static_cast< SMESHDS_GroupOnFilter* >( g )->GetMeshInfo(); for ( size_t i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++) if ( i < nbElems.size() ) aRes[i] = nbElems[ i ]; diff --git a/src/SMESH_I/SMESH_Measurements_i.cxx b/src/SMESH_I/SMESH_Measurements_i.cxx index b17fc6c4a..8da1cd7cf 100644 --- a/src/SMESH_I/SMESH_Measurements_i.cxx +++ b/src/SMESH_I/SMESH_Measurements_i.cxx @@ -221,12 +221,12 @@ static void enlargeBoundingBox(const SMDS_MeshNode* theNode, theMeasure.node1 = theNode->GetID(); } else { - theMeasure.minX = min( theMeasure.minX, theNode->X() ); - theMeasure.maxX = max( theMeasure.maxX, theNode->X() ); - theMeasure.minY = min( theMeasure.minY, theNode->Y() ); - theMeasure.maxY = max( theMeasure.maxY, theNode->Y() ); - theMeasure.minZ = min( theMeasure.minZ, theNode->Z() ); - theMeasure.maxZ = max( theMeasure.maxZ, theNode->Z() ); + theMeasure.minX = std::min( theMeasure.minX, theNode->X() ); + theMeasure.maxX = std::max( theMeasure.maxX, theNode->X() ); + theMeasure.minY = std::min( theMeasure.minY, theNode->Y() ); + theMeasure.maxY = std::max( theMeasure.maxY, theNode->Y() ); + theMeasure.minZ = std::min( theMeasure.minZ, theNode->Z() ); + theMeasure.maxZ = std::max( theMeasure.maxZ, theNode->Z() ); } } diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index bd08f9d67..76a5d6d16 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -5249,10 +5249,10 @@ void SMESH_MeshEditor_i::dumpGroupsList(TPythonDump & theDumpPytho */ //================================================================================ -string SMESH_MeshEditor_i::generateGroupName(const string& thePrefix) +std::string SMESH_MeshEditor_i::generateGroupName(const std::string& thePrefix) { SMESH::ListOfGroups_var groups = myMesh_i->GetGroups(); - set groupNames; + set groupNames; // Get existing group names for (int i = 0, nbGroups = groups->length(); i < nbGroups; i++ ) { @@ -5265,7 +5265,7 @@ string SMESH_MeshEditor_i::generateGroupName(const string& thePrefix) } // Find new name - string name = thePrefix; + std::string name = thePrefix; int index = 0; while (!groupNames.insert(name).second) @@ -5573,8 +5573,8 @@ SMESH_MeshEditor_i::DoubleNodeGroupNew( SMESH::SMESH_GroupBase_ptr theNodes, // Create group with newly created nodes SMESH::long_array_var anIds = GetLastCreatedNodes(); if (anIds->length() > 0) { - string anUnindexedName (theNodes->GetName()); - string aNewName = generateGroupName(anUnindexedName + "_double"); + std::string anUnindexedName (theNodes->GetName()); + std::string aNewName = generateGroupName(anUnindexedName + "_double"); aNewGroup = myMesh_i->CreateGroup(SMESH::NODE, aNewName.c_str()); aNewGroup->Add(anIds); pyDump << aNewGroup << " = "; @@ -5672,8 +5672,8 @@ SMESH_MeshEditor_i::DoubleNodeGroupsNew( const SMESH::ListOfGroups& theNodes, // Create group with newly created nodes SMESH::long_array_var anIds = GetLastCreatedNodes(); if (anIds->length() > 0) { - string anUnindexedName (theNodes[0]->GetName()); - string aNewName = generateGroupName(anUnindexedName + "_double"); + std::string anUnindexedName (theNodes[0]->GetName()); + std::string aNewName = generateGroupName(anUnindexedName + "_double"); aNewGroup = myMesh_i->CreateGroup(SMESH::NODE, aNewName.c_str()); aNewGroup->Add(anIds); pyDump << aNewGroup << " = "; @@ -5897,7 +5897,7 @@ SMESH_MeshEditor_i::DoubleNodeElemGroup2New(SMESH::SMESH_GroupBase_ptr theElems, { // Create group with newly created elements CORBA::String_var elemGroupName = theElems->GetName(); - string aNewName = generateGroupName( string(elemGroupName.in()) + "_double"); + std::string aNewName = generateGroupName( std::string(elemGroupName.in()) + "_double"); if ( !getEditor().GetLastCreatedElems().IsEmpty() && theElemGroupNeeded ) { SMESH::long_array_var anIds = GetLastCreatedElems(); @@ -6129,7 +6129,7 @@ SMESH_MeshEditor_i::DoubleNodeElemGroups2New(const SMESH::ListOfGroups& theElems { // Create group with newly created elements CORBA::String_var elemGroupName = theElems[0]->GetName(); - string aNewName = generateGroupName( string(elemGroupName.in()) + "_double"); + std::string aNewName = generateGroupName( std::string(elemGroupName.in()) + "_double"); if ( !getEditor().GetLastCreatedElems().IsEmpty() && theElemGroupNeeded ) { SMESH::long_array_var anIds = GetLastCreatedElems(); diff --git a/src/SMESH_I/SMESH_MeshEditor_i.hxx b/src/SMESH_I/SMESH_MeshEditor_i.hxx index 3c36508b8..e657c5f61 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.hxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.hxx @@ -37,6 +37,7 @@ #include "SMESH_PythonDump.hxx" #include "SMESH_MeshEditor.hxx" #include +#include class SMESH_Mesh_i; @@ -897,7 +898,7 @@ private: //!< private methods void dumpGroupsList(SMESH::TPythonDump & theDumpPython, const SMESH::ListOfGroups * theGroupList); - string generateGroupName(const string& thePrefix); + std::string generateGroupName(const std::string& thePrefix); void prepareIdSource(SMESH::SMESH_IDSource_ptr theObject); diff --git a/src/SMESH_I/SMESH_Pattern_i.cxx b/src/SMESH_I/SMESH_Pattern_i.cxx index 511433f6f..40d68e5b9 100644 --- a/src/SMESH_I/SMESH_Pattern_i.cxx +++ b/src/SMESH_I/SMESH_Pattern_i.cxx @@ -45,6 +45,8 @@ #include #include +using namespace std; + using SMESH::TPythonDump; using SMESH::TVar; diff --git a/src/SMESH_I/SMESH_PreMeshInfo.cxx b/src/SMESH_I/SMESH_PreMeshInfo.cxx index 21fe1513e..0621ed9f1 100644 --- a/src/SMESH_I/SMESH_PreMeshInfo.cxx +++ b/src/SMESH_I/SMESH_PreMeshInfo.cxx @@ -54,6 +54,7 @@ #include CORBA_SERVER_HEADER(SALOME_Session) +using namespace std; #define MYDEBUGOUT(msg) //std::cout << msg << std::endl; @@ -62,7 +63,7 @@ namespace enum { GroupOnFilter_OutOfDate = -1 }; // a map to count not yet loaded meshes - static map< int, int > theStudyIDToMeshCounter; + static std::map< int, int > theStudyIDToMeshCounter; //================================================================================ /*! @@ -72,8 +73,8 @@ namespace void meshInfoLoaded( SMESH_Mesh_i* mesh ) { - map< int, int >::iterator id2counter = - theStudyIDToMeshCounter.insert( make_pair( (int) mesh->GetStudyId(), 0 )).first; + std::map< int, int >::iterator id2counter = + theStudyIDToMeshCounter.insert( std::make_pair( (int) mesh->GetStudyId(), 0 )).first; id2counter->second++; } //================================================================================ @@ -88,7 +89,7 @@ namespace { if ( --theStudyIDToMeshCounter[ (int) mesh->GetStudyId() ] == 0 ) { - string tmpDir = SALOMEDS_Tool::GetDirFromPath( hdfFile ); + std::string tmpDir = SALOMEDS_Tool::GetDirFromPath( hdfFile ); SALOMEDS::ListOfFileNames_var aFiles = new SALOMEDS::ListOfFileNames; aFiles->length(2); @@ -109,7 +110,7 @@ namespace class SignalToGUI { - string _messagePrefix; + std::string _messagePrefix; SALOME::Session_var _session; public: SignalToGUI( SMESH_Mesh_i* mesh ) @@ -127,7 +128,7 @@ namespace _messagePrefix = "SMESH/mesh_loading/"; _messagePrefix += meshEntry.in(); - string msgToGUI = _messagePrefix + "/"; + std::string msgToGUI = _messagePrefix + "/"; msgToGUI += SMESH_Comment( mesh->NbNodes() ); msgToGUI += "/"; msgToGUI += SMESH_Comment( mesh->NbElements() ); @@ -140,7 +141,7 @@ namespace { if ( !_messagePrefix.empty() ) { - string msgToGUI = _messagePrefix + "/stop"; + std::string msgToGUI = _messagePrefix + "/stop"; _session->emitMessageOneWay( msgToGUI.c_str()); _messagePrefix.clear(); } @@ -173,7 +174,7 @@ namespace SMDS_PositionPtr vertexPosition() const { return SMDS_PositionPtr( new SMDS_VertexPosition); } SMDS_PositionPtr defaultPosition() const { return SMDS_SpacePosition::originSpacePosition(); } typedef SMDS_PositionPtr (PositionCreator:: * FmakePos)() const; - vector myFuncTable; + std::vector myFuncTable; }; //================================================================================ @@ -182,12 +183,12 @@ namespace */ //================================================================================ - vector getSimpleSubMeshIds( SMESHDS_Mesh* meshDS, int shapeId ) + std::vector getSimpleSubMeshIds( SMESHDS_Mesh* meshDS, int shapeId ) { - vector ids; + std::vector ids; - list shapeQueue( 1, meshDS->IndexToShape( shapeId )); - list::iterator shape = shapeQueue.begin(); + std::list shapeQueue( 1, meshDS->IndexToShape( shapeId )); + std::list::iterator shape = shapeQueue.begin(); for ( ; shape != shapeQueue.end(); ++shape ) { if ( shape->IsNull() ) continue; @@ -222,10 +223,10 @@ namespace */ //================================================================================ - typedef map< MED::EGeometrieElement, SMDSAbs_EntityType > Tmed2smeshElemTypeMap; + typedef std::map< MED::EGeometrieElement, SMDSAbs_EntityType > Tmed2smeshElemTypeMap; const Tmed2smeshElemTypeMap& med2smeshElemTypeMap() { - static map< MED::EGeometrieElement, SMDSAbs_EntityType> med2smeshTypes; + static Tmed2smeshElemTypeMap med2smeshTypes; if ( med2smeshTypes.empty() ) { for ( int iG = 0; iG < SMDSEntity_Last; ++iG ) @@ -233,7 +234,7 @@ namespace SMDSAbs_EntityType smdsType = (SMDSAbs_EntityType) iG; MED::EGeometrieElement medType = (MED::EGeometrieElement) DriverMED::GetMedGeoType( smdsType ); - med2smeshTypes.insert( make_pair( medType, smdsType )); + med2smeshTypes.insert( std::make_pair( medType, smdsType )); } } return med2smeshTypes; @@ -254,7 +255,7 @@ namespace // change at insertion of new items in the middle. //const vector& medTypes = mesh2medElemType(); - vector data; + std::vector data; for ( size_t i = 0; i < meshInfo->length(); ++i ) if ( meshInfo[i] > 0 ) @@ -298,7 +299,7 @@ void SMESH_PreMeshInfo::hdf2meshInfo( const std::string& name, // // array->GetDim( datasetSize ); // int size = dataset->GetSize(); - vector info( SMDSEntity_Last * 2, 0 ); + std::vector info( SMDSEntity_Last * 2, 0 ); dataset->ReadFromDisk( &info[0] ); dataset->CloseOnDisk(); @@ -429,7 +430,7 @@ bool SMESH_PreMeshInfo::readPreInfoFromHDF() group_i->changePreMeshInfo() = newInstance(); if ( SMESHDS_GroupBase* group = group_i->GetGroupDS() ) { - const string name = group->GetStoreName(); + const std::string name = group->GetStoreName(); group_i->changePreMeshInfo()->hdf2meshInfo( name, infoHdfGroup ); } } @@ -499,7 +500,7 @@ void SMESH_PreMeshInfo::readGroupInfo() if ( _mesh->_mapGroups.empty() ) return; // make SMESH_PreMeshInfo of groups - map< string, SMESH_PreMeshInfo* > name2GroupInfo; + map< std::string, SMESH_PreMeshInfo* > name2GroupInfo; map::const_iterator i2group = _mesh->_mapGroups.begin(); for ( ; i2group != _mesh->_mapGroups.end(); ++i2group ) { @@ -510,8 +511,8 @@ void SMESH_PreMeshInfo::readGroupInfo() group_i->changePreMeshInfo() = info; if ( SMESHDS_Group* group = dynamic_cast< SMESHDS_Group* >( group_i->GetGroupDS() )) { - string name = group->GetStoreName(); - name2GroupInfo.insert( make_pair( name, info )); + std::string name = group->GetStoreName(); + name2GroupInfo.insert( std::make_pair( name, info )); info->_isInfoOk = true; } } @@ -534,8 +535,8 @@ void SMESH_PreMeshInfo::readGroupInfo() vector< SMESH_PreMeshInfo* >& grInfoVec = famId2grInfo[ medFamInfo->GetId() ]; for ( int iG = 0; iG < nbGroups; ++iG ) { - const string grName = medFamInfo->GetGroupName( iG ); - map< string, SMESH_PreMeshInfo* >::iterator n2i = name2GroupInfo.find( grName ); + const std::string grName = medFamInfo->GetGroupName( iG ); + map< std::string, SMESH_PreMeshInfo* >::iterator n2i = name2GroupInfo.find( grName ); if ( n2i != name2GroupInfo.end() ) grInfoVec.push_back( n2i->second ); } @@ -560,14 +561,14 @@ void SMESH_PreMeshInfo::readGroupInfo() f2infos = famId2grInfo.find( famNums[i] ); if ( f2infos == famId2grInfo.end() ) f2infos = famId2grInfo.insert - ( make_pair( famNums[i], vector< SMESH_PreMeshInfo*>())).first; + ( std::make_pair( famNums[i], vector< SMESH_PreMeshInfo*>())).first; } vector< SMESH_PreMeshInfo* >& infoVec = f2infos->second ; for ( size_t j = 0; j < infoVec.size(); ++j ) infoVec[j]->_elemCounter++; } // pass _elemCounter to a real elem type - map< string, SMESH_PreMeshInfo* >::iterator n2i = name2GroupInfo.begin(); + map< std::string, SMESH_PreMeshInfo* >::iterator n2i = name2GroupInfo.begin(); for ( ; n2i != name2GroupInfo.end(); ++n2i ) { SMESH_PreMeshInfo* info = n2i->second; @@ -618,7 +619,7 @@ void SMESH_PreMeshInfo::readSubMeshInfo() for ( int isNode = 0; isNode < 2; ++isNode ) { - string aDSName( isNode ? "Node Submeshes" : "Element Submeshes"); + std::string aDSName( isNode ? "Node Submeshes" : "Element Submeshes"); if ( aGroup->ExistInternalObject( (char*) aDSName.c_str() )) { // read sub-mesh id of all nodes or elems @@ -893,7 +894,7 @@ void SMESH_PreMeshInfo::readSubMeshes(DriverMED_R_SMESHDS_Mesh* reader) const SMDS_ElemIteratorPtr eIt = meshDS->elementsIterator(); for ( int isNode = 0; isNode < 2; ++isNode ) { - string aDSName( isNode ? "Node Submeshes" : "Element Submeshes"); + std::string aDSName( isNode ? "Node Submeshes" : "Element Submeshes"); if ( aGroup->ExistInternalObject( (char*) aDSName.c_str() )) { HDFdataset* aDataset = new HDFdataset( (char*) aDSName.c_str(), aGroup ); diff --git a/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx b/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx index 20e7048b9..e59c60886 100644 --- a/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx +++ b/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx @@ -58,6 +58,7 @@ #include #include +using namespace std; #ifdef _DEBUG_ // #define DEB_FACES diff --git a/src/StdMeshers/StdMeshers_CompositeHexa_3D.hxx b/src/StdMeshers/StdMeshers_CompositeHexa_3D.hxx index 5545f781a..ac251c03d 100644 --- a/src/StdMeshers/StdMeshers_CompositeHexa_3D.hxx +++ b/src/StdMeshers/StdMeshers_CompositeHexa_3D.hxx @@ -57,15 +57,15 @@ public: private: - bool findBoxFaces( const TopoDS_Shape& shape, - list< _QuadFaceGrid >& boxFaceContainer, - SMESH_Mesh& mesh, - _QuadFaceGrid * & fBottom, - _QuadFaceGrid * & fTop, - _QuadFaceGrid * & fFront, - _QuadFaceGrid * & fBack, - _QuadFaceGrid * & fLeft, - _QuadFaceGrid * & fRight); + bool findBoxFaces( const TopoDS_Shape& shape, + std::list< _QuadFaceGrid >& boxFaceContainer, + SMESH_Mesh& mesh, + _QuadFaceGrid * & fBottom, + _QuadFaceGrid * & fTop, + _QuadFaceGrid * & fFront, + _QuadFaceGrid * & fBack, + _QuadFaceGrid * & fLeft, + _QuadFaceGrid * & fRight); }; #endif diff --git a/src/StdMeshers/StdMeshers_FaceSide.cxx b/src/StdMeshers/StdMeshers_FaceSide.cxx index 3849040e9..d0c258936 100644 --- a/src/StdMeshers/StdMeshers_FaceSide.cxx +++ b/src/StdMeshers/StdMeshers_FaceSide.cxx @@ -56,6 +56,8 @@ #include "utilities.h" +using namespace std; + //================================================================================ /*! * \brief Constructor of a side of one edge @@ -71,7 +73,7 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace, const bool theIgnoreMediumNodes, SMESH_ProxyMesh::Ptr theProxyMesh) { - list edges(1,theEdge); + std::list edges(1,theEdge); *this = StdMeshers_FaceSide( theFace, edges, theMesh, theIsForward, theIgnoreMediumNodes, theProxyMesh ); } @@ -82,12 +84,12 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace, */ //================================================================================ -StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace, - list& theEdges, - SMESH_Mesh* theMesh, - const bool theIsForward, - const bool theIgnoreMediumNodes, - SMESH_ProxyMesh::Ptr theProxyMesh) +StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace, + std::list& theEdges, + SMESH_Mesh* theMesh, + const bool theIsForward, + const bool theIgnoreMediumNodes, + SMESH_ProxyMesh::Ptr theProxyMesh) { int nbEdges = theEdges.size(); myEdge.resize ( nbEdges ); @@ -112,7 +114,7 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace, SMESHDS_Mesh* meshDS = myProxyMesh->GetMeshDS(); int nbDegen = 0; - list::iterator edge = theEdges.begin(); + std::list::iterator edge = theEdges.begin(); for ( int index = 0; edge != theEdges.end(); ++index, ++edge ) { int i = theIsForward ? index : nbEdges-index-1; @@ -302,8 +304,8 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(UVPtStructVec& theSideNodes, */ //================================================================================ -const vector& StdMeshers_FaceSide::GetUVPtStruct(bool isXConst, - double constValue) const +const std::vector& StdMeshers_FaceSide::GetUVPtStruct(bool isXConst, + double constValue) const { if ( myPoints.empty() ) { diff --git a/src/StdMeshers/StdMeshers_Geometric1D.cxx b/src/StdMeshers/StdMeshers_Geometric1D.cxx index dd77350f7..031fd7ea1 100644 --- a/src/StdMeshers/StdMeshers_Geometric1D.cxx +++ b/src/StdMeshers/StdMeshers_Geometric1D.cxx @@ -166,7 +166,7 @@ bool StdMeshers_Geometric1D::SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Edge& edge = TopoDS::Edge( edgeMap( i )); BRepAdaptor_Curve C( edge ); - vector< double > params; + std::vector< double > params; if ( SMESH_Algo::GetNodeParamOnEdge( theMesh->GetMeshDS(), edge, params )) { nbEdges++; diff --git a/src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx b/src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx index 6f87ebf4a..5cd779b75 100644 --- a/src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx +++ b/src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx @@ -33,6 +33,8 @@ #include +using namespace std; + // Define error message and _MYDEBUG_ if needed #ifdef _DEBUG_ #define BAD_MESH_ERR \ diff --git a/src/StdMeshers/StdMeshers_Prism_3D.hxx b/src/StdMeshers/StdMeshers_Prism_3D.hxx index 0a2428401..9788b64a1 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.hxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.hxx @@ -270,7 +270,7 @@ private: TParam2ColumnMap* myParamToColumnMap; PSurface mySurface; TopoDS_Edge myBaseEdge; - map< int, PSurface > myShapeID2Surf; + std::map< int, PSurface > myShapeID2Surf; // first and last normalized params and orientaion for each component or it-self std::vector< std::pair< double, double> > myParams; // select my columns in myParamToColumnMap bool myIsForward; diff --git a/src/StdMeshers/StdMeshers_Projection_3D.cxx b/src/StdMeshers/StdMeshers_Projection_3D.cxx index d8bce83cd..f260a2d6f 100644 --- a/src/StdMeshers/StdMeshers_Projection_3D.cxx +++ b/src/StdMeshers/StdMeshers_Projection_3D.cxx @@ -57,6 +57,7 @@ namespace TAssocTool = StdMeshers_ProjectionUtils; +using namespace std; //======================================================================= //function : StdMeshers_Projection_3D diff --git a/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx b/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx index 55e0d19ab..acd202846 100644 --- a/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx +++ b/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx @@ -61,6 +61,8 @@ #include #include +using namespace std; + //================================================================================ /*! * \brief 1D algo diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx index 460a5e4ab..936a5e1c2 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx @@ -82,7 +82,7 @@ struct FaceQuadStruct return GetUVPtStruct()[ to-nbNodeOut-(IsReversed() ? -1 : +1)]; } // some sortcuts - const vector& GetUVPtStruct(bool isXConst=0, double constValue=0) const + const std::vector& GetUVPtStruct(bool isXConst=0, double constValue=0) const { return nbNodeOut ? grid->SimulateUVPtStruct( NbPoints()-nbNodeOut-1, isXConst, constValue ) : grid->GetUVPtStruct( isXConst, constValue ); diff --git a/src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.cxx b/src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.cxx index 9036dc18b..decbc2a62 100644 --- a/src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.cxx +++ b/src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.cxx @@ -38,7 +38,7 @@ StdMeshers_SegmentAroundVertex_0D::StdMeshers_SegmentAroundVertex_0D :SMESH_0D_Algo(hypId, studyId, gen) { _name = "SegmentAroundVertex_0D"; - // it is assigned to vertices but influence a state of EDGE submeshes + // it is assigned to vertices but influence a state of EDGE submeshes _shapeType = (1 << TopAbs_VERTEX); // 1 bit per shape type _compatibleHypothesis.push_back("SegmentLengthAroundVertex"); @@ -55,16 +55,17 @@ StdMeshers_SegmentAroundVertex_0D::~StdMeshers_SegmentAroundVertex_0D() //======================================================================= //function : CheckHypothesis -//purpose : +//purpose : //======================================================================= -bool StdMeshers_SegmentAroundVertex_0D::CheckHypothesis(SMESH_Mesh& aMesh, - const TopoDS_Shape& aShape, - SMESH_Hypothesis::Hypothesis_Status& aStatus) +bool StdMeshers_SegmentAroundVertex_0D:: +CheckHypothesis(SMESH_Mesh& aMesh, + const TopoDS_Shape& aShape, + SMESH_Hypothesis::Hypothesis_Status& aStatus) { - list ::const_iterator itl; + std::list ::const_iterator itl; - const list &hyps = GetUsedHypothesis(aMesh, aShape); + const std::list &hyps = GetUsedHypothesis(aMesh, aShape); if ( hyps.size() == 0 ) { aStatus = SMESH_Hypothesis::HYP_MISSING; @@ -84,7 +85,7 @@ bool StdMeshers_SegmentAroundVertex_0D::CheckHypothesis(SMESH_Mesh& //======================================================================= //function : Compute -//purpose : +//purpose : //======================================================================= bool StdMeshers_SegmentAroundVertex_0D::Compute(SMESH_Mesh&, const TopoDS_Shape&) diff --git a/src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.cxx b/src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.cxx index 9ca0a8ee8..0ea622706 100644 --- a/src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.cxx @@ -178,8 +178,8 @@ void StdMeshers_CartesianParameters3D_i::SetGridSpacing(const SMESH::string_arra CORBA::Short axis) throw (SALOME::SALOME_Exception) { - vector funVec; - vector pointVec; + std::vector funVec; + std::vector pointVec; _array2vec( spaceFunctions, funVec, (const char*) ); _array2vec( internalPoints, pointVec, ); @@ -209,8 +209,8 @@ void StdMeshers_CartesianParameters3D_i::GetGridSpacing(SMESH::string_array_out { ASSERT( myBaseImpl ); try { - vector funVec; - vector pointVec; + std::vector funVec; + std::vector pointVec; this->GetImpl()->GetGridSpacing( funVec, pointVec, axis ); xSpaceFunctions = new SMESH::string_array(); @@ -394,8 +394,8 @@ StdMeshers_CartesianParameters3D_i::ComputeCoordinates(CORBA::Double const char* axisName ) throw (SALOME::SALOME_Exception) { - vector xFuns; - vector xPoints, coords; + std::vector xFuns; + std::vector xPoints, coords; _array2vec( spaceFuns, xFuns, (const char*) ); _array2vec( points, xPoints, ); diff --git a/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx b/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx index ed0ce004c..8120ca384 100644 --- a/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx +++ b/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx @@ -111,7 +111,7 @@ public: std::string str; if (stream >> str) { if ( StudyContext* myStudyContext = gen->GetCurrentStudyContext() ) { - string ior = myStudyContext->getIORbyOldId( atoi( str.c_str() )); + std::string ior = myStudyContext->getIORbyOldId( atoi( str.c_str() )); if ( !ior.empty() ) return TInterface::_narrow(gen->GetORB()->string_to_object( ior.c_str() )); } diff --git a/src/StdMeshers_I/StdMeshers_Reversible1D_i.cxx b/src/StdMeshers_I/StdMeshers_Reversible1D_i.cxx index 13e86c06a..a059ff39e 100644 --- a/src/StdMeshers_I/StdMeshers_Reversible1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Reversible1D_i.cxx @@ -79,7 +79,7 @@ void StdMeshers_Reversible1D_i::SetReversedEdges( const SMESH::long_array& theId void StdMeshers_Reversible1D_i::SetObjectEntry( const char* theEntry ) { - string entry(theEntry); // actually needed as theEntry is spoiled by moment of dumping + std::string entry(theEntry); // actually needed as theEntry is spoiled by moment of dumping try { this->GetImpl()->SetObjectEntry( entry.c_str() ); // Update Python script -- 2.30.2