NAMD
Functions
PluginIOMgr.C File Reference
#include <stdio.h>
#include "PluginIOMgr.h"

Go to the source code of this file.

Functions

int register_cb (void *v, vmdplugin_t *p)
 

Function Documentation

int register_cb ( void v,
vmdplugin_t *  p 
)

Definition at line 6 of file PluginIOMgr.C.

References PluginIOMgr::setPlugin().

Referenced by main(), PluginIOMgr::PluginIOMgr(), and ScriptTcl::ScriptTcl().

6  {
7 /* const char *key = p->name;
8  if (num_plugins >= MAX_PLUGINS) {
9  fprintf(stderr, "Exceeded maximum allowed number of plugins; recompile. :(\n");
10  return NAMDPLUGIN_ERROR;
11  }
12  if (hash_insert(&pluginhash, key, num_plugins) != HASH_FAIL) {
13  fprintf(stderr, "Multiple plugins for file type '%s' found!", key);
14  return NAMDPLUGIN_ERROR;
15  }
16  plugins[num_plugins++] = (molfile_plugin_t *)p;
17  return NAMDPLUGIN_SUCCESS;
18 */
19  PluginIOMgr *me = (PluginIOMgr *)v;
20  me->setPlugin((molfile_plugin_t *)p);
21  return 0;
22 }
void setPlugin(molfile_plugin_t *p)
Definition: PluginIOMgr.h:23