added code generator to automatically generate hook source code from hooks config files