LCIO
02.17
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
cpp
src
IMPL
AccessChecked.cc
Go to the documentation of this file.
1
#include "
IMPL/AccessChecked.h
"
2
#include <
iostream
>
3
4
5
namespace
IMPL {
6
7
std::atomic_int
AccessChecked::_lCObjectId
(0);
8
9
AccessChecked::AccessChecked
() : _readOnly(false) {
10
// provide a simple unique id for LCObjects
11
_id
=
_lCObjectId
++ ;
12
}
13
14
void
AccessChecked::setReadOnly
(
bool
readOnly ) {
15
_readOnly
= readOnly ;
16
}
17
18
void
AccessChecked::checkAccess
() {
19
if
(
_readOnly
) {
20
throw
EVENT::ReadOnlyException
(
""
) ;
21
}
22
}
23
24
void
AccessChecked::checkAccess
(
const
char
* what) {
25
if
(
_readOnly
) {
26
throw
EVENT::ReadOnlyException
(what) ;
27
}
28
}
29
30
}
std::atomic_int
IMPL::AccessChecked::checkAccess
void checkAccess()
Definition:
AccessChecked.cc:18
IMPL::AccessChecked::AccessChecked
AccessChecked()
Definition:
AccessChecked.cc:9
iostream
IMPL::AccessChecked::_id
int _id
Definition:
AccessChecked.h:36
AccessChecked.h
IMPL::AccessChecked::_readOnly
bool _readOnly
Definition:
AccessChecked.h:35
IMPL::AccessChecked::setReadOnly
virtual void setReadOnly(bool readOnly)
Definition:
AccessChecked.cc:14
IMPL::AccessChecked::_lCObjectId
static std::atomic_int _lCObjectId
Definition:
AccessChecked.h:37
EVENT::ReadOnlyException
EventException used for signaling a 'read only exception'.
Definition:
Exceptions.h:74
Generated on Thu Dec 16 2021 15:42:54 for LCIO by
1.8.5