]> git.tdb.fi Git - libs/datafile.git/blob - tool/tool.h
Cosmetic changes
[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 builtin;
20         std::string builtin_ns;
21         std::string builtin_module;
22         bool debug;
23
24 public:
25         DataTool(int argc, char **argv);
26
27         virtual int main();
28 private:
29         void do_transfer();
30         void do_compile();
31         void do_pack();
32         void do_unpack();
33         void do_generate_builtin();
34         Msp::IO::Base *open_output(const std::string &);
35         Msp::IO::Base *open_input(const std::string &);
36 public:
37         Msp::DataFile::Writer *create_writer(Msp::IO::Base &);
38 };
39
40 #endif