Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/Geant4/toolx/X11/dispatcher is written in an unsupported language. File is not indexed.

0001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
0002 // See the file tools.license for terms.
0003 
0004 #ifndef toolx_X11_dispatcher
0005 #define toolx_X11_dispatcher
0006 
0007 #include <X11/Xlib.h>
0008 
0009 namespace toolx {
0010 namespace X11 {
0011 
0012 class dispatcher {
0013 public:
0014   virtual bool dispatch(XEvent&) = 0;
0015   virtual Window window() const = 0;
0016   virtual dispatcher* copy() const = 0;
0017 public:
0018   dispatcher():m_is_valid(true){
0019   }
0020   virtual ~dispatcher(){
0021   }
0022 public:
0023   dispatcher(const dispatcher& a_from):m_is_valid(a_from.m_is_valid){
0024   }
0025   dispatcher& operator=(const dispatcher& a_from) { m_is_valid = a_from.m_is_valid;return *this;}
0026 public:
0027   bool is_valid() const {return m_is_valid;}
0028   void invalidate() {m_is_valid = false;}
0029 protected:
0030   bool m_is_valid;
0031 };
0032 
0033 }}
0034 
0035 
0036 #endif