Template Class PreloadingClassLoader
Defined in File preloading_class_loader.hpp
Inheritance Relationships
Base Type
public class_loader::ClassLoader
Class Documentation
-
template<typename Impl, typename Base>
class PreloadingClassLoader : public class_loader::ClassLoader This pluginlib classloader alternative can load compiled-in classes and provide them as if they were loaded via the standard pluginlib search mechanism - without even triggering the search.
- Template Parameters:
Impl – The class to be preloaded.
Base – The base class for which pluginlib is looking.
Public Functions
-
inline ~PreloadingClassLoader() override
Public Static Functions
-
static inline void preload(const std::string &pluginlibType, pluginlib::ClassLoader<Base> &loader)
“Install” the preloading classloader into the given classloader.
- Parameters:
pluginlibType – [in] Name of the type that would be search for by pluginlib.
loader – [in] The pluginlib loader into which the class should be injected.
-
static inline void unPreload(const std::string &pluginlibType, pluginlib::ClassLoader<Base> &loader)
Revert the effect of
preload().Note
All instances of the preloaded class should be destroyed prior to calling this function, otherwise segfaults can happen.
- Parameters:
pluginlibType – [in]
loader – [in] The pluginlib classloader from which the class should be “un-injected”.