CBMC
|
A helper class to store use-counts of objects held by small shared pointers. More...
#include <small_shared_ptr.h>
Public Member Functions | |
small_shared_pointeet ()=default | |
small_shared_pointeet (const small_shared_pointeet &) | |
small_shared_pointeet & | operator= (const small_shared_pointeet &) |
small_shared_pointeet (small_shared_pointeet &&) | |
small_shared_pointeet & | operator= (small_shared_pointeet &&) |
void | increment_use_count () |
void | decrement_use_count () |
Num | use_count () const |
Protected Member Functions | |
~small_shared_pointeet ()=default | |
Private Attributes | |
Num | use_count_ = 0 |
A helper class to store use-counts of objects held by small shared pointers.
The suggested usage pattern is to have such objects inherit from this class, and then to access them through a small_shared_ptrt. This approach provides us with shared_ptr-like semantics, but without the space overhead required by shared_ptr. The idea is similar to boost's intrusive_ptr.
Num | some numeric type, used to store a reference count |
Definition at line 182 of file small_shared_ptr.h.
|
default |
|
inline |
Definition at line 188 of file small_shared_ptr.h.
|
inline |
Definition at line 195 of file small_shared_ptr.h.
|
protecteddefault |
|
inline |
Definition at line 207 of file small_shared_ptr.h.
|
inline |
Definition at line 203 of file small_shared_ptr.h.
|
inline |
Definition at line 191 of file small_shared_ptr.h.
|
inline |
Definition at line 198 of file small_shared_ptr.h.
|
inline |
Definition at line 211 of file small_shared_ptr.h.
|
private |
Definition at line 221 of file small_shared_ptr.h.