senf::intrusive_refcount Class Reference

Reference count mixin for intrusive_ptr. More...

#include <senf/Utils/intrusive_refcount.hh>

Inheritance diagram for senf::intrusive_refcount:
Inheritance graph
[legend]

List of all members.


Detailed Description

Reference count mixin for intrusive_ptr.

This class provides a simple internally managed refcount and supplies the boost::intrusive_ptr required interface. To make a class compatible with boost::intrusive_ptr, just derive publicly from intrusive_refcount.

class SomeClass
    : public intrusive_refcount
{
    // ...
};

Two additional benefits of using intrusive_refcount are

  • The object can access it's own refcount
  • It is valid and safe to convert a plain object pointer to an intrusive_ptr at any time (not only after new)
This mixin class directly uses the default allocation strategy. If you want to customize the reference couting, use intrusive_refcount_t.

The interface of this class is defined in intrusive_refcount_t and intrusive_refcount_base (the latter of which you should not use directly).

Definition at line 153 of file intrusive_refcount.hh.


Protected Member Functions

  intrusive_refcount ()

Constructor & Destructor Documentation

senf::intrusive_refcount::
intrusive_refcount ()

Definition at line 63 of file intrusive_refcount.cci.


The documentation for this class was generated from the following files: