Home
libucxx
libucxx
ucxx
nightly (0.53)
nightly (0.53)
stable (0.52)
legacy (0.51)
Toggle main menu visibility
Loading...
Searching...
No Matches
include
ucxx
component.h
1
5
#pragma once
6
7
#include <memory>
8
9
namespace
ucxx
{
10
11
namespace
detail {
12
class
ConstructorFactory;
13
}
14
21
class
Component
:
public
std::enable_shared_from_this<Component> {
22
protected
:
23
std::shared_ptr<Component>
_parent
{
nullptr
};
24
25
public
:
26
virtual
~Component
();
27
35
void
setParent
(std::shared_ptr<Component> parent);
36
44
[[nodiscard]] std::shared_ptr<Component>
getParent
()
const
;
45
};
46
47
}
// namespace ucxx
ucxx::Component
A UCXX component class to prevent early destruction of parent object.
Definition
component.h:21
ucxx::Component::setParent
void setParent(std::shared_ptr< Component > parent)
Set the internal parent reference.
ucxx::Component::_parent
std::shared_ptr< Component > _parent
A reference-counted pointer to the parent.
Definition
component.h:23
ucxx::Component::getParent
std::shared_ptr< Component > getParent() const
Get the internal parent reference.
ucxx
Definition
address.h:16
Generated by
1.18.0