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

AccessChecked.h

Go to the documentation of this file.
00001 #ifndef IMPL_ACCESSCHECKED_H
00002 #define IMPL_ACCESSCHECKED_H 1
00003 
00004 
00005 #include "Exceptions.h"
00006 
00007 namespace IMPL {
00008   
00009   class  LCEventImpl ;
00010   class  LCCollectionVec ;
00011 
00012   /** Controls access to objects.
00013    * 
00014    * @author gaede
00015    * @version Sep 4, 2003
00016    */
00017   class AccessChecked {
00018     
00019     friend class LCEventImpl ;     
00020     friend class LCCollectionVec ; 
00021     
00022   public:
00023     AccessChecked() ;
00024     virtual int simpleUID() const { return _id ; }
00025 
00026   protected:
00027     virtual void setReadOnly( bool readOnly ) ;
00028     
00029     void checkAccess() throw ( EVENT::ReadOnlyException ) ;
00030     void checkAccess(const char* what) throw ( EVENT::ReadOnlyException ) ;
00031 
00032   protected: 
00033     bool _readOnly ;
00034     int _id ;
00035     
00036   };
00037 } // namespace IMPL
00038 
00039 #endif /* ifndef IMPL_ACCESSCHECKED_H */

Generated on Sun Jun 3 06:31:59 2007 for A TPC Tracking Environment by  doxygen 1.3.9.1