trick/include/trick/vval.h
Alex Lin 57c76041f5 Get the value of a variable not parsed by SWIG in python
Wrote a python routine called get_value_by_ref_name that takes
a variable name string as an argument.  The string is passed to
ref_attributes to find the address and returns a REF2 structure.  The REF2
structure is passed to ref_to_value and the type and value of the variable
is returned in a structure.  We call vval_<type> to extract the raw value
from the structure and return that to python space.

Made a couple of other bug fixes in the FieldVisior and cpp input file
example found while investigating this issue.

refs #123
2015-09-18 09:03:24 -05:00

41 lines
668 B
C

#ifndef VVAL_H
#define VVAL_H
#include "trick/var.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* Function prototypes
*/
char vval_char(V_DATA * V);
short vval_short(V_DATA * V);
int vval_int(V_DATA * V);
long vval_long(V_DATA * V);
long long vval_longlong(V_DATA * V);
float vval_float(V_DATA * V);
double vval_double(V_DATA * V);
char *vval_string(V_DATA * V);
#ifndef SWIG
wchar_t vval_wchar(V_DATA * V);
wchar_t *vval_wstring(V_DATA * V);
#endif
FILE *vval_filep(V_DATA * V);
void *vval_voidp(V_DATA * V);
/**
* Recursively delete the given v_tree.
* @param v_tree value tree.
*/
void delete_v_tree(V_TREE* v_tree);
#ifdef __cplusplus
}
#endif
#endif