]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Add template method for event processing
authorsmh <smh@opencascade.com>
Thu, 15 Apr 2004 09:23:36 +0000 (09:23 +0000)
committersmh <smh@opencascade.com>
Thu, 15 Apr 2004 09:23:36 +0000 (09:23 +0000)
src/Event/SALOME_Event.hxx

index 477f1d48961e6e31073d80a0b4a02f5919510c37..4bf593d53045f7b48e142e03ec5cf82ea9d56e89 100644 (file)
@@ -76,6 +76,7 @@ class QSemaphore;
  */
 //===========================================================
 
+
 class SALOME_Event
 {
 public:
@@ -99,6 +100,14 @@ private:
 };
 
 
+template<class TEvent> inline typename TEvent::TResult ProcessEvent(TEvent* theEvent){
+  theEvent->process();
+  typename TEvent::TResult aResult = theEvent->myResult;
+  theEvent->release();
+  return aResult;
+}
+
+
 inline void ProcessVoidEvent(SALOME_Event* theEvent){
   theEvent->process();
   theEvent->release();