Loading...
Searching...
No Matches
ucxx::Component Class Reference

A UCXX component class to prevent early destruction of parent object. More...

#include <component.h>

Inheritance diagram for ucxx::Component:
ucxx::Address ucxx::Context ucxx::Endpoint ucxx::Listener ucxx::MemoryHandle ucxx::RemoteKey ucxx::Request ucxx::Worker

Public Member Functions

void setParent (std::shared_ptr< Component > parent)
 Set the internal parent reference.
std::shared_ptr< Component > getParent () const
 Get the internal parent reference.

Protected Attributes

std::shared_ptr< Component > _parent {nullptr}
 A reference-counted pointer to the parent.

Detailed Description

A UCXX component class to prevent early destruction of parent object.

A UCXX component class storing a pointer of its parent to prevent it from being destroyed while child is still alive.

Member Function Documentation

◆ getParent()

std::shared_ptr< Component > ucxx::Component::getParent ( ) const
nodiscard

Get the internal parent reference.

Get the internal parent reference.

Returns
the reference-counted pointer to the parent.

◆ setParent()

void ucxx::Component::setParent ( std::shared_ptr< Component > parent)

Set the internal parent reference.

Set the internal parent reference.

Parameters
[in]parentthe reference-counted pointer to the parent.

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