Lunchbox  1.8.0
Public Member Functions | List of all members
lunchbox::PluginRegistry Class Reference

A registry for loaded plugins. More...

#include <pluginRegistry.h>

+ Inheritance diagram for lunchbox::PluginRegistry:
+ Collaboration diagram for lunchbox::PluginRegistry:

Public Member Functions

 PluginRegistry ()
 Construct a new plugin registry.
 ~PluginRegistry ()
 Destruct this plugin registry.
void addDirectory (const std::string &path)
 Add a new directory to search for compressor DSOs during init().
void removeDirectory (const std::string &path)
 Remove a plugin directory.
const StringsgetDirectories () const
bool addLunchboxPlugins ()
 Add the lunchbox library plugins to this registry.
void init ()
void exit ()
VisitorResult accept (PluginVisitor &visitor)
 Visit all plugins and compressors.
VisitorResult accept (ConstPluginVisitor &visitor) const
 Visit all plugins and compressors.
const Plugins & getPlugins () const
PluginfindPlugin (const uint32_t name)
const PluginfindPlugin (const uint32_t name) const
bool addPlugin (const std::string &filename)

Detailed Description

A registry for loaded plugins.

Downstream projects such as Collage and Equalizer use and initialize a global plugin registry in their respective initialization calls by adding directories in co::init(). This internal plugin registry can be obtained using co::Global::getPluginRegistry().

Definition at line 42 of file pluginRegistry.h.

Constructor & Destructor Documentation

lunchbox::PluginRegistry::PluginRegistry ( )

Construct a new plugin registry.

Version
1.7.1
lunchbox::PluginRegistry::~PluginRegistry ( )

Destruct this plugin registry.

Version
1.7.1

Member Function Documentation

VisitorResult lunchbox::PluginRegistry::accept ( PluginVisitor visitor)

Visit all plugins and compressors.

Returns
TRAVERSE_TERMINATE immediately when one visit method returned terminate, TRAVERSE_PRUNE if at least one visit method returned prune, TRAVERSE_CONTINUE otherwise.
Version
1.7.1
VisitorResult lunchbox::PluginRegistry::accept ( ConstPluginVisitor visitor) const

Visit all plugins and compressors.

Version
1.7.1
void lunchbox::PluginRegistry::addDirectory ( const std::string &  path)

Add a new directory to search for compressor DSOs during init().

Version
1.0 in Collage
1.7.1 in Lunchbox
bool lunchbox::PluginRegistry::addLunchboxPlugins ( )

Add the lunchbox library plugins to this registry.

Returns
true on success, false otherwise.
Version
1.7.1
const Strings& lunchbox::PluginRegistry::getDirectories ( ) const
Returns
all directories to search for compressor DSOs during init().
Version
1.0 in Collage
1.7.1 in Lunchbox
void lunchbox::PluginRegistry::removeDirectory ( const std::string &  path)

Remove a plugin directory.

Version
1.0

The documentation for this class was generated from the following file: