CONFIG += qt thread debug dll shared
win32:DEFINES += WIN32
-DEFINES += DDS_EXPORTS OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS
+DEFINES += OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS
HEADERS = DDS.h
HEADERS += DDS_DicGroup.h
--- /dev/null
+TEMPLATE = lib
+TARGET = Event
+DESTDIR = ../../lib
+MOC_DIR = ../../moc
+OBJECTS_DIR = ../../obj/$$TARGET
+
+KERNEL_CXXFLAGS = $$(KERNEL_ROOT_DIR)/include/salome
+
+INCLUDEPATH += ../../include $${KERNEL_CXXFLAGS}
+LIBS +=
+
+CONFIG -= debug release debug_and_release
+CONFIG += qt thread debug dll shared
+
+win32:DEFINES += WIN32
+DEFINES += EVENT_EXPORTS
+
+HEADERS = Event.h
+HEADERS += SALOME_Event.hxx
+
+SOURCES = SALOME_Event.cxx
+
+includes.files = $$HEADERS
+includes.path = ../../include
+
+INSTALLS += includes
//#include "utilities.h"
-#include <qsemaphore.h>
-#include <qapplication.h>
-#include <qthread.h>
+#include <QSemaphore>
+#include <QApplication>
// asv 21.02.05 : introducing multi-platform approach of thread comparison
// on Unix using pthread_t type for storing ThreadId
static DWORD myThread;
#else
-#include <qthread.h>
#include <pthread.h>
static pthread_t myThread;
#endif
+SALOME_CustomEvent::SALOME_CustomEvent( int type )
+ : QEvent( (QEvent::Type)type ), d( 0 )
+{
+}
+
+SALOME_CustomEvent::SALOME_CustomEvent( QEvent::Type type, void *data )
+ : QEvent( type ), d( data )
+{
+}
+
+void * SALOME_CustomEvent::data() const
+{
+ return d;
+}
+
+void SALOME_CustomEvent::setData( void* data )
+{
+ d = data;
+}
+
+const int NumberOfResources = 2;
+
/*!
\return thread id
*/
SALOME_Event::SALOME_Event(){
// if(MYDEBUG) MESSAGE( "SALOME_Event::SALOME_Event(): this = "<<this );
// Prepare the semaphore
- mySemaphore = new QSemaphore( 2 );
- *mySemaphore += 2;
+ mySemaphore = new QSemaphore( NumberOfResources );
+ mySemaphore->acquire( NumberOfResources );
}
/*!
*/
SALOME_Event::~SALOME_Event(){
// if(MYDEBUG) MESSAGE( "SALOME_Event::~SALOME_Event(): this = "<<this );
- if ( mySemaphore->available() < mySemaphore->total() )
- *mySemaphore -= mySemaphore->total() - mySemaphore->available();
+ if ( mySemaphore->available() < NumberOfResources )
+ mySemaphore->release( NumberOfResources - mySemaphore->available() );
delete mySemaphore;
}
*/
void SALOME_Event::process()
{
- QThread::postEvent( qApp, new QCustomEvent( SALOME_EVENT, (void*)this ) );
-// if(MYDEBUG) MESSAGE( "SALOME_Event::process(): this = "<<this<<", *mySemaphore += 1 " );
- *mySemaphore += 1;
+ QApplication::postEvent( qApp, new SALOME_CustomEvent( SALOME_EVENT, (void*)this ) );
+// if(MYDEBUG) MESSAGE( "SALOME_Event::process(): this = "<<this<<", mySemaphore->acquire( 1 )" );
+ mySemaphore->acquire( 1 );
// if(MYDEBUG) MESSAGE( "SALOME_Event::process(): this = "<<this<<" - COMPLETED" );
}
{
// if(MYDEBUG) MESSAGE( "SALOME_Event::processed(): this = "<<this );
// process() takes control over mySemaphore after the next line is executed
- *mySemaphore -= 1;
+ mySemaphore->release( 1 );
}
#ifndef SALOME_Event_HeaderFile
#define SALOME_Event_HeaderFile
-#include <qevent.h>
+#include <QEvent>
+
+#include <Event.h>
#define SALOME_EVENT QEvent::Type( QEvent::User + 10000 )
+/*!
+ \class SALOME_CustomEvent
+ * Description:
+ * It is a generic event class for user-defined events.
+ * This class contains a generic void* data member that may be used
+ * for transferring event-specific data to the receiver.
+*/
+class EVENT_EXPORT SALOME_CustomEvent : public QEvent {
+public:
+ SALOME_CustomEvent( int type );
+ SALOME_CustomEvent( QEvent::Type type, void *data );
+
+ void *data() const;
+ void setData( void* data );
+
+private:
+ void *d;
+};
+
class QSemaphore;
/*!
* There is no.
*/
-#include <Event.h>
-
class EVENT_EXPORT SALOME_Event{
public:
SALOME_Event();
# VSR: this is the original packages list
# SUBDIRS += OBJECT
# VSR: already migrated to Qt4 packages
- SUBDIRS +=
+ SUBDIRS += OBJECT
endif
if ENABLE_GLVIEWER
# SUBDIRS += RegistryDisplay TOOLSGUI \
# Event Session SalomeApp SALOME_SWIG SALOME_PY SALOME_PYQT
# VSR: already migrated to Qt4 packages
- SUBDIRS +=
+ SUBDIRS += Event
endif
--- /dev/null
+TEMPLATE = lib
+TARGET = SalomeObject
+DESTDIR = ../../lib
+MOC_DIR = ../../moc
+OBJECTS_DIR = ../../obj/$$TARGET
+
+CASROOT = $$(CASROOT)
+CAS_CPPFLAGS = $${CASROOT}/inc
+
+CAS_LDPATH = -L$${CASROOT}/Linux/lib -lTKV3d
+
+INCLUDEPATH += ../../include $${CAS_CPPFLAGS}
+LIBS += $${CAS_LDPATH}
+
+CONFIG -= debug release debug_and_release
+CONFIG += qt thread debug dll shared
+
+win32:DEFINES += WIN32
+DEFINES += OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS
+
+HEADERS = SALOME_InteractiveObject.hxx
+HEADERS += Handle_SALOME_InteractiveObject.hxx
+HEADERS += SALOME_AISShape.hxx
+HEADERS += Handle_SALOME_AISShape.hxx
+HEADERS += SALOME_AISObject.hxx
+HEADERS += Handle_SALOME_AISObject.hxx
+HEADERS += SALOME_ListIO.hxx
+HEADERS += SALOME_ListIteratorOfListIO.hxx
+HEADERS += Handle_SALOME_ListNodeOfListIO.hxx
+HEADERS += SALOME_ListNodeOfListIO.hxx
+HEADERS += Handle_SALOME_Filter.hxx
+HEADERS += SALOME_Filter.hxx
+HEADERS += Handle_SALOME_TypeFilter.hxx
+HEADERS += SALOME_TypeFilter.hxx
+HEADERS += SALOME_DataMapOfIOMapOfInteger.hxx
+HEADERS += SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx
+HEADERS += Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx
+HEADERS += SALOME_Selection.h
+HEADERS += SALOME_AISObject.ixx
+HEADERS += SALOME_AISObject.jxx
+HEADERS += SALOME_AISShape.ixx
+HEADERS += SALOME_AISShape.jxx
+HEADERS += SALOME_Filter.ixx
+HEADERS += SALOME_Filter.jxx
+HEADERS += SALOME_InteractiveObject.ixx
+HEADERS += SALOME_InteractiveObject.jxx
+HEADERS += SALOME_TypeFilter.ixx
+HEADERS += SALOME_TypeFilter.jxx
+HEADERS += SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx
+
+SOURCES = SALOME_InteractiveObject.cxx
+SOURCES += SALOME_AISShape.cxx
+SOURCES += SALOME_AISObject.cxx
+SOURCES += SALOME_ListIO_0.cxx
+SOURCES += SALOME_ListIteratorOfListIO_0.cxx
+SOURCES += SALOME_ListNodeOfListIO_0.cxx
+SOURCES += SALOME_Filter.cxx
+SOURCES += SALOME_TypeFilter.cxx
+SOURCES += SALOME_DataMapOfIOMapOfInteger_0.cxx
+SOURCES += SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx
+SOURCES += SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx
+
+includes.files = $$HEADERS
+includes.path = ../../include
+
+INSTALLS += includes
SUBDIRS += PyInterp
SUBDIRS += PyConsole
SUBDIRS += Prs
+SUBDIRS += OBJECT
+SUBDIRS += Event