#include <rlog/rloginit.h>
Public Member Functions | |
virtual void | init (int &argv, char **argc) |
virtual const char * | moduleName () const=0 |
Related Functions | |
(Note that these are not member functions.) | |
RLogModule * | RegisterModule (RLogModule *module) |
Currently this only allows for initialization callbacks. When RLogInit() is called, init() is called on all modules which have been registered.
void RLogModule::init | ( | int & | argv, | |
char ** | argc | |||
) | [virtual] |
Called by RLogInit() to give the modules the command-line arguments
virtual const char* rlog::RLogModule::moduleName | ( | ) | const [pure virtual] |
Must be implemented to return the name of the module.
RLogModule * RegisterModule | ( | RLogModule * | module | ) | [related] |
Registers the module - which will have init() called when RLogInit is called. Returns the module so that it can be used easily as a static initializer.
class MyModule : public rlog::RLogModule { public: virtual const char *moduleName() const {return "MyModule";} }; static RLogModule * testModule = rlog::RegisterModule( new MyModule() );