#include <pinapa-hooks.h>
Public Member Functions | |
| hook () | |
| void | run_hooks (hook_param param) |
| void | add_hook (hooked_function f) |
Private Attributes | |
| hooked_function | m_function |
The function run_hooks runs the operator () for each "function" of the list.
WARNING : Despite the commentary above and the names used below, the class pinapa_hook is used to store only ONE pinapa_hooked_function. Hence, the function add_hook *sets* the pinapa_hooked_function to its parameter. If called n times, the n-1 first values will be lost... Even better, the function run_hooks only run one function, that is to say the last pinapa_hooked_function stored with add_hook.
| pinapa::hook::hook | ( | ) | [inline] |
| void pinapa::hook::run_hooks | ( | hook_param | param | ) | [inline] |
| void pinapa::hook::add_hook | ( | hooked_function | f | ) | [inline] |
hooked_function pinapa::hook::m_function [private] |