26#ifndef TESSERACT_COMMON_PLUGIN_LOADER_H
27#define TESSERACT_COMMON_PLUGIN_LOADER_H
32#include <unordered_map>
84 template <
class PluginBase>
85 std::shared_ptr<PluginBase>
instantiate(
const std::string& plugin_name)
const;
100 template <
class PluginBase>
120 inline int count()
const;
This is a utility class for loading plugins within Tesseract.
Definition: plugin_loader.h:57
static void addSymbolLibraryToSearchLibrariesEnv(const void *symbol_ptr, const std::string &search_libraries_env)
Utility function to add library containing symbol to the search env variable.
Definition: plugin_loader.hpp:287
std::set< std::string > search_paths
A list of paths to search for plugins.
Definition: plugin_loader.h:63
std::string search_paths_env
The environment variable containing plugin search paths.
Definition: plugin_loader.h:69
std::shared_ptr< PluginBase > instantiate(const std::string &plugin_name) const
Instantiate a plugin with the provided name.
Definition: plugin_loader.hpp:110
std::vector< std::string > getAvailableSections(bool include_hidden=false) const
Get the available sections within the provided search libraries.
Definition: plugin_loader.hpp:248
int count() const
The number of plugins stored. The size of plugins variable.
Definition: plugin_loader.hpp:282
std::set< std::string > search_libraries
A list of library names without the prefix or suffix that contain plugins.
Definition: plugin_loader.h:66
bool isPluginAvailable(const std::string &plugin_name) const
Check if plugin is available.
Definition: plugin_loader.hpp:166
std::vector< std::string > getAvailablePlugins() const
Get the available plugins for the provided PluginBase type.
Definition: plugin_loader.hpp:209
std::string search_libraries_env
The environment variable containing plugins.
Definition: plugin_loader.h:77
bool search_system_folders
Indicate is system folders may be search if plugin is not found in any of the paths.
Definition: plugin_loader.h:60
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
Definition: allowed_collision_matrix.h:16
Plugin Loader to be used throughout Tesseract for loading plugins.