Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update copyrights 2014.
[modules/smesh.git]
/
src
/
SMESH_I
/
SMESH_Gen_i.cxx
diff --git
a/src/SMESH_I/SMESH_Gen_i.cxx
b/src/SMESH_I/SMESH_Gen_i.cxx
index a5b429431e02180979ebc07fd9e0fe2934d18fbe..0a935efbed51278c103f22b813f9c0f8fb23915b 100644
(file)
--- a/
src/SMESH_I/SMESH_Gen_i.cxx
+++ b/
src/SMESH_I/SMESH_Gen_i.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
3
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
4
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-6,7
+6,7
@@
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License
, or (at your option) any later version
.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-45,14
+45,14
@@
#include <TCollection_AsciiString.hxx>
#include <OSD.hxx>
#include <TCollection_AsciiString.hxx>
#include <OSD.hxx>
-#ifdef W
NT
+#ifdef W
IN32
#include <windows.h>
#include <process.h>
#else
#include <dlfcn.h>
#endif
#include <windows.h>
#include <process.h>
#else
#include <dlfcn.h>
#endif
-#ifdef W
NT
+#ifdef W
IN32
#define LibHandle HMODULE
#define LoadLib( name ) LoadLibrary( name )
#define GetProc GetProcAddress
#define LibHandle HMODULE
#define LoadLib( name ) LoadLibrary( name )
#define GetProc GetProcAddress
@@
-315,7
+315,7
@@
SMESH_Gen_i::SMESH_Gen_i( CORBA::ORB_ptr orb,
CORBA::String_var str_host = session->getHostname();
CORBA::Long s_pid = session->getPID();
string my_host = Kernel_Utils::GetHostname();
CORBA::String_var str_host = session->getHostname();
CORBA::Long s_pid = session->getPID();
string my_host = Kernel_Utils::GetHostname();
-#ifdef W
NT
+#ifdef W
IN32
long my_pid = (long)_getpid();
#else
long my_pid = (long) getpid();
long my_pid = (long)_getpid();
#else
long my_pid = (long) getpid();
@@
-378,7
+378,7
@@
SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
!strcmp( theLibName+libNameLen-3, ".so" ))
{
//the old format
!strcmp( theLibName+libNameLen-3, ".so" ))
{
//the old format
-#ifdef W
NT
+#ifdef W
IN32
aPlatformLibName = std::string( theLibName+3, libNameLen-6 ) + ".dll";
#else
aPlatformLibName = theLibName;
aPlatformLibName = std::string( theLibName+3, libNameLen-6 ) + ".dll";
#else
aPlatformLibName = theLibName;
@@
-387,8
+387,9
@@
SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
else
{
//try to use new format
else
{
//try to use new format
-#ifdef WNT
- aPlatformLibName = theLibName + ".dll";
+#ifdef WIN32
+ aPlatformLibName = theLibName;
+ aPlatformLibName += ".dll";
#else
aPlatformLibName = "lib" + std::string( theLibName ) + ".so";
#endif
#else
aPlatformLibName = "lib" + std::string( theLibName ) + ".so";
#endif
@@
-413,7
+414,7
@@
SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
if (!libHandle)
{
// report any error, if occured
if (!libHandle)
{
// report any error, if occured
-#ifndef W
NT
+#ifndef W
IN32
const char* anError = dlerror();
throw(SALOME_Exception(anError));
#else
const char* anError = dlerror();
throw(SALOME_Exception(anError));
#else
@@
-1088,7
+1089,7
@@
SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromSAUV( const char* theFileName,
std::string medfilename(theFileName);
medfilename += ".med";
std::string cmd;
std::string medfilename(theFileName);
medfilename += ".med";
std::string cmd;
-#ifdef W
NT
+#ifdef W
IN32
cmd = "%PYTHONBIN% ";
#else
cmd = "python ";
cmd = "%PYTHONBIN% ";
#else
cmd = "python ";
@@
-1098,7
+1099,7
@@
SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromSAUV( const char* theFileName,
cmd += "\"";
system(cmd.c_str());
SMESH::mesh_array* result = CreateMeshesFromMEDorSAUV(medfilename.c_str(), theStatus, "CreateMeshesFromSAUV", sauvfilename.c_str());
cmd += "\"";
system(cmd.c_str());
SMESH::mesh_array* result = CreateMeshesFromMEDorSAUV(medfilename.c_str(), theStatus, "CreateMeshesFromSAUV", sauvfilename.c_str());
-#ifdef W
NT
+#ifdef W
IN32
cmd = "%PYTHONBIN% ";
#else
cmd = "python ";
cmd = "%PYTHONBIN% ";
#else
cmd = "python ";
@@
-1731,9
+1732,7
@@
CORBA::Boolean SMESH_Gen_i::Compute( SMESH::SMESH_Mesh_ptr theMesh,
myLocShape = SMESH_Mesh::PseudoShape();
// call implementation compute
::SMESH_Mesh& myLocMesh = meshServant->GetImpl();
myLocShape = SMESH_Mesh::PseudoShape();
// call implementation compute
::SMESH_Mesh& myLocMesh = meshServant->GetImpl();
-#ifdef WITH_SMESH_CANCEL_COMPUTE
myGen.PrepareCompute( myLocMesh, myLocShape);
myGen.PrepareCompute( myLocMesh, myLocShape);
-#endif
bool ok = myGen.Compute( myLocMesh, myLocShape);
meshServant->CreateGroupServants(); // algos can create groups (issue 0020918)
myLocMesh.GetMeshDS()->Modified();
bool ok = myGen.Compute( myLocMesh, myLocShape);
meshServant->CreateGroupServants(); // algos can create groups (issue 0020918)
myLocMesh.GetMeshDS()->Modified();
@@
-1763,7
+1762,6
@@
CORBA::Boolean SMESH_Gen_i::Compute( SMESH::SMESH_Mesh_ptr theMesh,
void SMESH_Gen_i::CancelCompute( SMESH::SMESH_Mesh_ptr theMesh,
GEOM::GEOM_Object_ptr theShapeObject )
{
void SMESH_Gen_i::CancelCompute( SMESH::SMESH_Mesh_ptr theMesh,
GEOM::GEOM_Object_ptr theShapeObject )
{
-#ifdef WITH_SMESH_CANCEL_COMPUTE
SMESH_Mesh_i* meshServant = dynamic_cast<SMESH_Mesh_i*>( GetServant( theMesh ).in() );
::SMESH_Mesh& myLocMesh = meshServant->GetImpl();
TopoDS_Shape myLocShape;
SMESH_Mesh_i* meshServant = dynamic_cast<SMESH_Mesh_i*>( GetServant( theMesh ).in() );
::SMESH_Mesh& myLocMesh = meshServant->GetImpl();
TopoDS_Shape myLocShape;
@@
-1772,7
+1770,6
@@
void SMESH_Gen_i::CancelCompute( SMESH::SMESH_Mesh_ptr theMesh,
else
myLocShape = SMESH_Mesh::PseudoShape();
myGen.CancelCompute( myLocMesh, myLocShape);
else
myLocShape = SMESH_Mesh::PseudoShape();
myGen.CancelCompute( myLocMesh, myLocShape);
-#endif
}
//=============================================================================
}
//=============================================================================
@@
-2927,7
+2924,7
@@
SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
//Remove the files if they exist: BugID: 11225
//Remove the files if they exist: BugID: 11225
-#ifndef W
NT
/* unix functionality */
+#ifndef W
IN32
/* unix functionality */
TCollection_AsciiString cmd("rm -f \"");
#else /* windows */
TCollection_AsciiString cmd("del /F \"");
TCollection_AsciiString cmd("rm -f \"");
#else /* windows */
TCollection_AsciiString cmd("del /F \"");
@@
-3008,9
+3005,9
@@
SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
string libname = string( myHyp->GetLibName() );
// BUG SWP13062
// Needs for save crossplatform libname, i.e. parth of name ( ".dll" for
string libname = string( myHyp->GetLibName() );
// BUG SWP13062
// Needs for save crossplatform libname, i.e. parth of name ( ".dll" for
- // W
NT
and ".so" for X-system) must be deleted
+ // W
IN32
and ".so" for X-system) must be deleted
int libname_len = libname.length();
int libname_len = libname.length();
-#ifdef W
NT
+#ifdef W
IN32
if( libname_len > 4 )
libname.resize( libname_len - 4 );
#else
if( libname_len > 4 )
libname.resize( libname_len - 4 );
#else
@@
-3077,9
+3074,9
@@
SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
string libname = string( myHyp->GetLibName() );
// BUG SWP13062
// Needs for save crossplatform libname, i.e. parth of name ( ".dll" for
string libname = string( myHyp->GetLibName() );
// BUG SWP13062
// Needs for save crossplatform libname, i.e. parth of name ( ".dll" for
- // W
NT
and ".so" for X-system) must be deleted
+ // W
IN32
and ".so" for X-system) must be deleted
int libname_len = libname.length();
int libname_len = libname.length();
-#ifdef W
NT
+#ifdef W
IN32
if( libname_len > 4 )
libname.resize( libname_len - 4 );
#else
if( libname_len > 4 )
libname.resize( libname_len - 4 );
#else