]> git.tdb.fi Git - builder.git/blobdiff - source/sourcefile.h
Move the logic for creating targets into the Component class
[builder.git] / source / sourcefile.h
index b1ec8294f578d796ab85f61cb83ea804ebe50b55..d50612a7f6282173a67db11d8ffc3cbb0b9b63be 100644 (file)
@@ -5,17 +5,21 @@
 
 class Component;
 
+/**
+Represents a C or C++ source file.
+*/
 class SourceFile: public Target
 {
 public:
        SourceFile(Builder &, const Component *, const std::string &);
-       const std::list<std::string> &get_includes() const { return includes; }
-       const char *get_type() const { return "SourceFile"; }
-       void find_depends();
-       Action *build() { rebuild=false; return 0; }
+       const StringList &get_includes() const { return includes; }
+       const char       *get_type() const     { return "SourceFile"; }
+       const Component  *get_component() const { return comp; }
+       void             find_depends();
+       Action           *build() { return 0; }
 private:
        const Component *comp;
-       std::list<std::string> includes;
+       StringList      includes;
 };
 
 #endif