]> git.tdb.fi Git - libs/datafile.git/blob - tool/tool.h
Add an unpack option to the data tool
[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::list<std::string> in_fns;
12         std::string out_fn;
13         bool binary;
14         bool compile;
15         unsigned float_size;
16         bool compress;
17         bool pack;
18         bool unpack;
19         bool debug;
20
21 public:
22         DataTool(int argc, char **argv);
23
24         virtual int main();
25 private:
26         void do_transfer();
27         void do_compile();
28         void do_pack();
29         void do_unpack();
30         Msp::IO::Base *open_output(const std::string &);
31         Msp::IO::Base *open_input(const std::string &);
32 public:
33         Msp::DataFile::Writer *create_writer(Msp::IO::Base &);
34 };
35
36 #endif