C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
caf::ref_counted Class Reference

Base class for reference counted objects with an atomic reference count. More...

#include <ref_counted.hpp>

Inheritance diagram for caf::ref_counted:
caf::detail::atomic_ref_counted caf::async::spsc_buffer< T > caf::io::network::manager caf::io::network::multiplexer::runnable caf::log::event caf::net::dsl::config_base caf::net::http::responder::promise_state caf::net::http::route caf::io::network::acceptor_manager caf::io::network::datagram_manager caf::io::network::stream_manager caf::detail::http_route_base< Ts... > caf::detail::http_catch_all_route_impl< F > caf::detail::http_route_base< Ts > caf::detail::http_simple_route_base

Public Types

using super = detail::atomic_ref_counted
 

Friends

void intrusive_ptr_add_ref (const ref_counted *p) noexcept
 
void intrusive_ptr_release (const ref_counted *p) noexcept
 

Related Symbols

(Note that these are not member symbols.)

template<class T , class... Ts>
intrusive_cow_ptr< T > make_copy_on_write (Ts &&... xs)
 Constructs an object of type T in an intrusive_cow_ptr.
 
template<class T , class... Ts>
intrusive_ptr< T > make_counted (Ts &&... xs)
 Constructs an object of type T in an intrusive_ptr.
 

Additional Inherited Members

- Public Member Functions inherited from caf::detail::atomic_ref_counted
 atomic_ref_counted (const atomic_ref_counted &)
 
atomic_ref_countedoperator= (const atomic_ref_counted &)
 
void ref () const noexcept
 Increases reference count by one.
 
void deref () const noexcept
 Decreases reference count by one and calls request_deletion when it drops to zero.
 
bool unique () const noexcept
 Queries whether there is exactly one reference.
 
size_t get_reference_count () const noexcept
 Queries the current reference count for this object.
 
- Protected Attributes inherited from caf::detail::atomic_ref_counted
std::atomic< size_t > rc_
 

Detailed Description

Base class for reference counted objects with an atomic reference count.

Serves the requirements of intrusive_ptr.

Note
All instances of ref_counted start with a reference count of 1.

Friends And Related Symbol Documentation

◆ make_copy_on_write()

template<class T , class... Ts>
intrusive_cow_ptr< T > make_copy_on_write ( Ts &&... xs)
related

Constructs an object of type T in an intrusive_cow_ptr.

@relatealso intrusive_cow_ptr


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