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
00013
00014
00015
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 }
00038
00039 #endif