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

colvarscript_commands.C File Reference

#include <vector>
#include <cstdlib>
#include <string.h>
#include "colvarproxy.h"
#include "colvardeps.h"
#include "colvarscript.h"
#include "colvarscript_commands.h"

Go to the source code of this file.


Defines

#define CVSCRIPT_COMM_FN(COMM, N_ARGS_MIN, N_ARGS_MAX, ARGS, FN_BODY)
#define CVSCRIPT(COMM, HELP, N_ARGS_MIN, N_ARGS_MAX, ARGS, FN_BODY) CVSCRIPT_COMM_FN(COMM,N_ARGS_MIN,N_ARGS_MAX,ARGS,FN_BODY)
#define COLVARSCRIPT_COMMANDS_GLOBAL

Functions

int cvscript_n_commands ()
Get the number of colvarscript commands. More...

char const ** cvscript_command_names ()
Get the names of all commands (array of strings). More...

char const * cvscript_command_help (char const *c)
Get the help summary of the given command
Parameters:
cmd Name of the command's function (e.g. "cv_units").
More...

char const * cvscript_command_rethelp (char const *c)
Get description of the return value of a command
Parameters:
cmd Name of the command's function (e.g. "cv_units").
More...

char const * cvscript_command_arghelp (char const *c, int i)
Get description of the arguments of a command (excluding prefix)
Parameters:
cmd Name of the command's function (e.g. "cv_units")
i Index of the argument; 0 is the first argument after the prefix, e.g. "value" has an index of 0 in the array of arguments: { "cv", "colvar", "xi", "value" }.
More...

char const * cvscript_command_full_help (char const *c)
Get the full help string of a command
Parameters:
cmd Name of the command's function (e.g. "cv_units").
More...

int cvscript_command_n_args_min (char const *c)
Get number of required arguments (excluding prefix)
Parameters:
cmd Name of the command's function (e.g. "cv_units").
More...

int cvscript_command_n_args_max (char const *c)
Get number of total arguments (excluding prefix)
Parameters:
cmd Name of the command's function (e.g. "cv_units").
More...


Define Documentation

#define COLVARSCRIPT_COMMANDS_GLOBAL

Definition at line 112 of file colvarscript_commands.C.

#define CVSCRIPT ( COMM,
HELP,
N_ARGS_MIN,
N_ARGS_MAX,
ARGS,
FN_BODY ) CVSCRIPT_COMM_FN(COMM,N_ARGS_MIN,N_ARGS_MAX,ARGS,FN_BODY)

Definition at line 108 of file colvarscript_commands.C.

#define CVSCRIPT_COMM_FN ( COMM,
N_ARGS_MIN,
N_ARGS_MAX,
ARGS,
FN_BODY )

Value:

int CVSCRIPT_COMM_FNAME(COMM)(void *pobj, \
 int objc, unsigned char *const objv[]) \
 { \
 if (cvm::debug()) { \
 cvm::log("Executing script function \""+std::string(#COMM)+"\""); \
 } \
 colvarscript *script = colvarscript_obj(); \
 script->clear_str_result(); \
 if (script->check_module_cmd_nargs(#COMM, \
 objc, N_ARGS_MIN, N_ARGS_MAX) != \
 COLVARSCRIPT_OK) { \
 return COLVARSCRIPT_ERROR; \
 } \
 if (objc > 1) { \
 \
 (void) pobj; \
 (void) objv[0]; \
 } \
 FN_BODY; \
 }

Definition at line 86 of file colvarscript_commands.C.


Function Documentation

char const* cvscript_command_arghelp ( char const * c,
int i
)

Get description of the arguments of a command (excluding prefix)

Parameters:
cmd Name of the command's function (e.g. "cv_units")
i Index of the argument; 0 is the first argument after the prefix, e.g. "value" has an index of 0 in the array of arguments: { "cv", "colvar", "xi", "value" }.

Definition at line 53 of file colvarscript_commands.C.

References colvarscript_obj, and colvarscript::get_command_arghelp.

char const* cvscript_command_full_help ( char const * c )

Get the full help string of a command

Parameters:
cmd Name of the command's function (e.g. "cv_units").

Definition at line 61 of file colvarscript_commands.C.

References colvarscript_obj, and colvarscript::get_command_full_help.

char const* cvscript_command_help ( char const * c )

Get the help summary of the given command

Parameters:
cmd Name of the command's function (e.g. "cv_units").

Definition at line 37 of file colvarscript_commands.C.

References colvarscript_obj, and colvarscript::get_command_help.

int cvscript_command_n_args_max ( char const * c )

Get number of total arguments (excluding prefix)

Parameters:
cmd Name of the command's function (e.g. "cv_units").

Definition at line 77 of file colvarscript_commands.C.

References colvarscript_obj, and colvarscript::get_command_n_args_max.

int cvscript_command_n_args_min ( char const * c )

Get number of required arguments (excluding prefix)

Parameters:
cmd Name of the command's function (e.g. "cv_units").

Definition at line 69 of file colvarscript_commands.C.

References colvarscript_obj, and colvarscript::get_command_n_args_min.

char const** cvscript_command_names ( )

Get the names of all commands (array of strings).

Definition at line 29 of file colvarscript_commands.C.

References colvarscript_obj, and colvarscript::get_command_names.

Referenced by cvscript_command_full_help.

char const* cvscript_command_rethelp ( char const * c )

Get description of the return value of a command

Parameters:
cmd Name of the command's function (e.g. "cv_units").

Definition at line 45 of file colvarscript_commands.C.

References colvarscript_obj, and colvarscript::get_command_rethelp.

int cvscript_n_commands ( )

Get the number of colvarscript commands.

Definition at line 22 of file colvarscript_commands.C.

Referenced by cvscript_command_full_help.


Generated on Tue Nov 18 02:48:28 2025 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002

AltStyle によって変換されたページ (->オリジナル) /