cycle_ptr
Public Member Functions | Protected Member Functions | Friends | List of all members
cycle_ptr::detail::vertex Class Reference
Inheritance diagram for cycle_ptr::detail::vertex:
Inheritance graph
[legend]
Collaboration diagram for cycle_ptr::detail::vertex:
Collaboration graph
[legend]

Public Member Functions

auto get_control () const noexcept -> intrusive_ptr< base_control >
 Read the target control block. More...
 

Protected Member Functions

 vertex ([[maybe_unused]] const vertex &other)
 
 vertex (intrusive_ptr< base_control > bc) noexcept
 
auto reset () -> void
 
auto reset (intrusive_ptr< base_control > new_dst, bool has_reference, bool no_red_promotion) -> void
 Assign a new new_dst. More...
 
auto owner_is_expired () const noexcept -> bool
 Test if origin is expired.
 
auto throw_if_owner_expired () const -> void
 Throw exception if owner is expired. More...
 

Friends

class generation
 
class base_control
 

Member Function Documentation

◆ get_control()

auto cycle_ptr::detail::vertex::get_control ( ) const -> intrusive_ptr< base_control >
noexcept

Read the target control block.

Returns
The target control block of this vertex.

◆ reset()

auto cycle_ptr::detail::vertex::reset ( intrusive_ptr< base_control new_dst,
bool  has_reference,
bool  no_red_promotion 
) -> void
protected

Assign a new new_dst.

Assigns new_dst as the pointee of this vertex.

Parameters
new_dstThe destination of the edge. May be null.
has_referenceIf set, new_dst has a reference count that will be consumed. (Ignored for null new_dst.)
no_red_promotionIf set, caller guarantees no red promotion is required. Note that this must be set, if has_reference is set. (Ignored for null new_dst.)

◆ throw_if_owner_expired()

auto cycle_ptr::detail::vertex::throw_if_owner_expired ( ) const -> void
inlineprotected

Throw exception if owner is expired.

It is not allowed to read member pointers from an expired object.

Todo:
Create dedicated exception for this case.

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