summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-26 19:57:14 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-26 19:57:14 +0000
commite5c4de03a904bc43924bfe9fb166b672dd19bde1 (patch)
tree72411954aa18da0abafbbfff77ffcea0786f5113 /include
parente04794af4a9124c109dc1f3e3cc5eb772229070e (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/caller.h19
1 files changed, 14 insertions, 5 deletions
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 <typename ReturnType> class CoreExport HandlerBase0