25 #include <ServerFunction.h>
39 typedef std::vector< std::vector<BaseType*> *> SequenceValues;
40 typedef std::vector<unsigned long> Shape;
42 static void function_dap2_tabular(
int argc, BaseType *argv[], DDS &dds, BaseType **btpp);
46 static void function_dap2_tabular_2(
int argc, BaseType *argv[], DDS &, BaseType **btpp);
52 static Shape array_shape(Array *a);
53 static bool shape_matches(Array *a,
const Shape &shape);
54 static bool dep_indep_match(
const Shape &dep_shape,
const Shape &indep_shape);
56 static unsigned long number_of_values(
const Shape &shape);
58 static void build_columns(
unsigned long n, BaseType *btp, std::vector<Array*> &arrays, Shape &shape);
60 static void read_values(
const std::vector<Array*> &arrays);
62 static void build_sequence_values(
const std::vector<Array*> &arrays, SequenceValues &sv);
63 static void combine_sequence_values(SequenceValues &dep,
const SequenceValues &indep);
64 static void add_index_column(
const Shape &indep_shape,
const Shape &dep_shape,
65 std::vector<Array*> &dep_vars);
71 setDescriptionString(
"The tabular() function transforms one or more arrays into a sequence.");
72 setUsageString(
"tabular()");
73 setRole(
"http://services.opendap.org/dap4/server-side-function/tabular");
74 setDocUrl(
"http://docs.opendap.org/index.php/Server_Side_Processing_Functions#tabular");
75 setFunction(libdap::TabularFunction::function_dap2_tabular);
static class NCMLUtil overview
friend class TabularFunctionTest
friend class Dap4_TabularFunctionTest
virtual ~TabularFunction()