LCIO  "2.7.4"
 All Classes Namespaces Functions Variables Typedefs Friends Pages
AccessChecked.h
1 #ifndef IMPL_ACCESSCHECKED_H
2 #define IMPL_ACCESSCHECKED_H 1
3 
4 
5 #include "Exceptions.h"
6 
7 namespace IMPL {
8 
9  class LCEventImpl ;
10  class LCCollectionVec ;
11 
17  class AccessChecked {
18 
19  friend class LCEventImpl ;
20  friend class LCCollectionVec ;
21 
22  public:
23  AccessChecked() ;
24  virtual ~AccessChecked() { /* nop */; }
25  virtual int simpleUID() const { return _id ; }
26 
27  protected:
28  virtual void setReadOnly( bool readOnly ) ;
29 
30  void checkAccess() throw ( EVENT::ReadOnlyException ) ;
31  void checkAccess(const char* what) throw ( EVENT::ReadOnlyException ) ;
32 
33  protected:
34  bool _readOnly ;
35  int _id ;
36 
37  };
38 } // namespace IMPL
39 
40 #endif /* ifndef IMPL_ACCESSCHECKED_H */
Implementation of the LCCollection using (inheriting from) an STL vector of LCObjects.
Definition: LCCollectionVec.h:26
Implementation of the main event class.
Definition: LCEventImpl.h:31
Controls access to objects.
Definition: AccessChecked.h:17
EventException used for signaling a 'read only exception'.
Definition: Exceptions.h:74