Correction of Export/Import defines for Win32 platform.
Using WIN32 standard define instead WNT define of OpenCascade library.
Removed "using namespace std" from header files.
# include <qpushbutton.h>
# include <qspinbox.h>
-#ifndef WNT
-using namespace std;
-#endif
-
class IntervalWindow : public QDialog
{
Q_OBJECT
class SVTK_RectPicker;
class SVTK_InteractorStyle;
-extern int SALOME_POINT_SIZE;
-extern int SALOME_LINE_WIDTH;
+SVTK_EXPORT extern int SALOME_POINT_SIZE;
+SVTK_EXPORT extern int SALOME_LINE_WIDTH;
+
+#ifdef WIN32
+#pragma warning ( disable:4251 )
+#endif
#ifdef WIN32
#pragma warning ( disable:4251 )
#include <SUIT_Session.h>
#include "SALOMEDS_Tool.hxx"
+#include "utilities.h"
+#include "Basics_DirUtils.hxx"
#include "SALOMEDSClient_ClientFactory.hxx"
#include "SALOMEDSClient_IParameters.hxx"
std::string SalomeApp_Study::GetTmpDir ( const char* theURL, const bool isMultiFile )
{
std::string anURLDir = SALOMEDS_Tool::GetDirFromPath(theURL);
- std::string aTmpDir = isMultiFile ? anURLDir : SALOMEDS_Tool::GetTmpDir();
+ std::string aTmpDir = isMultiFile ? anURLDir : Kernel_Utils::GetTmpDirByEnv("SALOME_TMP_DIR");
return aTmpDir;
}
break;
case 6:
{
- string hostname = GetHostname();
+ string hostname = Kernel_Utils::GetHostname();
string containerName = "/Containers/";
containerName += hostname;
containerName += "/FactoryServer";
break;
case 7:
{
- string hostname = GetHostname();
+ string hostname = Kernel_Utils::GetHostname();
string containerName = "/Containers/";
containerName += hostname;
containerName += "/FactoryServerPy";
break;
case 8:
{
- string hostname = GetHostname();
+ string hostname = Kernel_Utils::GetHostname();
string containerName = "/Containers/";
containerName += hostname;
containerName += "/SuperVisionContainer";
#include "SUIT_ResourceMgr.h"
#include "SUIT_ExceptionHandler.h"
+using namespace std;
+
/*! - read arguments, define list of server to launch with their arguments.
* - wait for naming service
* - create and run a thread for launch of all servers
#include "SalomeApp_Engine_i.hxx"
#include "SALOMEDS_Tool.hxx"
+#include "Basics_DirUtils.hxx"
#include "utilities.h"
const int studyId = theComponent->GetStudy()->StudyId();
// Create a temporary directory for the component's data files
- std::string aTmpDir = isMultiFile ? theURL : SALOMEDS_Tool::GetTmpDir();
+ std::string aTmpDir = isMultiFile ? theURL : Kernel_Utils::GetTmpDirByEnv("SALOME_TMP_DIR");
// Convert the byte stream theStream to a files and place them in the tmp directory.
// The files and temporary directory must be deleted by the component loading procedure.
#include "Utils_SINGLETON.hxx"
#include "SALOME_NamingService.hxx"
#include "utilities.h"
-#include "OpUtil.hxx"
+#include "Basics_Utils.hxx"
// Default settings
const int __DEFAULT__ATTEMPTS__ = 300; // number of checks attemtps
SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance();
ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
NS.init_orb( orb );
- QString containerName = QString( "/Containers/%1/FactoryServer" ).arg( GetHostname().c_str() );
+ QString containerName = QString( "/Containers/%1/FactoryServer" ).arg( Kernel_Utils::GetHostname().c_str() );
CORBA::Object_var obj = NS.Resolve( containerName.latin1() );
Engines::Container_var FScontainer = Engines::Container::_narrow( obj );
if ( !CORBA::is_nil( FScontainer ) ) {
SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance();
ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
NS.init_orb( orb );
- QString containerName = QString( "/Containers/%1/FactoryServerPy" ).arg( GetHostname().c_str() );
+ QString containerName = QString( "/Containers/%1/FactoryServerPy" ).arg( Kernel_Utils::GetHostname().c_str() );
CORBA::Object_var obj = NS.Resolve( containerName.latin1() );
Engines::Container_var FSPcontainer = Engines::Container::_narrow( obj );
if ( !CORBA::is_nil( FSPcontainer ) ) {
SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance();
ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
NS.init_orb( orb );
- QString containerName = QString( "/Containers/%1/SuperVisionContainer" ).arg( GetHostname().c_str() );
+ QString containerName = QString( "/Containers/%1/SuperVisionContainer" ).arg( Kernel_Utils::GetHostname().c_str() );
CORBA::Object_var obj = NS.Resolve( containerName.latin1() );
Engines::Container_var SVcontainer = Engines::Container::_narrow( obj );
if ( !CORBA::is_nil( SVcontainer ) ) {
#include <qthread.h>
#include <qwaitcondition.h>
-using namespace std;
-
class SESSION_EXPORT ServArg
{
public:
private:
int _argc;
char ** _argv;
- CORBA::ORB_var _orb;
- PortableServer::POA_var _root_poa;
- QMutex* _GUIMutex;
- QWaitCondition* _ServerLaunch;
- QMutex* _SessionMutex;
- QWaitCondition* _SessionStarted;
- list<ServArg> _argServToLaunch;
- vector<string> _argCopy;
- list<Session_ServerThread*> _serverThreads;
+ CORBA::ORB_var _orb;
+ PortableServer::POA_var _root_poa;
+ QMutex* _GUIMutex;
+ QWaitCondition* _ServerLaunch;
+ QMutex* _SessionMutex;
+ QWaitCondition* _SessionStarted;
+ std::list<ServArg> _argServToLaunch;
+ std::vector<std::string> _argCopy;
+ std::list<Session_ServerThread*> _serverThreads;
};
#endif
-
#include "Utils_ORB_INIT.hxx"
#include "Utils_SINGLETON.hxx"
#include "Utils_SALOME_Exception.hxx"
-#include "OpUtil.hxx"
+#include "Basics_Utils.hxx"
#include "NamingService_WaitForServerReadiness.hxx"
#include "utilities.h"
{
NamingService_WaitForServerReadiness(_NS,"/myStudyManager");
string containerName = "/Containers/";
- containerName = containerName + GetHostname();
+ containerName = containerName + Kernel_Utils::GetHostname();
containerName = containerName + "/FactoryServer";
NamingService_WaitForServerReadiness(_NS,containerName);
ActivateSession(_argc, _argv);
#include "SALOME_NamingService.hxx"
#include <qthread.h>
-using namespace std;
-
-void WaitForServerReadiness(string serverName);
+void WaitForServerReadiness(std::string serverName);
class SESSION_EXPORT Session_ServerThread
#include <OSD_LoadMode.hxx>
#include <OSD_Function.hxx>
+#ifdef WNT
+# include <process.h>
+#endif
+
+
using namespace std;
/*!
return aStudyId;
}
+CORBA::Long SALOME_Session_i::getPID() {
+ return (CORBA::Long)
+#ifndef WNT
+ getpid();
+#else
+ _getpid();
+#endif
+}
+
bool SALOME_Session_i::restoreVisualState(CORBA::Long theSavePoint)
{
class TEvent: public SALOME_Event {
CORBA::Long GetActiveStudyId();
void ping(){};
- CORBA::Long getPID() { return (CORBA::Long)getpid(); };
+ CORBA::Long getPID();
//! Restors a visual state of the study at theSavePoint
bool restoreVisualState(CORBA::Long theSavePoint);
# include <qpushbutton.h>
# include <qspinbox.h>
-#ifndef WNT
-using namespace std;
-#endif
-
class ToolsGUI_IntervalWindow : public QDialog
{
Q_OBJECT