]> git.tdb.fi Git - libs/datafile.git/blobdiff - tool/tool.h
Restructure the tool and make it able to handle multiple input files
[libs/datafile.git] / tool / tool.h
index d10dc7d3187f6d4d73af8a6b574330b94359f05a..2cfcf1573514343da799ad9c1407237c2cf9b30e 100644 (file)
@@ -4,19 +4,26 @@
 #include <string>
 #include <msp/core/application.h>
 
-class DataTool: public Msp::Application
+class DataTool: public Msp::RegisteredApplication<DataTool>
 {
 private:
-       std::string in_fn;
+       std::vector<std::string> in_fns;
        std::string out_fn;
        bool binary;
        bool compile;
+       unsigned float_size;
+       bool compress;
 
 public:
        DataTool(int argc, char **argv);
-       int main();
 
-       static Application::RegApp<DataTool> reg;
+       virtual int main();
+private:
+       void do_transfer();
+       void do_compile();
+       Msp::IO::Base *open_output(const std::string &);
+       Msp::IO::Base *open_input(const std::string &);
+       void set_writer_parameters(Msp::DataFile::Writer &);
 };
 
 #endif