diff options
Diffstat (limited to 'apps/SoilMoistureIo.h')
-rw-r--r-- | apps/SoilMoistureIo.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/SoilMoistureIo.h b/apps/SoilMoistureIo.h index 5324114..3e78f46 100644 --- a/apps/SoilMoistureIo.h +++ b/apps/SoilMoistureIo.h @@ -31,6 +31,10 @@ enum class sample_format_type { string to_string(const sample_format_type &arg); +std::ostream& operator<<(std::ostream& os, sample_format_type const& type); + +std::istream& operator>>(std::istream& is, sample_format_type& type); + class SampleStreamParser; class SampleOutputStream; @@ -270,6 +274,17 @@ private: shared_ptr<ostream> stream; }; +class KeyValueSampleOutputStream : public SampleOutputStream { +public: + KeyValueSampleOutputStream(shared_ptr<ostream> stream, KeyDictionary &dict); + + void write(SampleRecord sample) override; + +private: + KeyDictionary &dict; + shared_ptr<ostream> stream; +}; + class SqlSampleOutputStream : public SampleOutputStream { public: SqlSampleOutputStream(shared_ptr<ostream> stream, KeyDictionary &dict, string table_name); |