xapian-core
1.4.27
|
Base class for objects managed by opt_intrusive_ptr. More...
#include <intrusive_ptr.h>
Public Member Functions | |
opt_intrusive_base (const opt_intrusive_base &) | |
opt_intrusive_base & | operator= (const opt_intrusive_base &) |
opt_intrusive_base () | |
Construct object which is initially not reference counted. More... | |
virtual | ~opt_intrusive_base () |
void | ref () const |
void | unref () const |
Public Attributes | |
unsigned | _refs |
Reference count. More... | |
Protected Member Functions | |
void | release () const |
Start reference counting. More... | |
Base class for objects managed by opt_intrusive_ptr.
Definition at line 213 of file intrusive_ptr.h.
|
inline |
Definition at line 215 of file intrusive_ptr.h.
|
inline |
Construct object which is initially not reference counted.
The reference counting starts if release() is called.
Definition at line 226 of file intrusive_ptr.h.
|
inlinevirtual |
Definition at line 231 of file intrusive_ptr.h.
|
inline |
Definition at line 217 of file intrusive_ptr.h.
|
inline |
Definition at line 233 of file intrusive_ptr.h.
References Xapian::Internal::intrusive_base::_refs.
|
inlineprotected |
Start reference counting.
The object is constructed with _refs set to 0, meaning it isn't being reference counted.
Calling release() sets _refs to 1 if it is 0, and from then opt_intrusive_ptr will increment and decrement _refs. If it is decremented to 1, the object is deleted.
Definition at line 262 of file intrusive_ptr.h.
|
inline |
Definition at line 240 of file intrusive_ptr.h.
References Xapian::Internal::intrusive_base::_refs.
|
mutable |
Reference count.
This needs to be mutable so we can add/remove references through const pointers.
Definition at line 250 of file intrusive_ptr.h.