TWaitCondition.h

Go to the documentation of this file.
00001 #ifndef ROOT_TWaitCondition
00002 #define ROOT_TWaitCondition
00003 
00004 // @(#)root/qt:$Id: TWaitCondition.h 20882 2007-11-19 11:31:26Z rdm $
00005 // Author: Valeri Fine   21/01/2002
00006 
00007 /*************************************************************************
00008  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
00009  * Copyright (C) 2002 by Valeri Fine.                                    *
00010  * All rights reserved.                                                  *
00011  *                                                                       *
00012  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00013  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00014  *************************************************************************/
00015 
00016 #include <limits.h>
00017 #include "TQtRConfig.h"
00018 #ifdef R__QTGUITHREAD
00019 #include "TWin32Semaphore.h"
00020 
00021 class TWaitCondition : public TWin32Semaphore 
00022 {
00023    public:
00024      TWaitCondition() : TWin32Semaphore() {}
00025      ~TWaitCondition() {}
00026      bool wait (unsigned long time= ULONG_MAX) { Wait(); return TRUE;}
00027      void wakeOne () { Release(); }
00028 };
00029 #else
00030 // An dummy version for the "non-thread" implementations
00031 class TWaitCondition
00032 {
00033    public:
00034      TWaitCondition()  {}
00035      ~TWaitCondition() {}
00036           bool wait (unsigned long time=ULONG_MAX ) { if (time) {/* Wait() */}  return TRUE;}
00037      void wakeOne () { /* Release();*/  }
00038 };
00039 
00040 #endif
00041 #endif

Generated on Tue Jul 5 14:14:33 2011 for ROOT_528-00b_version by  doxygen 1.5.1