ROSE
0.11.96.11
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Variables
Typedefs
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
w
Enumerations
Enumerator
a
b
c
d
e
f
i
l
m
n
o
s
t
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
~
Variables
_
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
i
j
l
m
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
i
n
o
p
r
s
t
u
v
Related Functions
a
b
i
o
Files
File List
Examples
rexompiler
src
util
Sawyer
SharedObject.h
1
// WARNING: Changes to this file must be contributed back to Sawyer or else they will
2
// be clobbered by the next update from Sawyer. The Sawyer repository is at
3
// https://github.com/matzke1/sawyer.
4
5
6
7
8
#ifndef Sawyer_SharedObject_H
9
#define Sawyer_SharedObject_H
10
11
#include <Sawyer/Sawyer.h>
12
#include <Sawyer/Synchronization.h>
13
14
namespace
Sawyer
{
15
64
class
SAWYER_EXPORT
SharedObject
{
65
template
<
class
U>
friend
class
SharedPointer
;
66
mutable
SAWYER_THREAD_TRAITS::Mutex mutex_;
67
mutable
size_t
nrefs_;
68
public
:
70
SharedObject
(): nrefs_(0) {}
71
76
SharedObject
(
const
SharedObject
&): nrefs_(0) {}
77
79
virtual
~SharedObject
() {
80
ASSERT_require(nrefs_==0);
81
}
82
86
SharedObject
&
operator=
(
const
SharedObject
&) {
87
return
*
this
;
88
}
89
};
90
91
}
// namespace
92
93
#endif
Sawyer::SharedObject::~SharedObject
virtual ~SharedObject()
Virtual destructor.
Definition:
SharedObject.h:79
Sawyer::SharedObject::SharedObject
SharedObject()
Default constructor.
Definition:
SharedObject.h:70
Sawyer::SharedPointer
Reference-counting intrusive smart pointer.
Definition:
SharedPointer.h:68
Sawyer
Name space for the entire library.
Definition:
Access.h:13
Sawyer::SharedObject::operator=
SharedObject & operator=(const SharedObject &)
Assignment.
Definition:
SharedObject.h:86
Sawyer::SharedObject
Base class for reference counted objects.
Definition:
SharedObject.h:64
Sawyer::SharedObject::SharedObject
SharedObject(const SharedObject &)
Copy constructor.
Definition:
SharedObject.h:76
Generated on Mon Dec 19 2022 23:39:55 for ROSE by
1.8.17