LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AccessChecked.h
Go to the documentation of this file.
1 #ifndef IMPL_ACCESSCHECKED_H
2 #define IMPL_ACCESSCHECKED_H 1
3 
4 
5 #include "Exceptions.h"
6 #include <atomic>
7 
8 namespace IMPL {
9 
10  class LCEventImpl ;
11  class LCCollectionVec ;
12 
18  class AccessChecked {
19 
20  friend class LCEventImpl ;
21  friend class LCCollectionVec ;
22 
23  public:
24  AccessChecked() ;
25  virtual ~AccessChecked() { /* nop */; }
26  virtual int simpleUID() const { return _id ; }
27 
28  protected:
29  virtual void setReadOnly( bool readOnly ) ;
30 
31  void checkAccess() ;
32  void checkAccess(const char* what) ;
33 
34  protected:
35  bool _readOnly{false} ;
36  int _id{-1} ;
38  };
39 } // namespace IMPL
40 
41 #endif /* ifndef IMPL_ACCESSCHECKED_H */
Implementation of the LCCollection using (inheriting from) an STL vector of LCObjects.
Implementation of the main event class.
Definition: LCEventImpl.h:31
virtual void setReadOnly(bool readOnly)
virtual int simpleUID() const
Definition: AccessChecked.h:26
Controls access to objects.
Definition: AccessChecked.h:18
static std::atomic_int _lCObjectId
Definition: AccessChecked.h:37
virtual ~AccessChecked()
Definition: AccessChecked.h:25