TECA
teca_table_remove_rows.h
1 #ifndef teca_table_remove_rows_h
2 #define teca_table_remove_rows_h
3 
4 #include "teca_shared_object.h"
5 #include "teca_algorithm.h"
6 #include "teca_metadata.h"
7 
8 #include <string>
9 #include <vector>
10 
11 TECA_SHARED_OBJECT_FORWARD_DECL(teca_table_remove_rows)
12 
13 
31 {
32 public:
33  TECA_ALGORITHM_STATIC_NEW(teca_table_remove_rows)
34  TECA_ALGORITHM_DELETE_COPY_ASSIGN(teca_table_remove_rows)
35  TECA_ALGORITHM_CLASS_NAME(teca_table_remove_rows)
37 
38  // report/initialize to/from Boost program options
39  // objects.
40  TECA_GET_ALGORITHM_PROPERTIES_DESCRIPTION()
41  TECA_SET_ALGORITHM_PROPERTIES()
42 
43  // set the expression to use to determine which rows
44  // are removed. rows are removed where the expression
45  // evaluates true.
46  void set_mask_expression(const std::string &expr);
47 
48  std::string get_mask_expression()
49  { return this->mask_expression; }
50 
51  // when set columns used in the calculation are removed
52  // from the output. deault off.
53  TECA_ALGORITHM_PROPERTY(int, remove_dependent_variables)
54 
55 protected:
57 
58 private:
59  const_p_teca_dataset execute(unsigned int port,
60  const std::vector<const_p_teca_dataset> &input_data,
61  const teca_metadata &request) override;
62 
63 private:
64  std::string mask_expression;
65  std::string postfix_expression;
66  std::set<std::string> dependent_variables;
67  int remove_dependent_variables;
68 };
69 
70 #endif
teca_metadata
Definition: teca_metadata.h:17
teca_table_remove_rows
Definition: teca_table_remove_rows.h:31
teca_algorithm
Definition: teca_algorithm.h:25