|virtual ReturnType||Call ()=0|
|Public Member Functions inherited from classbase|
|virtual CullResult||cull ()|
The templates below can be auto generated by tools/create_templates.pl. They are used to represent a functor with a given number of parameters and a specific return type. To prevent passing the wrong number of parameters and have the compiler detect this error at build-time, each class is numbered according to the number of parameters it takes, e.g. caller0, caller1, caller2. These have been generated from zero parameters to eight.
caller2<bool, User*, Channel*> MyFunction;
and initialize it correctly, when placed into a class you will be able to call it:
bool n = someclass->MyFunction(someuser, somechan);
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. For example, with the example above:
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.