00001 // Author: Valeri Fine 25/03/2004 00002 #ifndef ROOT_TQtEventQueue 00003 #define ROOT_TQtEventQueue 00004 00005 // @(#)root/qt:$Id: TQtEventQueue.h 28149 2009-04-08 07:25:32Z brun $ 00006 // Author: Valeri Fine 25/03/2004 00007 00008 /************************************************************************* 00009 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * 00010 * Copyright (C) 2004 by Valeri Fine. * 00011 * All rights reserved. * 00012 * * 00013 * For the licensing terms see $ROOTSYS/LICENSE. * 00014 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00015 *************************************************************************/ 00016 00017 #include "GuiTypes.h" 00018 #include <QQueue> 00019 00020 ///////////////////////////////////////////////////////////////////////////////// 00021 // 00022 // TQtEventQueue is a queue container of the pointers of Event_t structures 00023 // created by TQtClientFilter class 00024 // If auto-deleting is turned on, all the items in a collection are deleted when 00025 // the collection itself is deleted. 00026 // (for the full list of the members see: 00027 // http://doc.trolltech.com/3.3/qptrlist.html) 00028 // 00029 ///////////////////////////////////////////////////////////////////////////////// 00030 00031 00032 class TQtEventQueue : public QQueue<const Event_t *> { 00033 public: 00034 TQtEventQueue(); 00035 TQtEventQueue(const TQtEventQueue &src): QQueue<const Event_t *>(src) {;} 00036 virtual ~TQtEventQueue(); 00037 void enqueue(const Event_t *); 00038 const Event_t *dequeue(); 00039 int RemoveItems(const Event_t *ev); 00040 00041 protected: 00042 }; 00043 //______________________________________________________________________________ 00044 inline void TQtEventQueue::enqueue(const Event_t *ev) 00045 { 00046 QQueue<const Event_t *>::enqueue(ev); 00047 } 00048 //______________________________________________________________________________ 00049 inline const Event_t *TQtEventQueue::dequeue() 00050 { 00051 return isEmpty() ? 0 : 00052 QQueue<const Event_t *>::dequeue(); 00053 } 00054 00055 #endif