From e5c4de03a904bc43924bfe9fb166b672dd19bde1 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 26 Jul 2007 19:57:14 +0000 Subject: More detail on the comment to indicate how to replace a functor in a class git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7587 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/caller.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/caller.h b/include/caller.h index 4b4651b33..5850ae2a6 100644 --- a/include/caller.h +++ b/include/caller.h @@ -32,11 +32,20 @@ * * These functor templates work this way so that you can simply and easily allow * for these class methods to be overridden from within a module, e.g. have a module - * which completely replaces the code for IsNick, etc. This is a very powerful feature - * which should be considered 'advanced' and not for beginners. If you do not - * understand these templates, STAY AWAY from playing with this until you do, as if - * you get this wrong, this can generate some pretty long winded and confusing error - * messages at compile time. + * which completely replaces the code f r IsNick, etc. For example, with the example + * above: + * + * MyNewFunction replaceme(ServerInstance); + * + * someclass->MyFunction = &replaceme; + * + * After this point, calls to someclass->MyFunction will call the new code in your + * replacement functor. + * + * This is a very powerful feature which should be considered 'advanced' and not for + * beginners. If you do not understand these templates, STAY AWAY from playing with + * this until you do, as if you get this wrong, this can generate some pretty long + * winded and confusing error messages at compile time. */ template class CoreExport HandlerBase0 -- cgit v1.2.3