Classes | |
| struct | s_globalvar |
Defines | |
| #define | FALSE (0) |
| #define | GLOBAL extern |
| #define | INIT(A) |
| #define | TRUE (!FALSE) |
Enumerations | |
| enum | STATUS { FAILED = FALSE, SUCCESS = TRUE } |
Functions | |
| GLOBALVAR * | global_create (char *name,...) |
| Creates a user-defined global variable. | |
| void | global_dump (void) |
| GLOBALVAR * | global_find (char *name) |
| Find a global variable. | |
| GLOBALVAR * | global_getnext (GLOBALVAR *previous) |
| Get global variable list. | |
| char * | global_getvar (char *name, char *buffer, int size) |
| Get the value of a global variable in a safer fashion. | |
| STATUS | global_init (void) |
| Register global variables. | |
| STATUS | global_setvar (char *def,...) |
| Sets a user-defined global variable. | |
| GLOBAL char global_object_scan[32] | INIT ("%[^:]:%d") |
| the format to use when scanning for object ids | |
| GLOBAL char global_complex_format[256] | INIT ("%+lg%+lg%c") |
| the format to use when processing complex numbers | |
| GLOBAL char global_double_format[32] | INIT ("%+lg") |
| the format to use when processing real numbers | |
| GLOBAL TIMESTAMP global_clock | INIT (TS_ZERO) |
| The main clock timestamp. | |
| GLOBAL int global_xml_encoding | INIT (8) |
| Specifies XML encoding (default is 8). | |
| GLOBAL int global_profiler | INIT (0) |
| Flags the profiler to process class performance data. | |
| GLOBAL int global_threadcount | INIT (1) |
| the maximum thread limit, zero means automagically determine best thread count | |
| GLOBAL char global_savefile[1024] | INIT ("") |
| The save file name. | |
| GLOBAL char global_dumpfile[1024] | INIT ("gridlabd.xml") |
| The dump file name. | |
| GLOBAL char global_workdir[1024] | INIT (".") |
| The current working directory. | |
| GLOBAL unsigned global_iteration_limit | INIT (100) |
| The global iteration limit. | |
| GLOBAL int global_quiet_mode | INIT (FALSE) |
| The quiet mode flag. | |
| GLOBAL char global_environment[1024] | INIT ("batch") |
| The processing environment in use. | |
| GLOBAL unsigned global_version_minor | INIT (REV_MINOR) |
| The software's minor version. | |
| GLOBAL unsigned global_version_major | INIT (REV_MAJOR) |
| The software's major version. | |
Variables | |
| GLOBAL char | global_command_line [1024] |
| The current command-line. | |
| GLOBALVAR * global_create | ( | char * | name, | |
| ... | ||||
| ) |
Creates a user-defined global variable.
Definition at line 113 of file globals.c.
References _PT_LAST, arg(), s_keyword::name, s_globalvar::name, s_keyword::next, s_globalvar::next, PA_PRIVATE, PA_PROTECTED, PA_PUBLIC, PA_REFERENCE, s_globalvar::prop, property_size(), PT_ACCESS, PT_delegated, PT_enumeration, PT_KEYWORD, PT_set, PT_SIZE, throw_exception(), unit_find(), and s_keyword::value.
Referenced by cmex_global(), global_init(), and global_setvar().
| GLOBALVAR * global_find | ( | char * | name | ) |
Find a global variable.
| name | name of global variable to find |
Definition at line 79 of file globals.c.
References global_getnext(), and s_globalvar::name.
Referenced by cmex_get(), global_getvar(), global_setvar(), and module_getvar_addr().
Get global variable list.
This function retrieves global variable names. The first time it should be called with a NULL pointer to retrieve the first variable name. Subsequent calls should return the pointer to the previous variable name (and not a pointer to a copy).
| previous | a pointer to the previous variable name (NULL for first) |
Definition at line 98 of file globals.c.
References s_globalvar::next.
Referenced by global_dump(), and global_find().
| char * global_getvar | ( | char * | name, | |
| char * | buffer, | |||
| int | size | |||
| ) |
Get the value of a global variable in a safer fashion.
NULL if insufficient buffer space or if the name was not found.Definition at line 313 of file globals.c.
References PROPERTY::addr, class_property_to_string(), global_find(), and s_globalvar::prop.
Referenced by module_getvar(), and output_test().
| STATUS global_init | ( | void | ) |
Register global variables.
Definition at line 64 of file globals.c.
References global_create(), output_error(), PT_ACCESS, and SUCCESS.
Referenced by exec_init().
| STATUS global_setvar | ( | char * | def, | |
| ... | ||||
| ) |
Sets a user-defined global variable.
"NAME=VALUE". If there is no '=' in the first argument, then it is used as a name and the second argument is read as a pointer to a string the contains the new value.
Definition at line 257 of file globals.c.
References PROPERTY::addr, class_string_to_property(), FAILED, global_create(), global_find(), output_error(), PA_PUBLIC, s_globalvar::prop, PT_ACCESS, PT_char1024, PT_SIZE, and SUCCESS.
Referenced by cmdarg_load(), cmex_set(), load_module_list(), and module_setvar().
| GLOBAL int global_threadcount INIT | ( | 1 | ) |
the maximum thread limit, zero means automagically determine best thread count