Template Function class_loader::impl::createInstance
Defined in File class_loader_core.hpp
Function Documentation
-
template<typename Base, class ...Args, std::enable_if_t<is_interface_constructible_v<Base, Args...>, bool> = true>
Base *class_loader::impl::createInstance(const std::string &derived_class_name, ClassLoader *loader, Args&&... args) This function creates an instance of a plugin class given the derived name of the class and returns a pointer of the Base class type.
- Parameters:
derived_class_name – - The name of the derived class (unmangled)
loader – - The ClassLoader whose scope we are within
args – - Arguments for the constructor of the derived class (types defined by InterfaceTraits of the Base class)
- Returns:
A pointer to newly created plugin, note caller is responsible for object destruction