Template Function class_loader::impl::registerPlugin

Function Documentation

template<typename Derived, typename Base>
void class_loader::impl::registerPlugin(const std::string &class_name, const std::string &base_class_name)

This function is called by the CLASS_LOADER_REGISTER_CLASS macro in plugin_register_macro.h to register factories. Classes that use that macro will cause this function to be invoked when the library is loaded. The function will create a MetaObject (i.e. factory) for the corresponding Derived class and insert it into the appropriate FactoryMap in the global Base-to-FactoryMap map. Note that the passed class_name is the literal class name and not the mangled version.

Parameters:
  • Derived – - parameteric type indicating concrete type of plugin

  • Base – - parameteric type indicating base type of plugin

  • class_name – - the literal name of the class being registered (NOT MANGLED)