Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

immer::refcount_policy Struct Reference

#include <refcount_policy.hpp>

Public Types

using spinlock_type = spinlock
 

Public Member Functions

 refcount_policy ()
 
 refcount_policy (disowned)
 
void inc ()
 
bool dec ()
 
void dec_unsafe ()
 
bool unique ()
 

Public Attributes

std::atomic< int > refcount
 

Detailed Description

A reference counting policy implemented using an atomic int count. It is thread-safe.

Definition at line 80 of file refcount_policy.hpp.

Member Typedef Documentation

◆ spinlock_type

Constructor & Destructor Documentation

◆ refcount_policy() [1/2]

immer::refcount_policy::refcount_policy ( )
inline

Definition at line 86 of file refcount_policy.hpp.

◆ refcount_policy() [2/2]

immer::refcount_policy::refcount_policy ( disowned  )
inline

Definition at line 87 of file refcount_policy.hpp.

Member Function Documentation

◆ dec()

bool immer::refcount_policy::dec ( )
inline

Definition at line 94 of file refcount_policy.hpp.

References refcount.

◆ dec_unsafe()

void immer::refcount_policy::dec_unsafe ( )
inline

Definition at line 99 of file refcount_policy.hpp.

References refcount.

◆ inc()

void immer::refcount_policy::inc ( )
inline

Definition at line 89 of file refcount_policy.hpp.

References refcount.

◆ unique()

bool immer::refcount_policy::unique ( )
inline

Definition at line 105 of file refcount_policy.hpp.

References refcount.

Member Data Documentation

◆ refcount

std::atomic<int> immer::refcount_policy::refcount
mutable

Definition at line 84 of file refcount_policy.hpp.

Referenced by dec(), dec_unsafe(), inc(), and unique().


The documentation for this struct was generated from the following file:
Released under the MIT license