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
00017 class AccessChecked {
00018
00019 friend class LCEventImpl ;
00020 friend class LCCollectionVec ;
00021
00022 public:
00023 AccessChecked() ;
00024 virtual ~AccessChecked() { ; }
00025 virtual int simpleUID() const { return _id ; }
00026
00027 protected:
00028 virtual void setReadOnly( bool readOnly ) ;
00029
00030 void checkAccess() ;
00031 void checkAccess(const char* what) ;
00032
00033 protected:
00034 bool _readOnly{false} ;
00035 int _id{-1} ;
00036
00037 };
00038 }
00039
00040 #endif