Class ClassLoaderBase

Inheritance Relationships

Derived Type

Class Documentation

class ClassLoaderBase

Pure virtual base class of pluginlib::ClassLoader which is not templated.

This allows the writing of non-templated manager code which can call all the administrative functions of ClassLoaders - everything except createClassInstance(), createInstance() and createUnmanagedInstance().

Subclassed by pluginlib::ClassLoader< T >

Public Functions

inline virtual ~ClassLoaderBase()

Empty virtual destructor.

virtual std::vector<std::string> getPluginXmlPaths() = 0

Return a list of all available plugin manifest paths.

Returns:

A vector of strings corresponding to the paths of all available plugin manifests

virtual std::vector<std::string> getDeclaredClasses() = 0

Return a list of all available classes for this ClassLoader’s base class type.

Returns:

A vector of strings corresponding to the names of all available classes

virtual void refreshDeclaredClasses() = 0

Refresh the list of all available classes for this ClassLoader’s base class type.

Throws:

pluginlib::LibraryLoadException – if package manifest cannot be found

virtual std::string getName(const std::string &lookup_name) = 0

Strip the package name off of a lookup name.

Parameters:

lookup_name – The name of the plugin

Returns:

The name of the plugin stripped of the package name

virtual bool isClassAvailable(const std::string &lookup_name) = 0

Check if the class associated with a plugin name is available to be loaded.

Parameters:

lookup_name – The name of the plugin

Returns:

True if the plugin is available, false otherwise

virtual std::string getClassType(const std::string &lookup_name) = 0

Given the lookup name of a class, return the type of the derived class associated with it.

Parameters:

lookup_name – The name of the class

Returns:

The name of the associated derived class

virtual std::string getClassDescription(const std::string &lookup_name) = 0

Given the lookup name of a class, return its description.

Parameters:

lookup_name – The lookup name of the class

Returns:

The description of the class

virtual std::string getBaseClassType() const = 0

Given the lookup name of a class, return the type of the associated base class.

Returns:

The type of the associated base class

virtual std::string getClassPackage(const std::string &lookup_name) = 0

Given the name of a class, return name of the containing package.

Parameters:

lookup_name – The name of the class

Returns:

The name of the containing package

virtual std::string getPluginManifestPath(const std::string &lookup_name) = 0

Given the name of a class, return the path of the associated plugin manifest.

Parameters:

lookup_name – The name of the class

Returns:

The path of the associated plugin manifest

virtual bool isClassLoaded(const std::string &lookup_name) = 0

Check if a given class is currently loaded.

Parameters:

lookup_name – The lookup name of the class to query

Returns:

True if the class is loaded, false otherwise

virtual void loadLibraryForClass(const std::string &lookup_name) = 0

Attempt to load a class with a given name.

Parameters:

lookup_name – The lookup name of the class to load

Throws:

pluginlib::LibraryLoadException – if the library for the class cannot be loaded

virtual int unloadLibraryForClass(const std::string &lookup_name) = 0

Attempt to unload a class with a given name.

Parameters:

lookup_name – The lookup name of the class to unload

Throws:

pluginlib::LibraryUnloadException – if the library for the class cannot be unloaded

Returns:

The number of pending unloads until the library is removed from memory

virtual std::vector<std::string> getRegisteredLibraries() = 0

Return the libraries that are registered and can be loaded.

Returns:

A vector of strings corresponding to the names of registered libraries

virtual std::string getClassLibraryPath(const std::string &lookup_name) = 0

Given the name of a class, return the path to its associated library.

Parameters:

lookup_name – The name of the class

Returns:

The path to the associated library