aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-03-28 22:22:16 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2015-03-28 22:22:16 +0100
commit34669098e138d595aadc39fbf8c0cdd004c0916d (patch)
tree88baf25b2632cb60b4845ebe983c333c9418de89 /apps
parent8d9760f9bfc8be9b1abad9a8212b14ffd4552fd7 (diff)
downloadble-toys-34669098e138d595aadc39fbf8c0cdd004c0916d.tar.gz
ble-toys-34669098e138d595aadc39fbf8c0cdd004c0916d.tar.bz2
ble-toys-34669098e138d595aadc39fbf8c0cdd004c0916d.tar.xz
ble-toys-34669098e138d595aadc39fbf8c0cdd004c0916d.zip
o Adding back SQL output.
Diffstat (limited to 'apps')
-rw-r--r--apps/sample-convert.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/sample-convert.cpp b/apps/sample-convert.cpp
index 1cedf42..baa1447 100644
--- a/apps/sample-convert.cpp
+++ b/apps/sample-convert.cpp
@@ -16,9 +16,14 @@ using boost::tokenizer;
namespace po = boost::program_options;
class sample_convert : public app {
+private:
string fields;
string timestamp_field;
bool add_timestamp;
+ string input_file, output_file;
+ sample_format_type output_format;
+
+ string table_name;
public:
void add_options(po::options_description_easy_init &options) override {
@@ -74,6 +79,11 @@ public:
options.push_back(&tf);
+ table_name_option tno(table_name);
+ if (table_name != "") {
+ options.push_back(&tno);
+ }
+
tokenizer<> tok(fields);
output_fields_option fs;
std::copy(tok.begin(), tok.end(), std::back_inserter(fs.fields));
@@ -100,12 +110,6 @@ public:
return EXIT_SUCCESS;
}
-
-private:
- string input_file, output_file;
- sample_format_type output_format;
-
- string table_name;
};
}