]> git.tdb.fi Git - builder.git/blob - source/customizedtool.h
Add a helper class for tool customization
[builder.git] / source / customizedtool.h
1 #ifndef CUSTOMIZEDTOOL_H_
2 #define CUSTOMIZEDTOOL_H_
3
4 #include "tool.h"
5
6 class CustomizedTool: public Tool
7 {
8 protected:
9         Tool &parent;
10
11         CustomizedTool(Builder &, const std::string &, const Architecture &);
12         CustomizedTool(Tool &, const Architecture &);
13
14 public:
15         const Tool *get_base_tool() const override { return &parent; }
16         Target *create_source(const Component &, const Msp::FS::Path &) const override;
17         Target *create_source(const Msp::FS::Path &) const override;
18         Target *create_target(const std::vector<Target *> &, const std::string & = std::string()) override;
19         Target *create_install(Target &) const override;
20         std::string create_build_signature(const BuildInfo &) const override;
21 protected:
22         void do_prepare(ToolData &) const override;
23 };
24
25 #endif