#ifndef __BL_EXCEPTION_HXX__
#define __BL_EXCEPTION_HXX__
+#ifdef WNT
+# if defined BL_Bases_EXPORTS
+# define BL_Bases_EXPORT __declspec( dllexport )
+# else
+# define BL_Bases_EXPORT __declspec( dllimport )
+# endif
+#else
+# define BL_Bases_EXPORT
+#endif
+
#include <string>
#include <exception>
namespace BL
{
- class Exception : public std::exception
+ class BL_Bases_EXPORT Exception : public std::exception
{
protected:
std::string _what;
--- /dev/null
+// Copyright (C) 2009-2010 CEA/DEN, EDF R&D
+//
+// 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.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __BL_ENGINE_HXX__
+#define __BL_ENGINE_HXX__
+
+#ifdef WNT
+# if defined BL_Engine_EXPORTS
+# define BL_Engine_EXPORT __declspec( dllexport )
+# else
+# define BL_Engine_EXPORT __declspec( dllimport )
+# endif
+#else
+# define BL_Engine_EXPORT
+#endif
+
+#endif
#ifndef _BL_JOB_HXX_
#define _BL_JOB_HXX_
+#include "BL_Engine.hxx"
#include "BL_Traces.hxx"
#include <string>
#include <list>
+#ifdef WNT
+#undef ERROR
+#endif
+
namespace BL{
- class Job
+ class BL_Engine_EXPORT Job
{
public:
Job();
#include "BL_JobsManager.hxx"
#include <sstream>
+#ifdef WNT
+#undef ERROR
+#endif
+
BL::JobsManager::JobsManager(BL::SALOMEServices * salome_services)
{
DEBTRACE("Creating BL::JobsManager");
#ifndef _BL_JOBSMANAGER_HXX_
#define _BL_JOBSMANAGER_HXX_
+#include "BL_Engine.hxx"
#include "BL_Job.hxx"
#include "BL_SALOMEServices.hxx"
#include "BL_Traces.hxx"
class SALOMEServices;
- class JobsManager
+ class BL_Engine_EXPORT JobsManager
{
public:
JobsManager(BL::SALOMEServices * salome_services);
#ifndef _BL_SALOMESERVICES_HXX_
#define _BL_SALOMESERVICES_HXX_
+#include "BL_Engine.hxx"
#include "BL_Traces.hxx"
#include "BL_Job.hxx"
class JobsManager;
- struct ResourceDescr
+ struct BL_Engine_EXPORT ResourceDescr
{
std::string name;
std::string hostname;
std::string iprotocol;
};
- class SALOMEServices :
+ class BL_Engine_EXPORT SALOMEServices :
public POA_JOBMANAGER::LauncherObserver
{
public:
BL_Observer.hxx
libBL_Engine_la_CXXFLAGS = -I$(top_srcdir)/src/bases \
- $(OMNIORB_INCLUDES) \
+ $(OMNIORB_INCLUDES) $(OMNIORB_CXXFLAGS) \
-I$(KERNEL_ROOT_DIR)/include/salome \
-I../../idl
-libBL_Engine_la_LIBADD = $(top_builddir)/src/bases/libBL_Bases.la \
- $(top_builddir)/idl/libJOBMANAGER_IDL.la \
+libBL_Engine_la_LIBADD = $(top_builddir)/src/bases/libBL_Bases.la $(top_builddir)/idl/libJOBMANAGER_IDL.la $(OMNIORB_LIBS) \
+ $(KERNEL_LDFLAGS) -lSalomeIDLKernel -lSalomeNS -lSalomeLifeCycleCORBA \
@OMNIORB_LIBS@
#include "BL_CreateJobWizard.hxx"
#include "BL_JobsManager_QT.hxx"
+#ifndef WNT
#include <unistd.h>
-#include <sys/types.h>
#include <pwd.h>
+#endif
+#include <sys/types.h>
#include <stdlib.h>
+#ifdef WNT
+#undef ERROR
+#endif
+
BL::CreateJobWizard::CreateJobWizard(BL::JobsManager_QT * jobs_manager, BL::SALOMEServices * salome_services)
{
DEBTRACE("Creating BL::CreateJobWizard");
// Check if job name already exists
else {
- if (_jobs_manager->job_already_exist(job_name.toStdString()) == false or _check_name == false)
+ if (_jobs_manager->job_already_exist(job_name.toStdString()) == false || _check_name == false)
{
return_value = true;
}
int time_hour = field("duration_hour").toInt();
int time_min = field("duration_min").toInt();
- if (time_hour == 0 and time_min == 0)
+ if (time_hour == 0 && time_min == 0)
{
QMessageBox::warning(NULL, "Time Error", "Please enter an expected during time");
return false;
// Default result directory is home directory (if we found it)
// First try -> HOME
+#ifdef WNT
+ _result_directory->setText(getenv("HOME"));
+#else
if (getenv("HOME"))
_result_directory->setText(getenv("HOME"));
else {
if (pass_struct)
_result_directory->setText(pass_struct->pw_dir);
}
+#endif
registerField("result_directory", _result_directory);
QGridLayout * output_box = new QGridLayout;
}
}
- if (result_directory == "" and _output_files_list->count() != 0)
+ if (result_directory == "" && _output_files_list->count() != 0)
{
QMessageBox::warning(NULL, "Result Directory Error", "Please enter a result directory or remove output files");
return false;
#include "BL_GenericGui.hxx"
+#ifdef WNT
+#undef ERROR
+#endif
+
BL::GenericGui::GenericGui(BL::MainWindows_Wrap * wrapper) : QObject(wrapper->getDockParent())
{
DEBTRACE("Creating BL::GenericGui");
DEBTRACE("BL::GenericGui::updateButtonsStates slot");
// First case: no job selected
- if (_job_name_selected == "" and _row_selected == -1)
+ if (_job_name_selected == "" && _row_selected == -1)
{
_start_job_action->setEnabled(false);
_delete_job_action->setEnabled(false);
_restart_job_action->setEnabled(false);
_buttons->disable_restart_button();
}
- else if (_job_name_selected != "" and _row_selected != -1)
+ else if (_job_name_selected != "" && _row_selected != -1)
{
BL::Job * job = _jobs_manager->getJob(_job_name_selected.toStdString());
BL::Job::State job_state = job->getState();
#include <QtGui>
+#include "BL_GenericGuiDefines.hxx"
+
#include "BL_Traces.hxx"
#include "BL_SALOMEServices.hxx"
namespace BL
{
- class GenericGui: public QObject
+ class BL_GenericGui_EXPORT GenericGui: public QObject
{
Q_OBJECT
--- /dev/null
+// Copyright (C) 2009-2010 CEA/DEN, EDF R&D
+//
+// 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.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __BL_GENERICGUIDEFINES_HXX__
+#define __BL_GENERICGUIDEFINES_HXX__
+
+#ifdef WNT
+# if defined BL_GenericGui_EXPORTS
+# define BL_GenericGui_EXPORT __declspec( dllexport )
+# else
+# define BL_GenericGui_EXPORT __declspec( dllimport )
+# endif
+#else
+# define BL_GenericGui_EXPORT
+#endif
+
+#endif
-// Copyright (C) 2009-2011 CEA/DEN, EDF R&D
+// Copyright (C) 2009-2010 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include "BL_JobTab.hxx"
#include "BL_Traces.hxx"
+#ifdef WNT
+#undef ERROR
+#endif
+
BL::JobTab::JobTab(QWidget *parent, BL::JobsManager_QT * jobs_manager) : QTabWidget(parent)
{
DEBTRACE("Creating BL::JobTab");
#include "BL_QModelManager.hxx"
+#ifdef WNT
+#undef ERROR
+#endif
+
BL::QModelManager::QModelManager(QObject * parent, BL::JobsManager_QT * jobs_manager) : QObject(parent)
{
DEBTRACE("Creating BL::QModelManager");
resource.nb_node = _nb_node_line->value();
resource.nb_proc_per_node = _nb_proc_per_node_line->value();
- if (resource.name != "" and
- resource.hostname != "" and
+ if (resource.name != "" &&
+ resource.hostname != "" &&
resource.protocol != "")
{
_salome_services->addResource(resource);
-I$(top_srcdir)/src/bases \
-I$(top_srcdir)/src/engine \
-I$(KERNEL_ROOT_DIR)/include/salome \
- $(OMNIORB_INCLUDES) \
+ $(OMNIORB_INCLUDES) $(OMNIORB_CXXFLAGS) \
-I../../idl \
-I$(top_srcdir)/src/wrappers
// --- Export the module
extern "C"
{
- CAM_Module* createModule()
+ JOBMANAGER_EXPORT CAM_Module* createModule()
{
return new BL::SalomeGui();
}
#ifndef _BL_SALOMEGUI_HXX_
#define _BL_SALOMEGUI_HXX_
+#ifdef WNT
+# if defined JOBMANAGER_EXPORTS
+# define JOBMANAGER_EXPORT __declspec( dllexport )
+# else
+# define JOBMANAGER_EXPORT __declspec( dllimport )
+# endif
+#else
+# define JOBMANAGER_EXPORT
+#endif
+
#include <SALOMEconfig.h>
#include <SalomeApp_Module.h>
libJOBMANAGER_la_CXXFLAGS = $(qt4_cppflags) \
$(BOOST_CPPFLAGS) \
- $(OMNIORB_INCLUDES) \
+ $(OMNIORB_INCLUDES) $(OMNIORB_CXXFLAGS) \
-I../../idl \
-I$(KERNEL_ROOT_DIR)/include/salome \
-I$(GUI_ROOT_DIR)/include/salome \
salomeinclude_HEADERS = BL_SalomeGui.hxx
# resources files
-LIBICONS = SalomeApp.xml jobmanager.png
+ICONS = resources/SalomeApp.xml resources/jobmanager.png
dist_salomeres_DATA = ${ICONS}
-ICONS = $(LIBICONS:%=resources/%)
# --------------------------------------------
# *.h --> *_moc.cxx
-I$(top_srcdir)/src/bases \
-I$(top_srcdir)/src/engine \
-I$(KERNEL_ROOT_DIR)/include/salome \
- $(OMNIORB_INCLUDES) \
+ $(OMNIORB_INCLUDES) $(OMNIORB_CXXFLAGS) \
-I../../idl \
-I$(top_srcdir)/src/wrappers \
-I$(top_srcdir)/src/genericgui
#ifndef _BL_MAINWINDOWS_QT_HXX_
#define _BL_MAINWINDOWS_QT_HXX_
+#ifdef WNT
+# if defined BL_Wrappers_Qt_EXPORTS
+# define BL_Wrappers_Qt_EXPORT __declspec( dllexport )
+# else
+# define BL_Wrappers_Qt_EXPORT __declspec( dllimport )
+# endif
+#else
+# define BL_Wrappers_Qt_EXPORT
+#endif
+
#include "BL_MainWindows_Wrap.hxx"
#include <map>
namespace BL
{
- class MainWindows_Qt : public MainWindows_Wrap, public QObject
+ class BL_Wrappers_Qt_EXPORT MainWindows_Qt : public MainWindows_Wrap, public QObject
{
public:
MainWindows_Qt(QMainWindow * main_window);
#ifndef _BL_MAINWINDOWS_SALOME_HXX_
#define _BL_MAINWINDOWS_SALOME_HXX_
+#ifdef WNT
+# if defined BL_Wrappers_SALOME_EXPORTS
+# define BL_Wrappers_SALOME_EXPORT __declspec( dllexport )
+# else
+# define BL_Wrappers_SALOME_EXPORT __declspec( dllimport )
+# endif
+#else
+# define BL_Wrappers_SALOME_EXPORT
+#endif
+
#include "BL_MainWindows_Wrap.hxx"
#include <SalomeApp_Application.h>
namespace BL
{
- class MainWindows_SALOME : virtual public MainWindows_Wrap,
+ class BL_Wrappers_SALOME_EXPORT MainWindows_SALOME : virtual public MainWindows_Wrap,
virtual public SalomeApp_Module
{
public:
nodist_libBL_Wrappers_SALOME_la_SOURCES =
libBL_Wrappers_SALOME_la_CXXFLAGS = $(qt4_cppflags) -I$(top_srcdir)/src/bases \
- $(OMNIORB_INCLUDES) $(BOOST_CPPFLAGS) \
+ $(OMNIORB_INCLUDES) $(OMNIORB_CXXFLAGS) $(BOOST_CPPFLAGS) \
-I$(KERNEL_ROOT_DIR)/include/salome \
-I$(GUI_ROOT_DIR)/include/salome
libBL_Wrappers_SALOME_la_LDFLAGS = $(qt4_ldflags)
-libBL_Wrappers_SALOME_la_LIBADD = -lQtGui -lQtCore $(top_builddir)/src/bases/libBL_Bases.la
+libBL_Wrappers_SALOME_la_LIBADD = -lQtGui -lQtCore $(top_builddir)/src/bases/libBL_Bases.la $(OMNIORB_LIBS) \
+ $(KERNEL_LDFLAGS) -lSalomeIDLKernel $(GUI_LDFLAGS) -lLightApp -lSalomeApp -lCAM -lsuit