From: smh Date: Thu, 15 Apr 2004 09:23:36 +0000 (+0000) Subject: Add template method for event processing X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d7d2ae9947b3074d785aeeda8d3d5bf5a4e409e6;p=modules%2Fkernel.git Add template method for event processing --- diff --git a/src/Event/SALOME_Event.hxx b/src/Event/SALOME_Event.hxx index 477f1d489..4bf593d53 100644 --- a/src/Event/SALOME_Event.hxx +++ b/src/Event/SALOME_Event.hxx @@ -76,6 +76,7 @@ class QSemaphore; */ //=========================================================== + class SALOME_Event { public: @@ -99,6 +100,14 @@ private: }; +template 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();