]> git.tdb.fi Git - libs/datafile.git/blob - tool/packer.h
351b45d3109c59bea04fd790e1825e4ac055a839
[libs/datafile.git] / tool / packer.h
1 #ifndef PACKER_H_
2 #define PACKER_H_
3
4 #include <string>
5 #include <msp/datafile/statement.h>
6 #include <msp/io/buffered.h>
7 #include <msp/io/file.h>
8
9 class DataTool;
10
11 class Packer
12 {
13 private:
14         struct Object
15         {
16                 std::string name;
17                 std::string keyword;
18         };
19
20         DataTool &tool;
21         Msp::IO::File *tmp_file;
22         Msp::IO::Buffered *tmp_buf;
23         std::list<Msp::DataFile::Statement> directory;
24         unsigned dir_alloc;
25
26 public:
27         Packer(DataTool &);
28 private:
29         static Msp::IO::File *tempfile();
30 public:
31         ~Packer();
32
33         void pack_file(const std::string &);
34         void create_pack(const std::string &);
35 };
36
37 #endif