hpx/async_distributed/base_lco_with_value.hpp#

Defined in header hpx/async_distributed/base_lco_with_value.hpp.

See Public API for a list of names and headers that are part of the public HPX API.

namespace hpx
namespace components
namespace lcos
template<typename Result, typename RemoteResult, typename ComponentTag>
class base_lco_with_value : public hpx::lcos::base_lco, public ComponentTag#
#include <base_lco_with_value.hpp>

The base_lco_with_value class is the common base class for all LCO’s synchronizing on a value. The RemoteResult template argument should be set to the type of the argument expected for the set_value action.

Template Parameters:
  • RemoteResult – The type of the result value to be carried back to the LCO instance.

  • ComponentTag – The tag type representing the type of the component (either component_tag or managed_component_tag).

Public Types

using wrapping_type = detail::base_lco_wrapping_type<ComponentTag, base_lco_with_value>::type#
using base_type_holder = base_lco_with_value#

Public Functions

inline void set_value_nonvirt(RemoteResult &&result)#

The function set_value_nonvirt is called whenever a set_value_action is applied on this LCO instance. This function just forwards to the virtual function set_value, which is overloaded by the derived concrete LCO.

Parameters:

result – [in] The result value to be transferred from the remote operation back to this LCO instance.

inline Result get_value_nonvirt()#

The function get_result_nonvirt is called whenever a get_result_action is applied on this LCO instance. This function just forwards to the virtual function get_result, which is overloaded by the derived concrete LCO.

Public Static Functions

static inline components::component_type get_component_type() noexcept#
static inline void set_component_type(components::component_type type)#

Protected Types

using result_type = std::conditional_t<std::is_void_v<Result>, util::unused_type, Result>#

Protected Functions

~base_lco_with_value() override = default#

Destructor, needs to be virtual to allow for clean destruction of derived objects

inline virtual void set_event() override#
virtual void set_value(RemoteResult &&result) = 0#
virtual result_type get_value() = 0#
inline virtual result_type get_value(error_code&)#
template<typename ComponentTag>
class base_lco_with_value<void, void, ComponentTag> : public hpx::lcos::base_lco, public ComponentTag#
#include <base_lco_with_value.hpp>

The base_lco<void> specialization is used whenever the set_event action for a particular LCO doesn’t carry any argument.

Template Parameters:

void – This specialization expects no result value and is almost completely equivalent to the plain base_lco.

Public Types

using wrapping_type = detail::base_lco_wrapping_type<ComponentTag, base_lco_with_value>::type#
using base_type_holder = base_lco_with_value#
using set_value_action = base_lco::set_event_action#

Public Functions

inline void get_value()#

Protected Functions

~base_lco_with_value() override = default#

Destructor, needs to be virtual to allow for clean destruction of derived objects

namespace traits