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

vmdplugin.h File Reference

Go to the source code of this file.

Compounds

struct  vmdplugin_t

Defines

#define VMDPLUGIN   vmdplugin
#define xcat(x, y)   cat(x, y)
#define cat(x, y)   x ## y
#define VMDPLUGIN_API
#define VMDPLUGIN_EXTERN   extern VMDPLUGIN_API
#define vmdplugin_HEAD
#define vmdplugin_ABIVERSION   18

Typedefs

typedef int(* vmdplugin_register_cb )(void *, vmdplugin_t *)

Functions

VMDPLUGIN_EXTERN int VMDPLUGIN_init (void)
VMDPLUGIN_EXTERN int VMDPLUGIN_register (void *, vmdplugin_register_cb)
VMDPLUGIN_EXTERN int VMDPLUGIN_register_tcl (void *, void *tcl_interp, vmdplugin_register_cb)
VMDPLUGIN_EXTERN int VMDPLUGIN_fini (void)


Detailed Description

This header must be included by every VMD plugin library. It defines the API for every plugin so that VMD can organize the plugins it finds.

Definition in file vmdplugin.h.


Define Documentation

#define cat x,
     x ## y
 

concatenation macro, joins args x and y together as a single string

Definition at line 41 of file vmdplugin.h.

#define VMDPLUGIN   vmdplugin
 

macro defining VMDPLUGIN if it hasn't already been set to the name of a static plugin that is being compiled. This is the catch-all case.

Definition at line 36 of file vmdplugin.h.

#define vmdplugin_ABIVERSION   18
 

Use this macro to initialize the abiversion member of each plugin

Definition at line 147 of file vmdplugin.h.

Referenced by VMDPLUGIN_init, and write_hoomd_timestep.

#define VMDPLUGIN_API
 

If we're not compiling on Windows, then this macro is defined empty

Definition at line 89 of file vmdplugin.h.

Referenced by VMDPLUGIN_fini, VMDPLUGIN_init, and VMDPLUGIN_register.

#define VMDPLUGIN_ERROR   -1
 

Error return code for use in the plugin registration and init functions

Definition at line 158 of file vmdplugin.h.

#define VMDPLUGIN_EXTERN   extern VMDPLUGIN_API
 

define plugin linkage correctly for both C and C++ based plugins

Definition at line 96 of file vmdplugin.h.

#define VMDPLUGIN_fini   xcat(VMDPLUGIN, _fini)
 

Macro names entry points correctly for static linkage or dynamic loading

Definition at line 57 of file vmdplugin.h.

#define vmdplugin_HEAD
 

Value:

int abiversion; \
  const char *type; \
  const char *name; \
  const char *prettyname; \
  const char *author; \
  int majorv; \
  int minorv; \
  int is_reentrant;
Macro for creating a struct header used in all plugin structures.

This header should be placed at the top of every plugin API definition so that it can be treated as a subtype of the base plugin type.

abiversion: Defines the ABI for the base plugin type (not for other plugins) type: A string descriptor of the plugin type. name: A name for the plugin. author: A string identifier, possibly including newlines. Major and minor version. is_reentrant: Whether this library can be run concurrently with itself.

Definition at line 124 of file vmdplugin.h.

#define VMDPLUGIN_init   xcat(VMDPLUGIN, _init)
 

Macro names entry points correctly for static linkage or dynamic loading

Definition at line 56 of file vmdplugin.h.

#define VMDPLUGIN_register   xcat(VMDPLUGIN, _register)
 

Macro names entry points correctly for static linkage or dynamic loading

Definition at line 54 of file vmdplugin.h.

#define VMDPLUGIN_register_tcl   xcat(VMDPLUGIN, _register_tcl)
 

Macro names entry points correctly for static linkage or dynamic loading

Definition at line 55 of file vmdplugin.h.

#define VMDPLUGIN_SUCCESS   0
 

Error return code for use in the plugin registration and init functions

Definition at line 157 of file vmdplugin.h.

Referenced by register_cb, VMDPLUGIN_fini, VMDPLUGIN_init, and VMDPLUGIN_register.

#define VMDPLUGIN_THREADSAFE   1
 

Use this macro to indicate a plugin's thread-safety at registration time

Definition at line 152 of file vmdplugin.h.

Referenced by VMDPLUGIN_init.

#define VMDPLUGIN_THREADUNSAFE   0
 

Use this macro to indicate a plugin's thread-safety at registration time

Definition at line 151 of file vmdplugin.h.

Referenced by VMDPLUGIN_init.

#define xcat x,
     cat(x, y)
 

concatenation macro, joins args x and y together as a single string

Definition at line 39 of file vmdplugin.h.


Typedef Documentation

typedef int(* vmdplugin_register_cb)(void *, vmdplugin_t *)
 

Function pointer typedef for register callback functions

Definition at line 164 of file vmdplugin.h.

Referenced by VMDPLUGIN_register.


Function Documentation

VMDPLUGIN_EXTERN int VMDPLUGIN_fini void   
 

The Fini method is called when the application will no longer use any plugins in the library.

Definition at line 1441 of file abinitplugin.c.

VMDPLUGIN_EXTERN int VMDPLUGIN_init void   
 

Init routine: called the first time the library is loaded by the application and before any other API functions are referenced. Return 0 on success.

Definition at line 1400 of file abinitplugin.c.

VMDPLUGIN_EXTERN int VMDPLUGIN_register void *   ,
vmdplugin_register_cb   
 

Allow the library to register plugins with the application. The callback should be called using the passed-in void pointer, which should not be interpreted in any way by the library. Each vmdplugin_t pointer passed to the application should point to statically-allocated or heap-allocated memory and should never be later modified by the plugin. Applications must be permitted to retain only a copy of the the plugin pointer, without making any deep copy of the items in the struct.

Definition at line 1435 of file abinitplugin.c.

VMDPLUGIN_EXTERN int VMDPLUGIN_register_tcl void *   ,
void *    tcl_interp,
vmdplugin_register_cb   
 

Allow the library to register Tcl extensions. This API is optional; if found by dlopen, it will be called after first calling init and register.


Generated on Thu Dec 5 03:07:50 2024 for VMD Plugins (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002