Simplification of factory register macro: removing Type
Now we have this macro:
#define WOLF_REGISTER_PROCESSOR(ProcessorType, ProcessorName) \
namespace{ const bool WOLF_UNUSED ProcessorName##Registered = \
wolf::ProcessorFactory::get().registerCreator(ProcessorType, ProcessorName::create); } \
But for some months, we impose that the type key is the class name. Then we instantiate this macro, for example: WOLF_REGISTER_PROCESSOR("ProcessorOdom2d", ProcessorOdom2d);
There are redundant information (so we have to ask the developer to fill the same key). Where we could change the macro to:
#define WOLF_REGISTER_PROCESSOR(ProcessorName) \
namespace{ const bool WOLF_UNUSED ProcessorName##Registered = \
wolf::ProcessorFactory::get().registerCreator(#ProcessorName, ProcessorName::create); } \
That would be simpler and safer to instantiate: WOLF_REGISTER_PROCESSOR(ProcessorOdom2d);
Edited by Joan Vallvé Navarro