Commit 68ece789 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

configure_strings -> expr_to_strings

parent f99eb209
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -204,24 +204,6 @@ ReturnCode parse_data_series_csv(
  }
}

ReturnCode configure_strings(
    const Expr* prop,
    std::vector<std::string>* data) {
  if (plist::is_enum(prop, "csv")) {
    SeriesRef d;
    if (auto rc = parse_data_series_csv(prop, &d); !rc) {
      return rc;
    }

    for (auto v : *d) {
      data->emplace_back(v);
    }

    return OK;
  }

  return configure_vec<std::string>(bind(&configure_string, _1, _2), data)(prop);
}
*/
} // namespace fviz
+6 −0
Original line number Diff line number Diff line
@@ -32,6 +32,12 @@ ReturnCode expr_to_string(
  return OK;
}

ReturnCode expr_to_strings(
    const Expr* expr,
    std::vector<std::string>* values) {
  return expr_tov<std::string>(expr, bind(&expr_to_string, _1, _2), values);
}

ReturnCode expr_to_measure(
    const Expr* expr,
    Measure* value) {
+4 −0
Original line number Diff line number Diff line
@@ -27,6 +27,10 @@ ReturnCode expr_to_string(
    const Expr* prop,
    std::string* value);

ReturnCode expr_to_strings(
    const Expr* prop,
    std::vector<std::string>* values);

ReturnCode expr_to_measure(
    const Expr* expr,
    Measure* value);