OPeNDAP Hyrax Back End Server (BES)
Updated for version 3.8.3
|
Classes | |
class | BindNameFunction |
The LinearScaleFunction class encapsulates the linear_scale function 'function_linear_scale' along with additional meta-data regarding its use and applicability. More... | |
class | BindShapeFunction |
class | GeoConstraint |
Encapsulate the logic needed to handle geographical constraints when they are applied to DAP Grid (and some Array) variables. More... | |
class | GeoGridFunction |
class | GridFunction |
class | GridGeoConstraint |
Geographical constraint applied to a grid. More... | |
struct | gse_arg |
Argument to the GSE parser. More... | |
class | GSEClause |
Holds the results of parsing one of the Grid Selection Expression clauses. More... | |
class | LinearScaleFunction |
The LinearScaleFunction class encapsulates the linear_scale function 'function_linear_scale' along with additional meta-data regarding its use and applicability. More... | |
class | MakeArrayFunction |
The LinearScaleFunction class encapsulates the linear_scale function 'function_linear_scale' along with additional meta-data regarding its use and applicability. More... | |
class | VersionFunction |
Enumerations | |
enum | relop { dods_nop_op, dods_greater_op, dods_greater_equal_op, dods_less_op, dods_less_equal_op, dods_equal_op, dods_not_equal_op } |
Functions | |
void | apply_grid_selection_expressions (Grid *grid, vector< GSEClause * >clauses) |
void | function_bind_name (int argc, BaseType *argv[], DDS &dds, BaseType **btpp) |
Bind a new name to a variable. More... | |
void | function_bind_shape (int argc, BaseType *argv[], DDS &, BaseType **btpp) |
Bind a shape to a DAP2 Array that is a vector. More... | |
void | function_geogrid (int argc, BaseType *argv[], DDS &, BaseType **btpp) |
The geogrid function returns the part of a Grid which includes a geographically specified rectangle. More... | |
void | function_grid (int argc, BaseType *argv[], DDS &, BaseType **btpp) |
The grid function uses a set of relational expressions to form a selection within a Grid variable based on the values in the Grid's map vectors. More... | |
void | function_linear_scale (int argc, BaseType *argv[], DDS &, BaseType **btpp) |
Given a BaseType, scale it using 'y = mx + b'. More... | |
void | function_make_array (int argc, BaseType *argv[], DDS &dds, BaseType **btpp) |
Build a new DAP Array variable. More... | |
void | function_version (int, BaseType *[], DDS &dds, BaseType **btpp) |
This server-side function returns version information for the server-side functions. More... | |
void | getGrids (BaseType *bt, vector< Grid * > *grids) |
Recursively traverses the BaseType bt (if its a constructor type) and collects pointers to all of the Grid and places said pointers into the vector parameter 'grids'. More... | |
void | getGrids (DDS &dds, vector< Grid * > *grids) |
Recursively traverses the DDS and collects pointers to all of the Grids and places said pointers into the vector parameter 'grids'. More... | |
bool | isGeoGrid (Grid *grid) |
Evaluates a Grid to see if has suitable semantics for use with function_geogrid. More... | |
vector< int > | parse_dims (const string &shape) |
Parse the shape 'expression'. More... | |
void | parse_gse_expression (gse_arg *arg, BaseType *expr) |
bool | unit_or_name_match (set< string > units, set< string > names, const string &var_units, const string &var_name) |
bool | unit_or_name_match (set< string > units, set< string > names, const string &var_units, const string &var_name) |
Look in the containers which hold the units attributes and variable name prefixes which are considered as identifying a vector as being a latitude or longitude vector. More... | |
enum libdap::relop |
Enumerator | |
---|---|
dods_nop_op | |
dods_greater_op | |
dods_greater_equal_op | |
dods_less_op | |
dods_less_equal_op | |
dods_equal_op | |
dods_not_equal_op |
Definition at line 47 of file GSEClause.h.
void libdap::apply_grid_selection_expressions | ( | Grid * | grid, |
vector< GSEClause * > | clauses | ||
) |
Definition at line 166 of file grid_utils.cc.
Referenced by function_geogrid(), and function_grid().
void libdap::function_bind_name | ( | int | argc, |
BaseType * | argv[], | ||
DDS & | dds, | ||
BaseType ** | btpp | ||
) |
Bind a new name to a variable.
The linear_scale() function applies the familiar y = mx + b equation to data.
The first argument to the function is the new name and the second argument is the BaseType* to (re)name. This function can be used to assign a name to an anonymous variable or change the name of a variable. If the variable is already part of the dataset, this function will make a copy and operate on that. In that case, the function will also read values into the variable.
argc | A count of the arguments |
argv | An array of pointers to each argument, wrapped in a child of BaseType |
btpp | A pointer to the return value; caller must delete. |
Error | Thrown for a variety of errors. |
Definition at line 62 of file BindNameFunction.cc.
Referenced by libdap::BindNameFunction::BindNameFunction().
void libdap::function_bind_shape | ( | int | argc, |
BaseType * | argv[], | ||
DDS & | , | ||
BaseType ** | btpp | ||
) |
Bind a shape to a DAP2 Array that is a vector.
The product of the dimension sizes must match the number of elements in the vector. This function takes two arguments: A shape expression and a BaseType* to the DAP2 Array that holds the data. In practice, the Array can already have a shape (it's a vector, so that is a shape, e.g.) and this function simply changes that shape. The shape expression is the C bracket notation for array size and is parsed by this function.
argc | A count of the arguments |
argv | An array of pointers to each argument, wrapped in a child of BaseType |
btpp | A pointer to the return value; caller must delete. |
Error | Thrown for a variety of errors. |
Definition at line 66 of file BindShapeFunction.cc.
References parse_dims().
Referenced by libdap::BindShapeFunction::BindShapeFunction().
void libdap::function_geogrid | ( | int | argc, |
BaseType * | argv[], | ||
DDS & | , | ||
BaseType ** | btpp | ||
) |
The geogrid function returns the part of a Grid which includes a geographically specified rectangle.
The arguments to the function are the name of a Grid, the left-top and right-bottom points of the rectangle and zero or more relational expressions of the sort that the grid function accepts. The constraints on the arguments are:
argc | The number of values in argv. |
argv | An array of BaseType pointers which hold the arguments to be passed to geogrid. The arguments may be Strings, Integers, or Reals, subject to the above constraints. |
btpp | A pointer to the return value; caller must delete. |
Definition at line 80 of file GeoGridFunction.cc.
References libdap::GridGeoConstraint::apply_constraint_to_data(), apply_grid_selection_expressions(), arg, libdap::GridGeoConstraint::get_constrained_grid(), libdap::gse_arg::get_gsec(), gse_arg, parse_gse_expression(), and libdap::GeoConstraint::set_bounding_box().
Referenced by libdap::GeoGridFunction::GeoGridFunction().
void libdap::function_grid | ( | int | argc, |
BaseType * | argv[], | ||
DDS & | , | ||
BaseType ** | btpp | ||
) |
The grid function uses a set of relational expressions to form a selection within a Grid variable based on the values in the Grid's map vectors.
Thus, if a Grid has a 'temperature' map which ranges from 0.0 to 32.0 degrees, it's possible to request the values of the Grid that fall between 10.5 and 12.5 degrees without knowing to which array indexes those values correspond. The function takes one or more arguments:
<map var> <relop> <constant>
<constant> <relop> <map var> <relop> <constant>
Each of the relation expressions is applied to the Grid and the result is returned.
argc | The number of values in argv. |
argv | An array of BaseType pointers which hold the arguments to be passed to geogrid. The arguments may be Strings, Integers, or Reals, subject to the above constraints. |
btpp | A pointer to the return value; caller must delete. |
Definition at line 81 of file GridFunction.cc.
References apply_grid_selection_expressions(), arg, libdap::gse_arg::get_gsec(), gse_arg, and parse_gse_expression().
Referenced by libdap::GridFunction::GridFunction().
void libdap::function_linear_scale | ( | int | argc, |
BaseType * | argv[], | ||
DDS & | , | ||
BaseType ** | btpp | ||
) |
Given a BaseType, scale it using 'y = mx + b'.
The linear_scale() function applies the familiar y = mx + b equation to data.
Either provide the constants 'm' and 'b' or the function will look for the COARDS attributes 'scale_factor' and 'add_offset'.
argc | A count of the arguments |
argv | An array of pointers to each argument, wrapped in a child of BaseType |
btpp | A pointer to the return value; caller must delete. |
Error | Thrown if scale_factor is not given and the COARDS attributes cannot be found OR if the source variable is not a numeric scalar, Array or Grid. |
Definition at line 169 of file LinearScaleFunction.cc.
Referenced by libdap::LinearScaleFunction::LinearScaleFunction().
void libdap::function_make_array | ( | int | argc, |
BaseType * | argv[], | ||
DDS & | dds, | ||
BaseType ** | btpp | ||
) |
Build a new DAP Array variable.
The linear_scale() function applies the familiar y = mx + b equation to data.
Read the type, shape and values from the arg list. The variable will be named anon<number> and is guaranteed not to shadow the name of an existing variable in the DDS.
argc | A count of the arguments |
argv | An array of pointers to each argument, wrapped in a child of BaseType |
btpp | A pointer to the return value; caller must delete. |
Error | Thrown for a variety of errors. |
Definition at line 130 of file MakeArrayFunction.cc.
References BESDEBUG, and parse_dims().
Referenced by libdap::MakeArrayFunction::MakeArrayFunction().
void libdap::function_version | ( | int | , |
BaseType * | [], | ||
DDS & | dds, | ||
BaseType ** | btpp | ||
) |
This server-side function returns version information for the server-side functions.
Note that this function takes no arguments and returns a String using the BaseType value/result parameter.
btpp | A pointer to the return value; caller must delete. Change implementation to use libxml2 objects and NOT strings. |
Definition at line 49 of file VersionFunction.cc.
Referenced by libdap::VersionFunction::VersionFunction().
void libdap::getGrids | ( | BaseType * | bt, |
vector< Grid * > * | grids | ||
) |
Recursively traverses the BaseType bt (if its a constructor type) and collects pointers to all of the Grid and places said pointers into the vector parameter 'grids'.
If the BaseType parameter bt is an instance of Grid the it is placed in the vector.
bt | The BaseType to evaluate |
grids | A vector into which to place a pointer to every Grid. |
Definition at line 54 of file grid_utils.cc.
Referenced by libdap::GeoGridFunction::canOperateOn(), libdap::GridFunction::canOperateOn(), and getGrids().
void libdap::getGrids | ( | DDS & | dds, |
vector< Grid * > * | grids | ||
) |
Recursively traverses the DDS and collects pointers to all of the Grids and places said pointers into the vector parameter 'grids'.
dds | The dds to search |
grids | A vector into which to place a pointer to every Grid in the DDS. |
Definition at line 87 of file grid_utils.cc.
References getGrids().
bool libdap::isGeoGrid | ( | Grid * | grid | ) |
Evaluates a Grid to see if has suitable semantics for use with function_geogrid.
grid | the Grid to evaluate. |
Definition at line 104 of file grid_utils.cc.
Referenced by libdap::GeoGridFunction::canOperateOn().
vector< int > libdap::parse_dims | ( | const string & | shape | ) |
Parse the shape 'expression'.
The form of the expression is '[' size ']'
Definition at line 66 of file MakeArrayFunction.cc.
Referenced by function_bind_shape(), and function_make_array().
void libdap::parse_gse_expression | ( | gse_arg * | arg, |
BaseType * | expr | ||
) |
Definition at line 116 of file grid_utils.cc.
References gse_delete_buffer(), gse_parse(), gse_restart(), and gse_string().
Referenced by function_geogrid(), and function_grid().
bool libdap::unit_or_name_match | ( | set< string > | units, |
set< string > | names, | ||
const string & | var_units, | ||
const string & | var_name | ||
) |
bool libdap::unit_or_name_match | ( | set< string > | units, |
set< string > | names, | ||
const string & | var_units, | ||
const string & | var_name | ||
) |
Look in the containers which hold the units attributes and variable name prefixes which are considered as identifying a vector as being a latitude or longitude vector.
units | A container with a bunch of units attribute values. |
names | A container with a bunch of variable name prefixes. |
var_units | The value of the 'units' attribute for this variable. |
var_name | The name of the variable. |
Definition at line 82 of file GeoConstraint.cc.