//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//
-//
-// File: SalomeApp.h
-// Created: November, 2004
-// Author: OCC team
-// Copyright (C) CEA 2004
+#if !defined ( EVENT_H )
+#define EVENT_H
-// The following ifdef block is the standard way of creating macros which make exporting
-// from a DLL simpler. All files within this DLL are compiled with the SalomeApp_EXPORTS
-// symbol defined on the command line. this symbol should not be defined on any project
-// that uses this DLL. This way any other project whose source files include this file see
-// SalomeApp_API functions as being imported from a DLL, wheras this DLL sees symbols
-// defined with this macro as being exported.
#ifdef WIN32
-
-#ifdef EVENT_EXPORTS
-#define EVENT_EXPORT __declspec(dllexport)
-#else
-#define EVENT_EXPORT __declspec(dllimport)
-#endif
-
-#else
-#define EVENT_EXPORT
-#endif //WIN32
-
-#define APP_VERSION "0.1"
+# ifdef EVENT_EXPORTS
+# define EVENT_EXPORT __declspec(dllexport)
+# else
+# define EVENT_EXPORT __declspec(dllimport)
+# endif
+#else //WIN32
+# define EVENT_EXPORT
+#endif //WIN32
#if defined WIN32
#pragma warning ( disable: 4251 )
#endif
+#endif // EVENT_H
MOC_DIR = ../../moc
OBJECTS_DIR = ../../obj/$$TARGET
-KERNEL_CXXFLAGS = $$(KERNEL_ROOT_DIR)/include/salome
-
-INCLUDEPATH += ../../include $${KERNEL_CXXFLAGS}
+INCLUDEPATH += ../../include
LIBS +=
CONFIG -= debug release debug_and_release
DEFINES += EVENT_EXPORTS
HEADERS = Event.h
-HEADERS += SALOME_Event.hxx
+HEADERS += SALOME_Event.h
SOURCES = SALOME_Event.cxx
salomeinclude_HEADERS= \
Event.h \
- SALOME_Event.hxx
+ SALOME_Event.h
dist_libEvent_la_SOURCES = SALOME_Event.cxx
-libEvent_la_CPPFLAGS=$(QT_INCLUDES) @KERNEL_CXXFLAGS@
+libEvent_la_CPPFLAGS=$(QT_INCLUDES)
libEvent_la_LDFLAGS=$(QT_MT_LIBS)
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//
-//
// File : SALOME_Event.cxx
// Author : Sergey ANIKIN
-// Module : KERNEL
-// $Header$
-
-#include "SALOME_Event.hxx"
-//#include "utilities.h"
+#include "SALOME_Event.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
-// on Win32 using integer type for storing ThreadId
+// - on Unix using pthread_t type for storing ThreadId
+// - on Win32 using integer type for storing ThreadId
// NOT using integer ThreadId on both Unix and Win32 because (from documentation):
// "...Do not allow your program to rely on the internal structure or size of the pthread_t..."
#ifdef WIN32
#include <windows.h>
-
static DWORD myThread;
#else
#include <pthread.h>
-
static pthread_t myThread;
#endif
+/*!
+ \class SALOME_CustomEvent
+ \brief 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.
+
+ \warning The internal data is not destroyed by the class destructor.
+*/
+
+/*!
+ \brief Constructor.
+ \param type event type
+*/
SALOME_CustomEvent::SALOME_CustomEvent( int type )
- : QEvent( (QEvent::Type)type ), d( 0 )
+: QEvent( (QEvent::Type)type ), d( 0 )
{
}
-SALOME_CustomEvent::SALOME_CustomEvent( QEvent::Type type, void *data )
- : QEvent( type ), d( data )
+/*!
+ \brief Constructor.
+ \param type event type
+ \param data custom data
+*/
+SALOME_CustomEvent::SALOME_CustomEvent( QEvent::Type type, void* data )
+: QEvent( type ), d( data )
{
}
-void * SALOME_CustomEvent::data() const
+/*!
+ \brief Get custom data.
+ \return pointer to the internal data
+*/
+void* SALOME_CustomEvent::data() const
{
return d;
}
+/*!
+ \brief Set custom data.
+ \param data pointer to the internal data
+*/
void SALOME_CustomEvent::setData( void* data )
{
d = data;
}
+/*!
+ \class SALOME_Event
+ \brief The class which encapsulates data and functionality required for
+ posting component-specific events to perform arbitrary operations
+ in the main GUI thread.
+
+ SALOME_Event objects can be posted by any thread belonging to the GUI process.
+
+ It is necessary to derive a custom event class from SALOME_Event and
+ re-implement virtual Execute() method. This method should actually perform
+ the desirable operation. To pass all the required data to Execute() and
+ store a return value, arbitrary data fields can be added to the custom
+ event class. There is no need to protect such fields with a mutex, for only
+ one thread working with a SALOME_Event object is active at any moment.
+
+ Usage:
+ - Create SALOME_Event. Components can derive their own event class from
+ SALOME_Event in order to pass custom data to the event handler.
+ - Call process() method to post the event. After process() execution
+ it is possible to examine fields of your custom event object.
+ - Perform delete operator on the event to wake up the desktop (you can also
+ set <autoRelease> parameter to \c true to automatically wake up desktop after
+ process().
+
+ The method processed() is used by the desktop to signal that event processing
+ has been completed.
+
+ To make all this work, it is necessary to call static method GetSessionThread()
+ during the application initialization, i.e. from main() function.
+ It is important to call this method from the primary application thread.
+
+ Caveats:
+ - there are no.
+*/
+
+//! Total number of semaphore resources
const int NumberOfResources = 2;
/*!
- \return thread id
+ \brief Initialize event mechanism.
+
+ This function sets up the main application thread. It should be called
+ during the application initialization, i.e. main() function.
*/
void SALOME_Event::GetSessionThread(){
#ifdef WIN32
}
/*!
- \return true if it is session thread
+ \brief Check if the processing is in the main application thread.
+ \return \c true if this method is called from the main application thread
*/
bool SALOME_Event::IsSessionThread(){
bool aResult = false;
#else
aResult = myThread == pthread_self();
#endif
-// if(MYDEBUG) INFOS("IsSessionThread() - "<<aResult);
return aResult;
}
-
/*!
- Constructor
+ \brief Constructor.
*/
SALOME_Event::SALOME_Event(){
-// if(MYDEBUG) MESSAGE( "SALOME_Event::SALOME_Event(): this = "<<this );
// Prepare the semaphore
mySemaphore = new QSemaphore( NumberOfResources );
mySemaphore->acquire( NumberOfResources );
}
/*!
- Destructor
+ \brief Destructor.
*/
SALOME_Event::~SALOME_Event(){
-// if(MYDEBUG) MESSAGE( "SALOME_Event::~SALOME_Event(): this = "<<this );
if ( mySemaphore->available() < NumberOfResources )
mySemaphore->release( NumberOfResources - mySemaphore->available() );
delete mySemaphore;
}
/*!
- Posts the event and optionally waits for its completion
+ \brief Post the event and wait for its completion.
+ \sa processed()
*/
void SALOME_Event::process()
{
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" );
}
/*!
- Signals that this event has been processed
+ \brief Use this method to signal that this event has been processed.
*/
void SALOME_Event::processed()
{
-// if(MYDEBUG) MESSAGE( "SALOME_Event::processed(): this = "<<this );
- // process() takes control over mySemaphore after the next line is executed
mySemaphore->release( 1 );
}
+
+/*!
+ \fn virtual void SALOME_Event::Execute();
+ \brief This method should be redefined in the successor classes
+ to do real work.
+*/
+
+/*!
+ \class TMemFunEvent
+ \brief Template class for event which calls the function
+ without arguments and returning result.
+*/
+
+/*!
+ \class TVoidMemFunEvent
+ \brief Template class for event which calls the function
+ without arguments and without return value.
+*/
+
+/*!
+ \class TMemFun1ArgEvent
+ \brief Template class for event which calls the function
+ with one argument and returning result.
+*/
+
+/*!
+ \class TVoidMemFun1ArgEvent
+ \brief Template class for event which calls the function
+ with one argument and without return value.
+*/
+
+/*!
+ \class TMemFun2ArgEvent
+ \brief Template class for event which calls the function
+ with two arguments and returning result.
+*/
+
+/*!
+ \class TVoidMemFun2ArgEvent
+ \brief Template class for event which calls the function
+ with two arguments and without return value.
+*/
+
+/*!
+ \fn ProcessEvent
+ \brief Template function for processing events with return value.
+*/
+
+/*!
+ \fn ProcessVoidEvent
+ \brief Template function for processing events without return value.
+*/
--- /dev/null
+// KERNEL SALOME_Event : Define event posting mechanism
+//
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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
+//
+// File : SALOME_Event.h
+// Author : Sergey ANIKIN
+
+#ifndef SALOME_EVENT_H
+#define SALOME_EVENT_H
+
+#include <Event.h>
+
+#include <QEvent>
+
+//! SALOME custom event type
+#define SALOME_EVENT QEvent::Type( QEvent::User + 10000 )
+
+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; //!< internal data
+};
+
+class QSemaphore;
+
+class EVENT_EXPORT SALOME_Event
+{
+public:
+ SALOME_Event();
+ virtual ~SALOME_Event();
+
+ virtual void Execute() = 0;
+
+ static bool IsSessionThread();
+ void process();
+
+protected:
+ void processed();
+ friend class SalomeApp_EventFilter;
+
+ static void GetSessionThread();
+ friend int main(int, char **);
+
+private:
+ QSemaphore* mySemaphore; //!< internal semaphore
+};
+
+template<class TObject, typename TRes> class TMemFunEvent : public SALOME_Event
+{
+public:
+ typedef TRes TResult;
+ TResult myResult;
+ typedef TResult (TObject::* TAction)();
+ TMemFunEvent(TObject* theObject, TAction theAction,
+ TResult theResult = TResult()):
+ myObject(theObject),
+ myAction(theAction),
+ myResult(theResult)
+ {}
+ virtual void Execute()
+ {
+ myResult = (myObject->*myAction)();
+ }
+private:
+ TObject* myObject;
+ TAction myAction;
+};
+
+template<class TObject> class TVoidMemFunEvent : public SALOME_Event
+{
+public:
+ typedef void (TObject::* TAction)();
+ TVoidMemFunEvent(TObject* theObject, TAction theAction):
+ myObject(theObject),
+ myAction(theAction)
+ {}
+ virtual void Execute()
+ {
+ (myObject->*myAction)();
+ }
+private:
+ TObject* myObject;
+ TAction myAction;
+};
+
+template<class TObject, typename TRes, typename TArg, typename TStoreArg = TArg>
+class TMemFun1ArgEvent : public SALOME_Event
+{
+public:
+ typedef TRes TResult;
+ TResult myResult;
+ typedef TResult (TObject::* TAction)(TArg);
+ TMemFun1ArgEvent(TObject* theObject, TAction theAction, TArg theArg,
+ TResult theResult = TResult()):
+ myObject(theObject),
+ myAction(theAction),
+ myResult(theResult),
+ myArg(theArg)
+ {}
+ virtual void Execute()
+ {
+ myResult = (myObject->*myAction)(myArg);
+ }
+private:
+ TObject* myObject;
+ TAction myAction;
+ TStoreArg myArg;
+};
+
+template<class TObject, typename TArg, typename TStoreArg = TArg>
+class TVoidMemFun1ArgEvent : public SALOME_Event
+{
+public:
+ typedef void (TObject::* TAction)(TArg);
+ TVoidMemFun1ArgEvent(TObject* theObject, TAction theAction, TArg theArg):
+ myObject(theObject),
+ myAction(theAction),
+ myArg(theArg)
+ {}
+ virtual void Execute()
+ {
+ (myObject->*myAction)(myArg);
+ }
+private:
+ TObject* myObject;
+ TAction myAction;
+ TStoreArg myArg;
+};
+
+template<class TObject, typename TRes, typename TArg, typename TArg1, typename TStoreArg = TArg, typename TStoreArg1 = TArg1>
+class TMemFun2ArgEvent: public SALOME_Event
+{
+public:
+ typedef TRes TResult;
+ TResult myResult;
+ typedef TResult (TObject::* TAction)(TArg,TArg1);
+ TMemFun2ArgEvent(TObject* theObject, TAction theAction,
+ TArg theArg, TArg1 theArg1,
+ TResult theResult = TResult()):
+ myObject(theObject),
+ myAction(theAction),
+ myResult(theResult),
+ myArg(theArg),
+ myArg1(theArg1)
+ {}
+ virtual void Execute()
+ {
+ myResult = (myObject->*myAction)(myArg,myArg1);
+ }
+private:
+ TObject* myObject;
+ TAction myAction;
+ TStoreArg myArg;
+ TStoreArg1 myArg1;
+};
+
+template<class TObject, typename TArg, typename TArg1, typename TStoreArg = TArg, typename TStoreArg1 = TArg1>
+class TVoidMemFun2ArgEvent : public SALOME_Event
+{
+public:
+ typedef void (TObject::* TAction)(TArg,TArg1);
+ TVoidMemFun2ArgEvent(TObject* theObject, TAction theAction, TArg theArg, TArg1 theArg1):
+ myObject(theObject),
+ myAction(theAction),
+ myArg(theArg),
+ myArg1(theArg1)
+ {}
+ virtual void Execute()
+ {
+ (myObject->*myAction)(myArg,myArg1);
+ }
+private:
+ TObject* myObject;
+ TAction myAction;
+ TStoreArg myArg;
+ TStoreArg1 myArg1;
+};
+
+template<class TEvent> inline typename TEvent::TResult ProcessEvent(TEvent* theEvent)
+{
+ typename TEvent::TResult aResult;
+ if(SALOME_Event::IsSessionThread()) {
+ theEvent->Execute();
+ aResult = theEvent->myResult;
+ }
+ else {
+ theEvent->process();
+ aResult = theEvent->myResult;
+ }
+ delete theEvent;
+ return aResult;
+}
+
+inline void ProcessVoidEvent(SALOME_Event* theEvent)
+{
+ if(SALOME_Event::IsSessionThread()) {
+ theEvent->Execute();
+ }
+ else {
+ theEvent->process();
+ }
+ delete theEvent;
+}
+
+#endif // SALOME_EVENT_H
+++ /dev/null
-// KERNEL SALOME_Event : Define event posting mechanism
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-//
-//
-// File : SALOME_Event.hxx
-// Author : Sergey ANIKIN
-// Module : KERNEL
-// $Header$
-
-
-#ifndef SALOME_Event_HeaderFile
-#define SALOME_Event_HeaderFile
-
-#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;
-
-/*!
- * \class SALOME_Event
- * Description:
- * This class encapsulates data and functionality required for
- * posting component-specific events to perform arbitrary operations in main GUI thread.
- * SALOME_Event objects can be posted by any thread belonging to the GUI process.
- *
- * It is necessary to derive a custom event class from SALOME_Event and
- * re-implement virtual Execute() method. This method should actually perform
- * the desirable operation. To pass all the required data to Execute() and store a return value,
- * arbitrary data fields can be added to the custom event class. There is
- * no need to protect such fields with a mutex, for only one thread working with
- * a SALOME_Event object is active at any moment.
- *
- * Usage:
- * - create SALOME_Event.
- * Components can derive their own event class from SALOME_Event
- * in order to pass custom data to the event handler.
- * - call process() method to post the event. After process() execution
- * it is possible to examine fields of your custom event object.
- * - perform delete operator on the event to wake up the desktop (you can also set <autoRelease>
- * parameter to TRUE to automatically wake up desktop after process()
- *
- * processed() method is used by the desktop to signal that event processing
- * has been completed.
- *
- * Caveats:
- * There is no.
- */
-
-class EVENT_EXPORT SALOME_Event{
-public:
- SALOME_Event();
- virtual ~SALOME_Event();
-
- // To do real work
- virtual void Execute() = 0;
-
- static bool IsSessionThread();
- void process();
-
-protected:
- void processed();
- friend class SalomeApp_EventFilter;
-
- static void GetSessionThread();
- friend int main(int, char **);
-
-private:
- QSemaphore* mySemaphore;
-};
-
-
-/*!
- \class TMemFunEvent
- \brief Template class for member function
-*/
-template<class TObject, typename TRes> class /*EVENT_EXPORT */TMemFunEvent: public SALOME_Event{
-public:
- typedef TRes TResult;
- TResult myResult;
- typedef TResult (TObject::* TAction)();
- TMemFunEvent(TObject* theObject, TAction theAction,
- TResult theResult = TResult()):
- myObject(theObject),
- myAction(theAction),
- myResult(theResult)
- {}
- virtual void Execute(){
- myResult = (myObject->*myAction)();
- }
-private:
- TObject* myObject;
- TAction myAction;
-};
-
-
-/*!
- \class TVoidMemFunEvent
- \brief Template class for member function
-*/
-template<class TObject> class /*EVENT_EXPORT */TVoidMemFunEvent: public SALOME_Event{
-public:
- typedef void (TObject::* TAction)();
- TVoidMemFunEvent(TObject* theObject, TAction theAction):
- myObject(theObject),
- myAction(theAction)
- {}
- virtual void Execute(){
- (myObject->*myAction)();
- }
-private:
- TObject* myObject;
- TAction myAction;
-};
-
-
-/*!
- \class TMemFun1ArgEvent
- \brief Template for member function with one argument
-*/
-template<class TObject, typename TRes, typename TArg, typename TStoreArg = TArg> class/* EVENT_EXPORT */TMemFun1ArgEvent:
-public SALOME_Event{
-public:
- typedef TRes TResult;
- TResult myResult;
- typedef TResult (TObject::* TAction)(TArg);
- TMemFun1ArgEvent(TObject* theObject, TAction theAction, TArg theArg,
- TResult theResult = TResult()):
- myObject(theObject),
- myAction(theAction),
- myResult(theResult),
- myArg(theArg)
- {}
- virtual void Execute(){
- myResult = (myObject->*myAction)(myArg);
- }
-private:
- TObject* myObject;
- TAction myAction;
- TStoreArg myArg;
-};
-
-
-/*!
- \class TVoidMemFun1ArgEvent
- \brief Template for member function with one argument
-*/
-template<class TObject, typename TArg, typename TStoreArg = TArg> class /*EVENT_EXPORT */TVoidMemFun1ArgEvent: public SALOME_Event{
-public:
- typedef void (TObject::* TAction)(TArg);
- TVoidMemFun1ArgEvent(TObject* theObject, TAction theAction, TArg theArg):
- myObject(theObject),
- myAction(theAction),
- myArg(theArg)
- {}
- virtual void Execute(){
- (myObject->*myAction)(myArg);
- }
-private:
- TObject* myObject;
- TAction myAction;
- TStoreArg myArg;
-};
-
-
-/*!
- \class TMemFun2ArgEvent
- \brief Template for member function with two arguments
-*/
-template<class TObject, typename TRes, typename TArg, typename TArg1, typename TStoreArg = TArg, typename TStoreArg1 = TArg1> class
-/*EVENT_EXPORT */TMemFun2ArgEvent: public SALOME_Event{
-public:
- typedef TRes TResult;
- TResult myResult;
- typedef TResult (TObject::* TAction)(TArg,TArg1);
- TMemFun2ArgEvent(TObject* theObject, TAction theAction,
- TArg theArg, TArg1 theArg1,
- TResult theResult = TResult()):
- myObject(theObject),
- myAction(theAction),
- myResult(theResult),
- myArg(theArg),
- myArg1(theArg1)
- {}
- virtual void Execute(){
- myResult = (myObject->*myAction)(myArg,myArg1);
- }
-private:
- TObject* myObject;
- TAction myAction;
- TStoreArg myArg;
- TStoreArg1 myArg1;
-};
-
-
-/*!
- \class TVoidMemFun2ArgEvent
- \brief Template for member function with two arguments
-*/
-template<class TObject, typename TArg, typename TArg1, typename TStoreArg = TArg, typename TStoreArg1 = TArg1> class
-/*EVENT_EXPORT*/ TVoidMemFun2ArgEvent: public SALOME_Event{
-public:
- typedef void (TObject::* TAction)(TArg,TArg1);
- TVoidMemFun2ArgEvent(TObject* theObject, TAction theAction, TArg theArg, TArg1 theArg1):
- myObject(theObject),
- myAction(theAction),
- myArg(theArg),
- myArg1(theArg1)
- {}
- virtual void Execute(){
- (myObject->*myAction)(myArg,myArg1);
- }
-private:
- TObject* myObject;
- TAction myAction;
- TStoreArg myArg;
- TStoreArg1 myArg1;
-};
-
-
-/*!
- \fn ProcessEvent
- \brief Template function for processing events with result returing
-*/
-template<class TEvent> inline typename TEvent::TResult ProcessEvent(TEvent* theEvent){
- typename TEvent::TResult aResult;
- if(SALOME_Event::IsSessionThread()){
- theEvent->Execute();
- aResult = theEvent->myResult;
- }else{
- theEvent->process();
- aResult = theEvent->myResult;
- }
- delete theEvent;
- return aResult;
-}
-
-
-/*!
- \fn ProcessEvent
- \brief Template function for processing events without result
-*/
-inline void ProcessVoidEvent(SALOME_Event* theEvent){
- if(SALOME_Event::IsSessionThread()){
- theEvent->Execute();
- }else{
- theEvent->process();
- }
- delete theEvent;
-}
-
-
-#endif