X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftool.h;h=36d1be165b4f614a994d99ca08bcda4b37674ecd;hb=37ffa892c453a91f06d34068e239e1ba316d7700;hp=c302f3cffb432949706d4967a3ec18344e273738;hpb=e09cea0ffcef4ab5ea35c47c5b34237c44d0741f;p=builder.git diff --git a/source/tool.h b/source/tool.h index c302f3c..36d1be1 100644 --- a/source/tool.h +++ b/source/tool.h @@ -10,6 +10,10 @@ class Component; class Target; class Task; +/** +Base class for tools. Tools are used to turn targets into other targets. +Examples include compilers and linkers. +*/ class Tool { public: @@ -40,4 +44,17 @@ public: virtual Task *run(const Target &) const = 0; }; +/** +Intermediate base class for tool facets. For example, a linker may need to +use different commands depending on whether C++ source files are present or +not, but their presence can't be directly determined from the object files. +*/ +class SubTool: public Tool +{ +protected: + Tool &parent; + + SubTool(Tool &); +}; + #endif