]> git.tdb.fi Git - builder.git/blobdiff - source/tool.h
Make VirtualFileSystem able to find binaries
[builder.git] / source / tool.h
index c302f3cffb432949706d4967a3ec18344e273738..36d1be165b4f614a994d99ca08bcda4b37674ecd 100644 (file)
@@ -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