Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

scoped_block.h

00001 // -*- C++ -*-
00002 #ifndef IGSLISTENER_SCOPED_BLOCK
00003 #define IGSLISTENER_SCOPED_BLOCK
00004 
00005 namespace listener {
00006 
00007   template <typename T>
00008   class ScopedBlock {
00009   public:
00010     ScopedBlock(T* t) ;
00011     ~ScopedBlock() ;
00012   private:
00013     T* t_ ;
00014   } ;
00015 
00016 
00017 
00018 
00019 
00020   template <typename T>
00021   inline  ScopedBlock<T>::ScopedBlock(T* t): t_(t) {
00022     assert(t) ;
00023     t_->block_events() ;
00024   }
00025 
00026   template <typename T>
00027   inline ScopedBlock<T>::~ScopedBlock() {
00028     t_->unblock_events() ;
00029   }
00030 
00031 }
00032 
00033 #endif

Generated on Mon Jan 30 11:57:50 2006 for EventListener by  doxygen 1.3.9.1