Main Page   Modules   Alphabetical List   Compound List   Compound Members  

Plugin List


Typedefs

typedef _cpl_pluginlist_ cpl_pluginlist
 The opaque plugin list data type. More...


Functions

cpl_pluginlist * cpl_pluginlist_new (void)
 Creates an empty plugin list. More...

void cpl_pluginlist_delete (cpl_pluginlist *list)
 Delete a plugin list. More...

long cpl_pluginlist_get_size (cpl_pluginlist *list)
 Get the current size of a plugin list. More...

long cpl_pluginlist_max_size (cpl_pluginlist *list)
 Get the maximum number of plugin list entries possible. More...

void cpl_pluginlist_append (cpl_pluginlist *list, cpl_plugin *plugin)
 Append a plugin to a plugin list. More...

void cpl_pluginlist_prepend (cpl_pluginlist *list, cpl_plugin *plugin)
 Prepend a plugin to a plugin list. More...

cpl_plugincpl_pluginlist_begin (cpl_pluginlist *list)
 Get the first plugin of a plugin list. More...

cpl_plugincpl_pluginlist_next (cpl_pluginlist *list)
 Get the next plugin from a plugin list. More...

cpl_plugincpl_pluginlist_end (cpl_pluginlist *list)
 Get the last plugin of a plugin list. More...

cpl_plugincpl_pluginlist_find (cpl_pluginlist *list, const char *name)
 Find a plugin with a given name in a plugin list. More...

void cpl_pluginlist_print (cpl_pluginlist *list)
 Print the contents of a plugin list. More...


Detailed Description

This module implements a list container for plugin objects and provides the facilities to query, to traverse and to update the container. The purpose of this container is to be able to store references to available plugins and to handle sets of plugins as a whole.

Since the plugin list just stores pointers to cpl_plugin, a plugin list may contain plugins of different kind at the same time, because all context specific plugins inherit the cpl_plugin type (see Plugin Interface).

Synopsis:
   #include <cpl_pluginlist.h> 

Typedef Documentation

typedef struct _cpl_pluginlist_ cpl_pluginlist
 

The opaque plugin list data type.


Function Documentation

void cpl_pluginlist_append cpl_pluginlist   list,
cpl_plugin   plugin
 

Append a plugin to a plugin list.

Parameters:
list  A plugin list.
plugin  The plugin to append.
Returns:
Nothing.
The plugin plugin is inserted into the plugin list list after the last element.

If list does not point to a valid plugin list, or if plugin is not a valid pointer the function returns immediately.

cpl_plugin* cpl_pluginlist_begin cpl_pluginlist   list
 

Get the first plugin of a plugin list.

Parameters:
list  A plugin list.
Returns:
The first plugin stored in the plugin list list, or NULL if the list is empty or list itself is NULL.
The function returns a handle to the first plugin stored in the list.

void cpl_pluginlist_delete cpl_pluginlist   list
 

Delete a plugin list.

Parameters:
list  The plugin list to delete.
Returns:
Nothing.
The function deletes the plugin list list and destroys all plugins the list potentially contains.

cpl_plugin* cpl_pluginlist_end cpl_pluginlist   list
 

Get the last plugin of a plugin list.

Parameters:
list  A plugin list.
Returns:
The last plugin stored in the plugin list list, or NULL if the list is empty.
The function returns a pointer to the last plugin stored in the plugin list list.

cpl_plugin* cpl_pluginlist_find cpl_pluginlist   list,
const char *    name
 

Find a plugin with a given name in a plugin list.

Parameters:
list  The plugin list to query.
name  The plugin's unique name to look for.
Returns:
The first plugin with the given name name, or NULL if it no plugin with this name could be found. The function also returns NULL if list is not pointing to a valid plugin list.
This function searches the plugin list list for a plugin with the unique name name and returns a pointer to the first one found. If no plugin with the given name is found the function returns NULL.

The function expects that name is a valid string.

long cpl_pluginlist_get_size cpl_pluginlist   list
 

Get the current size of a plugin list.

Parameters:
list  A plugin list.
Returns:
The plugin list's current size, or 0 if the list is empty.
The function reports the current number of plugins stored in the plugin list list. If list does not point to a valid plugin list the function returns 0.

long cpl_pluginlist_max_size cpl_pluginlist   list
 

Get the maximum number of plugin list entries possible.

Parameters:
list  A plugin list.
Returns:
The maximum number of plugins that can be stored in the list.
The function reports the capacity of the plugin list list, i.e. the maximum number of plugins that can be stored in the list. If list does not point to a valid plugin list the function returns 0.

cpl_pluginlist* cpl_pluginlist_new void   
 

Creates an empty plugin list.

Returns:
The newly created plugin list, or NULL if it could not be created.
The function allocates memory for a plugin list object and initialises it to be empty.

cpl_plugin* cpl_pluginlist_next cpl_pluginlist   list
 

Get the next plugin from a plugin list.

Parameters:
list  A plugin list.
Returns:
The function returns the next plugin in the list, or NULL if the end of the list has been reached. It also returns NULL if either list is NULL or empty.
The function returns the next plugin in list. To find the next plugin, the plugin list caches the position of the most recently obtained plugin. This requires a call to cpl_pluginlist_begin() prior to calling this function in order to properly initialise the internal cache.

If the end of list has been reached the internal cache is reset to the first plugin in the list.

void cpl_pluginlist_prepend cpl_pluginlist   list,
cpl_plugin   plugin
 

Prepend a plugin to a plugin list.

Parameters:
list  A plugin list.
plugin  The plugin to prepend.
The plugin plugin is inserted into the plugin list list before the first element.

If list does not point to a valid plugin list, or if plugin is not a valid pointer the function returns immediately.

void cpl_pluginlist_print cpl_pluginlist   list
 

Print the contents of a plugin list.

Parameters:
list  The plugin list to print.
Returns:
Nothing.
This function prints all plugins stored in list using the currently installed print handler. By default the plugin information is written to the standard output. The function is provided for debugging purposes.


Generated on Mon May 24 14:58:06 2004 for Common Pipeline Library Reference Manual by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002