]> git.tdb.fi Git - libs/datafile.git/blob - tool/builtingenerator.h
Move the definition of Input's operator bool to the header
[libs/datafile.git] / tool / builtingenerator.h
1 #ifndef TOOL_BUILTINGENERATOR_H_
2 #define TOOL_BUILTINGENERATOR_H_
3
4 #include <string>
5 #include <vector>
6 #include <msp/io/file.h>
7
8 class BuiltinGenerator
9 {
10 private:
11         struct File
12         {
13                 std::string filename;
14                 std::size_t size = 0;
15         };
16
17         Msp::IO::Base &out;
18         std::vector<std::string> namespc;
19         std::vector<File> files;
20
21 public:
22         BuiltinGenerator(Msp::IO::Base &);
23
24         void begin(const std::string &);
25         void add_file(const std::string &);
26         void end(const std::string &);
27
28 private:
29         static std::string mangle_filename(const std::string &);
30 };
31
32 #endif