A UCXX component class to prevent early destruction of parent object. More...
#include <component.h>
Public Member Functions | |
void | setParent (std::shared_ptr< Component > parent) |
Set the internal parent reference. More... | |
std::shared_ptr< Component > | getParent () const |
Get the internal parent reference. More... | |
Protected Attributes | |
std::shared_ptr< Component > | _parent {nullptr} |
A reference-counted pointer to the parent. | |
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.
std::shared_ptr<Component> ucxx::Component::getParent | ( | ) | const |
Get the internal parent reference.
Get the internal parent reference.
void ucxx::Component::setParent | ( | std::shared_ptr< Component > | parent | ) |
Set the internal parent reference.
Set the internal parent reference.
[in] | parent | the reference-counted pointer to the parent. |