hpx/components_base/server/managed_component_base.hpp
hpx/components_base/server/managed_component_base.hpp#
Defined in header hpx/components_base/server/managed_component_base.hpp.
See Public API for a list of names and headers that are part of the public HPX API.
-
template<>
struct hpx::components::detail_adl_barrier::init<traits::construct_with_back_ptr>#
-
template<>
struct hpx::components::detail_adl_barrier::init<traits::construct_without_back_ptr>#
-
template<>
struct hpx::components::detail_adl_barrier::destroy_backptr<traits::managed_object_is_lifetime_controlled>#
-
template<>
struct hpx::components::detail_adl_barrier::destroy_backptr<traits::managed_object_controls_lifetime>#
-
template<>
struct hpx::components::detail_adl_barrier::manage_lifetime<traits::managed_object_is_lifetime_controlled>#
-
template<>
struct hpx::components::detail_adl_barrier::manage_lifetime<traits::managed_object_controls_lifetime>#
-
namespace hpx
-
namespace components
Functions
-
template<typename Component, typename Derived>
void intrusive_ptr_add_ref(managed_component<Component, Derived> *p) noexcept#
-
template<typename Component, typename Derived>
void intrusive_ptr_release(managed_component<Component, Derived> *p) noexcept#
-
template<typename Component, typename Derived>
class managed_component# - #include <managed_component_base.hpp>
The managed_component template is used as an indirection layer for components allowing to gracefully handle the access to non-existing components.
Additionally, it provides memory management capabilities for the wrapping instances, and it integrates the memory management with the AGAS service. Every instance of a managed_component gets assigned a global id. The provided memory management allocates the managed_component instances from a special heap, ensuring fast allocation and avoids a full network round trip to the AGAS service for each of the allocated instances.
- Template Parameters
Component – Component type
Derived – Most derived component type
Public Types
-
using heap_type = detail::wrapper_heap_list<detail::fixed_wrapper_heap<derived_type>>#
-
using value_type = derived_type#
Public Functions
-
managed_component(managed_component const&) = delete#
-
managed_component(managed_component&&) = delete#
-
managed_component &operator=(managed_component const&) = delete#
-
managed_component &operator=(managed_component&&) = delete#
-
inline explicit managed_component(Component *comp)#
Construct a managed_component instance holding a wrapped instance. This constructor takes ownership of the passed pointer.
- Parameters
comp – [in] The pointer to the wrapped instance. The managed_component takes ownership of this pointer.
-
inline managed_component()#
-
template<typename T, typename ...Ts, typename Enable = std::enable_if_t<!std::is_same_v<std::decay_t<T>, managed_component>>>
inline explicit managed_component(T &&t, Ts&&... ts)#
-
inline ~managed_component()#
Public Static Functions
-
static inline constexpr void finalize() noexcept#
Friends
-
template<typename C, typename D>
friend void intrusive_ptr_add_ref(managed_component<C, D> *p) noexcept#
-
template<typename C, typename D>
friend void intrusive_ptr_release(managed_component<C, D> *p) noexcept#
-
template<typename Component, typename Wrapper, typename CtorPolicy, typename DtorPolicy>
class managed_component_base : public hpx::components::detail::base_managed_component# Public Types
-
using this_component_type = std::conditional_t<std::is_void_v<Component>, managed_component_base, Component>#
-
using wrapped_type = this_component_type#
-
using has_managed_component_base = void#
-
using ctor_policy = CtorPolicy#
-
using dtor_policy = DtorPolicy#
-
using wrapping_type = managed_component<Component, Wrapper>#
Public Functions
-
managed_component_base(managed_component_base const&) = delete#
-
managed_component_base(managed_component_base&&) = delete#
-
managed_component_base &operator=(managed_component_base const&) = delete#
-
managed_component_base &operator=(managed_component_base&&) = delete#
-
constexpr managed_component_base() noexcept = default#
-
inline explicit managed_component_base(managed_component<Component, Wrapper> *back_ptr) noexcept#
-
inline ~managed_component_base()#
Protected Functions
-
inline void set_back_ptr(components::managed_component<Component, Wrapper> *bp) noexcept#
Private Members
-
managed_component<Component, Wrapper> *back_ptr_ = nullptr#
Friends
- friend struct detail_adl_barrier::init
-
using this_component_type = std::conditional_t<std::is_void_v<Component>, managed_component_base, Component>#
-
namespace detail_adl_barrier#
-
template<typename DtorTag>
struct destroy_backptr#
- template<> managed_object_controls_lifetime >
- template<> managed_object_is_lifetime_controlled >
Public Static Functions
-
template<typename BackPtr>
static inline void call(BackPtr *back_ptr)
-
template<typename BackPtr>
-
template<typename BackPtrTag>
struct init#
- template<> construct_with_back_ptr >
- template<> construct_without_back_ptr >
-
template<typename DtorTag>
struct manage_lifetime#
- template<> managed_object_controls_lifetime >
- template<> managed_object_is_lifetime_controlled >
-
template<typename DtorTag>
-
template<typename Component, typename Derived>
-
namespace components