diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-03-17 23:02:23 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-03-17 23:02:23 +0100 |
commit | 225ed55918377ba2b53bb535cb636bfae8fc1ab4 (patch) | |
tree | 56ef2a8ceb9d11344a2a26a71a1f10b0cf2eb4bb /apps/SoilMoistureIo.h | |
parent | 7edc4328bfd5eee557108ebdb4243ca06914c41e (diff) | |
download | ble-toys-225ed55918377ba2b53bb535cb636bfae8fc1ab4.tar.gz ble-toys-225ed55918377ba2b53bb535cb636bfae8fc1ab4.tar.bz2 ble-toys-225ed55918377ba2b53bb535cb636bfae8fc1ab4.tar.xz ble-toys-225ed55918377ba2b53bb535cb636bfae8fc1ab4.zip |
o Renaming CsvSampleParser to KeyValueSampleParser.
Diffstat (limited to 'apps/SoilMoistureIo.h')
-rw-r--r-- | apps/SoilMoistureIo.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/SoilMoistureIo.h b/apps/SoilMoistureIo.h index 0d93d2a..5324114 100644 --- a/apps/SoilMoistureIo.h +++ b/apps/SoilMoistureIo.h @@ -24,6 +24,7 @@ using o = boost::optional<A>; enum class sample_format_type { AUTO, CSV, + KEY_VALUE, JSON, SQL }; @@ -296,11 +297,10 @@ protected: } }; -// TODO: rename to "KeyValueParser", this is not CSV. -class CsvSampleParser : public SampleStreamParser { +class KeyValueSampleParser : public SampleStreamParser { public: - CsvSampleParser(shared_ptr<SampleOutputStream> output, KeyDictionary &dict) : + KeyValueSampleParser(shared_ptr<SampleOutputStream> output, KeyDictionary &dict) : SampleStreamParser(sample_format_type::CSV), output(output), dict(dict), line(make_shared<vector<uint8_t>>()) { } @@ -322,7 +322,7 @@ public: private: unique_ptr<SampleStreamParser> parser; - unique_ptr<CsvSampleParser> csvParser; + unique_ptr<KeyValueSampleParser> keyValueParser; public: virtual void process(mutable_buffers_1 buffer); }; |