From 233c60293d98c5c27ad3f9fa986dc818d4741f25 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Mon, 4 Oct 2010 11:20:21 -0700 Subject: [PATCH] more cleanup --- signal_template.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/signal_template.h b/signal_template.h index b214c5e..45ca6d5 100644 --- a/signal_template.h +++ b/signal_template.h @@ -35,14 +35,22 @@ class Slot===NARG===_function: public Slot===NARG=== { public: - typedef T_return (*FUNCTION_POINTER)(===FORMAL_ARG_DECL===); + typedef T_return (*FUNCTION_POINTER)(===FORMAL_ARG_DECL===); // convenience typedef + /** + * Constructor. Converts a function pointer into raw data. + */ Slot===NARG===_function( const FUNCTION_POINTER func ) { // convert and store function pointer in slot_base this->data[0] = safe_horrible_cast(func); } + /** + * Perform callback. Converts raw data back into a function pointer, and calls it. + * + * @return Returns an object of type T_return; the result of the user callback. + */ T_return operator() (===FORMAL_ARG_DECL===) const { // retrieve data from slot_base and convert back to a function pointer