]> git.tdb.fi Git - builder.git/blob - source/sourcefile.h
Move the logic for creating targets into the Component class
[builder.git] / source / sourcefile.h
1 #ifndef SOURCEFILE_H_
2 #define SOURCEFILE_H_
3
4 #include "target.h"
5
6 class Component;
7
8 /**
9 Represents a C or C++ source file.
10 */
11 class SourceFile: public Target
12 {
13 public:
14         SourceFile(Builder &, const Component *, const std::string &);
15         const StringList &get_includes() const { return includes; }
16         const char       *get_type() const     { return "SourceFile"; }
17         const Component  *get_component() const { return comp; }
18         void             find_depends();
19         Action           *build() { return 0; }
20 private:
21         const Component *comp;
22         StringList      includes;
23 };
24
25 #endif