40 #ifndef GEOGRAM_BASIC_COUNTED
41 #define GEOGRAM_BASIC_COUNTED
121 if(counted !=
nullptr) {
132 if(counted !=
nullptr) {
160 mutable int nb_refs_;
Assertion checking mechanism.
#define geo_debug_assert(x)
Verifies that a condition is met.
Base class for reference-counted objects.
virtual ~Counted()
Destroys a reference counted object.
Counted()
Creates a reference counted object.
bool is_shared() const
Check if the object is shared.
static void ref(const Counted *counted)
Increments the reference count.
void unref() const
Decrements the reference count.
static void unref(const Counted *counted)
Decrements the reference count.
void ref() const
Increments the reference count.
int nb_refs() const
Gets the number of references that point to this object.
Common include file, providing basic definitions. Should be included before anything else by all head...
Global Vorpaline namespace.
Pointers with automatic reference counting.