]> git.tdb.fi Git - builder.git/blob - source/sourcegenerator.h
A bunch of minor cleanups
[builder.git] / source / sourcegenerator.h
1 #ifndef SOURCEGENERATOR_H_
2 #define SOURCEGENERATOR_H_
3
4 #include <msp/datafile/objectloader.h>
5 #include "sourcepackage.h"
6 #include "tool.h"
7
8 class SourceGenerator: public Tool
9 {
10 public:
11         class Loader: public Msp::DataFile::ObjectLoader<SourceGenerator>
12         {
13         public:
14                 Loader(SourceGenerator &);
15
16         private:
17                 void command(const std::string &);
18                 void in_suffix(const std::string &);
19                 void out_suffix(const std::string &);
20         };
21
22 private:
23         const SourcePackage &package;
24         std::list<std::string> out_suffixes;
25
26 public:
27         SourceGenerator(Builder &, const SourcePackage &, const std::string &);
28
29         virtual Target *create_source(const Component &, const Msp::FS::Path &) const;
30         virtual Target *create_target(const std::list<Target *> &, const std::string &);
31
32         virtual Task *run(const Target &) const;
33 };
34
35 #endif