sipxportlib
Version 3.3
|
#include <PluginHooks.h>
Public Member Functions | |
PluginIterator (const PluginHooks &pluginHooks) | |
Create an iterator that returns each instance managed by a PluginHooks object. More... | |
~PluginIterator () | |
Plugin * | next (UtlString *name=NULL) |
Advance to and return the next plugin. More... | |
PluginIterator is used to obtain a sequence of Plugin objects to be invoked.
The calling program gets the plugin objects by creating a PluginIterator over a Plugin object and then calling the PluginIterator::next method to get each instance of the Plugin (and optionally, its instance name).
The PluginIterator always returns the configured Plugin objects in lexical order by the instance name; this allows the configuration to control the order in which they are invoked.
Plugin libraries can implement any calling interface that's needed (a program that uses the Plugin mechanism should create a base class that extends Plugin to specify the interface).
A typical usage would look like:
PluginIterator | ( | const PluginHooks & | pluginHooks | ) |
Create an iterator that returns each instance managed by a PluginHooks object.
~PluginIterator | ( | ) |
Advance to and return the next plugin.
No meaning should be attached to Plugin names, so that order of plugin iteration can be controlled by the lexical order of plugin names.
name | The instance name string for the returned Plugin (for logging purposes). May be NULL if the caller does not need the name. |