Gromacs
2025.0-dev-20241011-013a99c
|
#include <gromacs/commandline/pargs.h>
Command-line argument definition for C code.
Public Attributes | |
const char * | option |
Name of the argument (with leading dash included). More... | |
gmx_bool | bSet |
Whether the argument is set (should be initialized to FALSE ). More... | |
int | type |
Type of the argument (one of the enums in pargs.h). More... | |
union { | |
void * v | |
Generic pointer for operations that do not need type information. More... | |
int * i | |
Integer value for etINT. More... | |
int64_t * is | |
Integer value for etINT64. More... | |
real * r | |
Real value for etREAL and etTIME. More... | |
const char ** c | |
String value for etSTR and etENUM. More... | |
bool * b | |
Boolean value for etBOOL. More... | |
rvec * rv | |
Vector value for etRVEC. More... | |
} | u |
Pointer to variable that is to receive the value. More... | |
const char * | desc |
Description for the argument. More... | |
bool* t_pargs::b |
Boolean value for etBOOL.
gmx_bool t_pargs::bSet |
Whether the argument is set (should be initialized to FALSE
).
const char** t_pargs::c |
String value for etSTR and etENUM.
For etSTR, this should point to a const char *
variable, which will receive a pointer to the string value (caller should not free the string).
For etENUM, this should be an array of const char *
values, where the first and last values are NULL
, and the other values define the allowed enum values. The first non-NULL value is the default value. After the arguments are parsed, the first element in the array points to the selected enum value (pointers will be equal).
const char* t_pargs::desc |
Description for the argument.
If the string starts with HIDDEN
, then the argument is hidden from normal help listing and shell completions.
int* t_pargs::i |
Integer value for etINT.
int64_t* t_pargs::is |
Integer value for etINT64.
const char* t_pargs::option |
Name of the argument (with leading dash included).
real* t_pargs::r |
Real value for etREAL and etTIME.
rvec* t_pargs::rv |
Vector value for etRVEC.
int t_pargs::type |
Type of the argument (one of the enums in pargs.h).
union { ... } t_pargs::u |
Pointer to variable that is to receive the value.
The expected type depends on the value of type. If an argument is not set by the user, then the pointed value is not changed. In other words, the initial value for the variable defines the default value.
void* t_pargs::v |
Generic pointer for operations that do not need type information.
Needs to be the first member to use initialized arrays.