1 #ifndef SOURCEGENERATOR_H_
2 #define SOURCEGENERATOR_H_
4 #include <msp/datafile/objectloader.h>
5 #include "conditionalloader.h"
6 #include "sourcepackage.h"
11 class SourceGenerator: public Tool
14 class Loader: public Msp::DataFile::ObjectLoader<SourceGenerator>, public ConditionalLoader
17 Loader(SourceGenerator &);
20 void argument(const std::string &);
21 void arguments(const std::vector<std::string> &);
22 void command(const std::string &);
23 void in_suffix(const std::string &);
24 void out_argument(const std::string &);
25 void out_suffix(const std::string &);
29 const SourcePackage &package;
30 std::vector<std::string> out_suffixes;
31 std::vector<std::string> arguments;
32 std::string out_argument;
35 SourceGenerator(Builder &, const SourcePackage &, const std::string &);
37 Target *create_source(const Component &, const Msp::FS::Path &) const override;
38 Target *create_target(const std::vector<Target *> &, const std::string &) override;
41 static ExternalTask::Arguments _run(const SourceFile &, Msp::FS::Path &);