QDescriptorList.hh

00001 /*
00002 * APOLLO: A complete DAQ and Online Data Analysis Framework for Cuore 
00003 * $Id: QDescriptorList.hh 3 2006-04-20 17:37:43Z pallas $
00004 * M.P. created 16/4/4
00005 * 
00006 * Class QDescriptorList: list of file descriptors for a server
00007 *
00008 */
00009 #ifndef _DESCRIPTOR_LIST_HH_
00010 #define _DESCRIPTOR_LIST_HH_
00011 
00012 // C/C++ Includes
00013 #include <sys/poll.h>
00014 
00015 
00016 // Apollo Includes
00017 #include "QCuore.hh"
00018 
00019 
00020 // Used Classes
00021 class QFileDescriptor;
00022 
00023 class QDescriptorList 
00024 {
00025 public:
00026    
00027   // ctor
00028   QDescriptorList ();
00029    
00030   // dtor
00031   virtual ~QDescriptorList() {}
00032    
00033   // Add a file descriptor to the list
00034   void AddDescriptor(QFileDescriptor* ptr);
00035   
00036   // Remove descriptor at index
00037   void DelDescriptor(int);
00038   
00039   // Return descriptor at index
00040   QFileDescriptor* operator [] (int);
00041   
00042   // Return poll structure to all file descriptors
00043   struct pollfd* GetPollFds();
00044   
00045   // Geturn the number of elements
00046   int Elements();
00047 
00048 private:
00049 
00050    QFileDescriptor *fHead, *fTail;
00051    int fElements;
00052 };
00053 
00054 #endif // _DESCRIPTOR_LIST_HH_

Generated on Fri Mar 6 13:40:39 2009 for CUORE Software by  doxygen 1.5.1