00001 #include "IMPL/AccessChecked.h"
00002 #include <iostream>
00003
00004
00005 namespace IMPL {
00006
00007 AccessChecked::AccessChecked() : _readOnly(false) {
00008
00009 static int lCObjectId(0) ;
00010 _id = lCObjectId++ ;
00011 }
00012
00013
00014 void AccessChecked::setReadOnly( bool readOnly ) { _readOnly = readOnly ; }
00015
00016 void AccessChecked::checkAccess() throw ( EVENT::ReadOnlyException ){
00017
00018 if( _readOnly ) throw EVENT::ReadOnlyException("") ;
00019 }
00020 void AccessChecked::checkAccess(const char* what) throw ( EVENT::ReadOnlyException ){
00021
00022 if( _readOnly ){
00023
00024 throw EVENT::ReadOnlyException(what) ;
00025 }
00026 }
00027
00028
00029
00030 }