entropic_hooks.cpp

src/facade/entropic_hooks.cpp

@file entropic_hooks.cpp @brief C API implementation for hook registration and deregistration.

Owners: @tvanfossen

entropic_deregister_hook

ENTROPIC_EXPORT entropic_error_t entropic_deregister_hook(entropic_handle_t handle, entropic_hook_point_t hook_point, entropic_hook_callback_t callback, void *user_data)

Deregister a previously registered hook callback.

src/facade/entropic_hooks.cpp:70

Show on the map →

Called by SCENARIO, TEST_CASE

Calls deregister_hook, get_registry

Source · 13 lines
entropic_deregister_hook(
    entropic_handle_t handle,
    entropic_hook_point_t hook_point,
    entropic_hook_callback_t callback,
    void* user_data) {

    if (!handle) {
        return ENTROPIC_ERROR_INVALID_HANDLE;
    }

    return get_registry(handle)->deregister_hook(
        hook_point, callback, user_data);
}
Activity · 3 steps
lines 76–76◇ if (!handle)lines 77–77return ENTROPIC_ERROR_INVALID_HANDLE;lines 80–81return get_registry(handle)->deregister_hook( hook_point, callback, user_data);
ENTROPIC_EXPORT entropic_error_t entropic_deregister_hook(entropic_handle_t handle, entropic_hook_point_t hook_point, entropic_hook_callback_t callback, void *user_data)

Deregister a previously registered hook callback.

src/facade/entropic_hooks.cpp:70

Show on the map →

Called by SCENARIO

Calls deregister_hook, get_registry

Source · 13 lines
entropic_deregister_hook(
    entropic_handle_t handle,
    entropic_hook_point_t hook_point,
    entropic_hook_callback_t callback,
    void* user_data) {

    if (!handle) {
        return ENTROPIC_ERROR_INVALID_HANDLE;
    }

    return get_registry(handle)->deregister_hook(
        hook_point, callback, user_data);
}
Activity · 3 steps
lines 76–76◇ if (!handle)lines 77–77return ENTROPIC_ERROR_INVALID_HANDLE;lines 80–81return get_registry(handle)->deregister_hook( hook_point, callback, user_data);

Requirements

REQ-API-005 REQ-HOOK-001

entropic_register_hook

ENTROPIC_EXPORT entropic_error_t entropic_register_hook(entropic_handle_t handle, entropic_hook_point_t hook_point, entropic_hook_callback_t callback, void *user_data, int priority)

Register a hook callback for a hook point.

src/facade/entropic_hooks.cpp:43

Show on the map →

Called by SCENARIO, SCENARIO, SCENARIO, TEST_CASE, register_hooks

Calls get_registry, register_hook

Source · 17 lines
entropic_register_hook(
    entropic_handle_t handle,
    entropic_hook_point_t hook_point,
    entropic_hook_callback_t callback,
    void* user_data,
    int priority) {

    if (!handle) {
        return ENTROPIC_ERROR_INVALID_HANDLE;
    }
    if (!callback) {
        return ENTROPIC_ERROR_INVALID_ARGUMENT;
    }

    return get_registry(handle)->register_hook(
        hook_point, callback, user_data, priority);
}
Activity · 5 steps
lines 50–50◇ if (!handle)lines 51–51return ENTROPIC_ERROR_INVALID_HANDLE;lines 53–53◇ if (!callback)lines 54–54return ENTROPIC_ERROR_INVALID_ARGUMENT;lines 57–58return get_registry(handle)->register_hook( hook_point, callback, user_data, priority);
ENTROPIC_EXPORT entropic_error_t entropic_register_hook(entropic_handle_t handle, entropic_hook_point_t hook_point, entropic_hook_callback_t callback, void *user_data, int priority)

Register a callback for an engine hook point.

src/facade/entropic_hooks.cpp:43

Show on the map →

Called by none

Calls get_registry, register_hook

Source · 17 lines
entropic_register_hook(
    entropic_handle_t handle,
    entropic_hook_point_t hook_point,
    entropic_hook_callback_t callback,
    void* user_data,
    int priority) {

    if (!handle) {
        return ENTROPIC_ERROR_INVALID_HANDLE;
    }
    if (!callback) {
        return ENTROPIC_ERROR_INVALID_ARGUMENT;
    }

    return get_registry(handle)->register_hook(
        hook_point, callback, user_data, priority);
}
Activity · 5 steps
lines 50–50◇ if (!handle)lines 51–51return ENTROPIC_ERROR_INVALID_HANDLE;lines 53–53◇ if (!callback)lines 54–54return ENTROPIC_ERROR_INVALID_ARGUMENT;lines 57–58return get_registry(handle)->register_hook( hook_point, callback, user_data, priority);

Requirements

REQ-API-005 REQ-HOOK-001