83 DBG(cerr <<
"Entering function_grid..." << endl);
86 string(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n") +
87 "<function name=\"grid\" version=\"1.0\" href=\"http://docs.opendap.org/index.php/Server_Side_Processing_Functions#grid\">\n" +
91 Str *response =
new Str(
"info");
92 response->set_value(info);
97 Grid *original_grid = dynamic_cast < Grid * >(argv[0]);
99 throw Error(malformed_expr,
"The first argument to grid() must be a Grid variable!");
103 BaseType *btp = original_grid->ptr_duplicate();
104 Grid *l_grid = dynamic_cast < Grid * >(btp);
107 throw InternalErr(__FILE__, __LINE__,
"Expected a Grid.");
110 DBG(cerr <<
"grid: past initialization code" << endl);
118 Grid::Map_iter i = l_grid->map_begin();
119 while (i != l_grid->map_end())
120 (*i++)->set_send_p(
true);
124 DBG(cerr <<
"grid: past map read" << endl);
130 vector < GSEClause * > clauses;
132 for (
int i = 1; i < argc; ++i) {
141 DBG(cerr <<
"grid: past gse application" << endl);
143 l_grid->get_array()->set_send_p(
true);
164 vector<Grid *> grids;
167 return !grids.empty();
169 bool usable = !grids->empty();
void getGrids(BaseType *bt, vector< Grid * > *grids)
Recursively traverses the BaseType bt (if its a constructor type) and collects pointers to all of the...
void apply_grid_selection_expressions(Grid *grid, vector< GSEClause * >clauses)
bool canOperateOn(DDS &dds)
The passed DDS parameter dds is evaluated to see if it contains Grid objects.
Argument to the GSE parser.
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 bas...
void parse_gse_expression(gse_arg *arg, BaseType *expr)