hpx/runtime_local/component_startup_shutdown_base.hpp

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

Defines

HPX_REGISTER_STARTUP_SHUTDOWN_REGISTRY(RegistryType, componentname)

This macro is used to register the given component factory with Hpx.Plugin. This macro has to be used for each of the components.

HPX_REGISTER_STARTUP_SHUTDOWN_REGISTRY_DYNAMIC(RegistryType, componentname)
HPX_REGISTER_STARTUP_SHUTDOWN_FUNCTIONS()

This macro is used to define the required Hpx.Plugin entry point for the startup/shutdown registry. This macro has to be used in not more than one compilation unit of a component module.

HPX_REGISTER_STARTUP_SHUTDOWN_FUNCTIONS_DYNAMIC()
namespace hpx
namespace components
struct component_startup_shutdown_base
#include <component_startup_shutdown_base.hpp>

The component_startup_shutdown_base has to be used as a base class for all component startup/shutdown registries.

Public Functions

virtual ~component_startup_shutdown_base()
virtual bool get_startup_function(startup_function_type &startup, bool &pre_startup) = 0

Return any startup function for this component.

Return

Returns true if the parameter startup has been successfully initialized with the startup function.

Parameters
  • startup: [in, out] The module is expected to fill this function object with a reference to a startup function. This function will be executed by the runtime system during system startup.

virtual bool get_shutdown_function(shutdown_function_type &shutdown, bool &pre_shutdown) = 0

Return any startup function for this component.

Return

Returns true if the parameter shutdown has been successfully initialized with the shutdown function.

Parameters
  • shutdown: [in, out] The module is expected to fill this function object with a reference to a startup function. This function will be executed by the runtime system during system startup.