Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

PluginMgr Class Reference

Scans a specified set of directories looking for shared libraries that implement the vmdplugin interface. Stores a copy of the plugins it finds so that they can be passed to routines that know the specific interface for the plugin. More...

#include <PluginMgr.h>

List of all members.

Public Methods

 PluginMgr ()
virtual ~PluginMgr ()
int load_static_plugins ()
 Load any plugins are that statically linked into the application. Return true if successful, or false if no static plugins are available. More...

int load_sharedlibrary_plugins (const char *path)
 Load the specified shared library and access all plugins found therein. Return the number of plugins found in the library, or -1 if an error occurred. More...

int plugins (PluginList &, const char *=0, const char *=0)
 Return plugins for the specified type and/or name; omitting both returns all plugins. Stores plugins in the passed-in array and returns the number of plugins added to the list. More...


Protected Methods

int add_plugin (const char *path, const char *file)

Static Protected Methods

int register_cb (void *, vmdplugin_t *)

Protected Attributes

PluginList pluginlist
ResizeArray< void * > handlelist
int num_in_library
const char * curpath
 path to plugin file currently being processed. More...


Detailed Description

Scans a specified set of directories looking for shared libraries that implement the vmdplugin interface. Stores a copy of the plugins it finds so that they can be passed to routines that know the specific interface for the plugin.

Definition at line 40 of file PluginMgr.h.


Constructor & Destructor Documentation

PluginMgr::PluginMgr  
 

Definition at line 57 of file PluginMgr.C.

PluginMgr::~PluginMgr   [virtual]
 

Definition at line 63 of file PluginMgr.C.

References handlelist, ResizeArray< void * >::num, vmddlclose, and vmddlsym.


Member Function Documentation

int PluginMgr::add_plugin const char *    path,
const char *    file
[protected]
 

int PluginMgr::load_sharedlibrary_plugins const char *    path
 

Load the specified shared library and access all plugins found therein. Return the number of plugins found in the library, or -1 if an error occurred.

Definition at line 119 of file PluginMgr.C.

References ResizeArray< void * >::append, curpath, ResizeArray< void * >::find, handlelist, num_in_library, register_cb, vmddlclose, vmddlerror, vmddlopen, and vmddlsym.

Referenced by VMDApp::plugin_dlopen.

int PluginMgr::load_static_plugins  
 

Load any plugins are that statically linked into the application. Return true if successful, or false if no static plugins are available.

Definition at line 77 of file PluginMgr.C.

References curpath, num_in_library, and register_cb.

Referenced by VMDApp::VMDinit.

int PluginMgr::plugins PluginList  ,
const char *    = 0,
const char *    = 0
 

Return plugins for the specified type and/or name; omitting both returns all plugins. Stores plugins in the passed-in array and returns the number of plugins added to the list.

Definition at line 156 of file PluginMgr.C.

References ResizeArray< vmdplugin_t * >::append, ResizeArray< vmdplugin_t * >::num, and pluginlist.

Referenced by VMDApp::get_plugin, VMDApp::guess_filetype, and VMDApp::list_plugins.

int PluginMgr::register_cb void *   ,
vmdplugin_t *   
[static, protected]
 

Definition at line 89 of file PluginMgr.C.

References ResizeArray< vmdplugin_t * >::append, curpath, ResizeArray< vmdplugin_t * >::num, num_in_library, plugincmp, and pluginlist.

Referenced by load_sharedlibrary_plugins, and load_static_plugins.


Member Data Documentation

const char* PluginMgr::curpath [protected]
 

path to plugin file currently being processed.

Definition at line 66 of file PluginMgr.h.

Referenced by load_sharedlibrary_plugins, load_static_plugins, and register_cb.

ResizeArray<void *> PluginMgr::handlelist [protected]
 

Definition at line 62 of file PluginMgr.h.

Referenced by load_sharedlibrary_plugins, and ~PluginMgr.

int PluginMgr::num_in_library [protected]
 

Definition at line 65 of file PluginMgr.h.

Referenced by load_sharedlibrary_plugins, load_static_plugins, and register_cb.

PluginList PluginMgr::pluginlist [protected]
 

Definition at line 61 of file PluginMgr.h.

Referenced by plugins, and register_cb.


The documentation for this class was generated from the following files:
Generated on Fri Apr 26 02:46:03 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002