TECA
The Toolkit for Extreme Climate Analysis
teca_variant_array_operand::resolver Class Reference

Handles conversion of literals to variant_arrays and the name resolution of variables. More...

#include <teca_variant_array_operand.h>

Public Member Functions

int get_constant (const char *s, p_teca_variant_array &c)
 
int get_variable (const char *var_name, const_p_teca_variant_array &var)
 
const_p_teca_array_collection get_variables ()
 get the set of arrays used for variable name resolution. More...
 
void set_variables (const_p_teca_array_collection v)
 set the set of arrays used for variable name resolution. More...
 

Detailed Description

Handles conversion of literals to variant_arrays and the name resolution of variables.

Member Function Documentation

◆ get_constant()

int teca_variant_array_operand::resolver::get_constant ( const char *  s,
p_teca_variant_array c 
)

given a text representation of a numeric value in s convert and return a variant_array filled with the numeric value. the type is determined by the last 1 or 2 characters in the string, Valid type codes are:

 d -- double
 f -- float
 L -- long long
 l -- long
 i -- int
 s -- short
 c -- char
 u -- unsigned, augments any of the integer types

the return is non-zero if an error occurred, zero otherwise.

◆ get_variable()

int teca_variant_array_operand::resolver::get_variable ( const char *  var_name,
const_p_teca_variant_array var 
)
inline

given the name of a variable in var_name, set var to point to the array of corresponding name. see set/get_variables.

◆ get_variables()

const_p_teca_array_collection teca_variant_array_operand::resolver::get_variables ( )
inline

get the set of arrays used for variable name resolution.

◆ set_variables()

void teca_variant_array_operand::resolver::set_variables ( const_p_teca_array_collection  v)
inline

set the set of arrays used for variable name resolution.


The documentation for this class was generated from the following file: