]> git.tdb.fi Git - libs/datafile.git/blob - tool/tool.h
Create writers dynamically and delete them before deleting output
[libs/datafile.git] / tool / tool.h
1 #ifndef TOOL_H_
2 #define TOOL_H_
3
4 #include <string>
5 #include <msp/core/application.h>
6 #include <msp/datafile/writer.h>
7
8 class DataTool: public Msp::RegisteredApplication<DataTool>
9 {
10 private:
11         std::vector<std::string> in_fns;
12         std::string out_fn;
13         bool binary;
14         bool compile;
15         unsigned float_size;
16         bool compress;
17
18 public:
19         DataTool(int argc, char **argv);
20
21         virtual int main();
22 private:
23         void do_transfer();
24         void do_compile();
25         Msp::IO::Base *open_output(const std::string &);
26         Msp::IO::Base *open_input(const std::string &);
27 public:
28         Msp::DataFile::Writer *create_writer(Msp::IO::Base &);
29 };
30
31 #endif