From: nri Date: Fri, 30 Apr 2004 12:50:12 +0000 (+0000) Subject: NRI : Merge from Event_Server. X-Git-Tag: Ecole_Ete_a2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=45479641ad7862a9a24d4493cb36ba4703e9f11b;p=modules%2Fkernel.git NRI : Merge from Event_Server. --- diff --git a/src/Event/Makefile.in b/src/Event/Makefile.in new file mode 100644 index 000000000..426af6888 --- /dev/null +++ b/src/Event/Makefile.in @@ -0,0 +1,52 @@ +# SALOME Utils : general SALOME's definitions and tools +# +# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.in +# Author : Marc Tajchman (CEA) +# Module : SALOME +# $Header$ + +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@:@top_srcdir@/idl + + +@COMMENCE@ + +# header files +EXPORT_HEADERS= \ + SALOME_Event.hxx + +EXPORT_PYSCRIPTS = +# Libraries targets + +LIB = libEvent.la +LIB_SRC = SALOME_Event.cxx + +CPPFLAGS+=$(QT_INCLUDES) +LDFLAGS+=$(QT_MT_LIBS) + +@CONCLUDE@ + + diff --git a/src/Event/SALOME_Event.cxx b/src/Event/SALOME_Event.cxx new file mode 100644 index 000000000..dfebd7b02 --- /dev/null +++ b/src/Event/SALOME_Event.cxx @@ -0,0 +1,140 @@ +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOME_Event.cxx +// Author : Sergey ANIKIN +// Module : KERNEL +// $Header$ + +#include "SALOME_Event.hxx" + +#include "utilities.h" + +#include +#include +#include + +#ifdef _DEBUG_ +static int MYDEBUG = 0; +#else +static int MYDEBUG = 0; +#endif + +//=========================================================== +/*! + * SALOME_Event::SALOME_Event + * Constructor + */ +//=========================================================== +SALOME_Event::SALOME_Event(): + myWait( true ), + myAutoRelease( false ) +{ + if(MYDEBUG) MESSAGE( "SALOME_Event::SALOME_Event(): this = "<operator+=( mySemaphore->total() ); + } + } + if(MYDEBUG) MESSAGE( "SALOME_Event::processed() COMPLETED: this = "<