library: libCore #include "TSysEvtHandler.h"

# TFileHandler

class description - source file - inheritance tree (.pdf)

## class TFileHandler : public TSysEvtHandler

| Inheritance Chart:

`TObject`

`TQObject`

<-

`TSysEvtHandler`

<-

`TFileHandler`

        protected:

                       TFileHandler()

        public:

                          TFileHandler(int fd, int mask)
                          TFileHandler(const TFileHandler&)
                  virtual ~TFileHandler()
             virtual void Add()
           static TClass* Class()
                      int GetFd() const
           virtual Bool_t HasReadInterest()
           virtual Bool_t HasWriteInterest()
          virtual TClass* IsA() const
           virtual Bool_t IsReadReady() const
           virtual Bool_t IsWriteReady() const
           virtual Bool_t Notify()
            TFileHandler& operator=(const TFileHandler&)
           virtual Bool_t ReadNotify()
             virtual void Remove()
             virtual void ResetReadyMask()
                     void SetFd(int fd)
             virtual void SetInterest(Int_t mask)
             virtual void SetReadReady()
             virtual void SetWriteReady()
             virtual void ShowMembers(TMemberInspector& insp, char* parent)
             virtual void Streamer(TBuffer& b)
                     void StreamerNVirtual(TBuffer& b)
           virtual Bool_t WriteNotify()

### Data Members

        protected:

          int fFileNum    File descriptor
          int fMask       Event interest mask, either bit 1 (read), 2 (write) or both can be set
          int fReadyMask  Readiness mask, either bit 1 (read), 2 (write) or both can be set

        public:

          static const enum TFileHandler:: kRead
          static const enum TFileHandler:: kWrite

## Class Description

     TSysEvtHandler

     Abstract base class for handling system events.

TFileHandler(int fd, int mask)

     Create a file descriptor event handler. If mask=kRead then we
     want to monitor the file for read readiness, if mask=kWrite
     then we monitor the file for write readiness, if mask=kRead|kWrite
     then we monitor both read and write readiness.

Bool_t Notify()

     Notify when event occured on descriptor associated with this handler.

Bool_t ReadNotify()

     Notify when something can be read from the descriptor associated with
     this handler.

Bool_t WriteNotify()

     Notify when something can be written to the descriptor associated with
     this handler.

Bool_t HasReadInterest()

     True if handler is interested in read events.

Bool_t HasWriteInterest()

     True if handler is interested in write events.

void SetInterest(Int_t mask)

     Set interest mask to 'mask'.

void Add()

     Add file event handler to system file handler list.

void Remove()

     Remove file event handler from system file handler list.

### Inline Functions

                     void ~TFileHandler()
             TFileHandler TFileHandler(int fd, int mask)
                      int GetFd() const
                     void SetFd(int fd)
                     void ResetReadyMask()
                     void SetReadReady()
                     void SetWriteReady()
                   Bool_t IsReadReady() const
                   Bool_t IsWriteReady() const
                  TClass* Class()
                  TClass* IsA() const
                     void ShowMembers(TMemberInspector& insp, char* parent)
                     void Streamer(TBuffer& b)
                     void StreamerNVirtual(TBuffer& b)
             TFileHandler TFileHandler(const TFileHandler&)
            TFileHandler& operator=(const TFileHandler&)

Author: Fons Rademakers 16/09/95
Last update: root/base:$Name: $:$Id: TSysEvtHandler.cxx,v 1.5 2004/12/15 16:04:57 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *