All Classes Namespaces Functions Variables Typedefs Enumerations Friends
Public Member Functions | Protected Attributes | List of all members
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. More...
 
std::shared_ptr< ComponentgetParent () const
 Get the internal parent reference. More...
 

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

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: