83 explicit operator bool(
void)
const;
106 SharedHandle::subscribe(
void) {
107 if (o !=
nullptr) o->rc.
inc();
110 SharedHandle::cancel(
void) {
111 if ((o !=
nullptr) && o->rc.
dec())
118 cancel(); o=
n; subscribe();
134 cancel(); o=sh.o; subscribe();
139 SharedHandle::operator bool(
void)
const {
int n
Number of negative literals for node type.
Base class for heap allocated objects.
virtual ~Object(void)
Delete shared object.
SharedHandle & operator=(const SharedHandle &sh)
Assignment operator maintaining reference count.
SharedHandle(void)
Create shared handle with no object pointing to.
SharedHandle::Object * object(void) const
Access to the shared object.
~SharedHandle(void)
Destructor that maintains reference count.
A class for thread-safe reference counting.
bool dec(void)
Decrement counter and return true if it hits zero.
void inc(void)
Increment counter.
#define GECODE_KERNEL_EXPORT
Gecode toplevel namespace