]> git.tdb.fi Git - builder.git/blob - source/objectfile.h
Put constructor helper functions next to the constructors
[builder.git] / source / objectfile.h
1 #ifndef OBJECTFILE_H_
2 #define OBJECTFILE_H_
3
4 #include "filetarget.h"
5
6 class Component;
7 class SourceFile;
8
9 /**
10 Object files are compiled from source files.
11 */
12 class ObjectFile: public FileTarget
13 {
14 private:
15         const Component ∁
16         SourceFile &source;
17         
18 public:
19         ObjectFile(Builder &, const Component &, SourceFile &);
20 private:
21         static Msp::FS::Path generate_target_path(const Component &, const std::string &);
22
23 public:
24         virtual const char *get_type() const { return "ObjectFile"; }
25         const Component &get_component() const { return comp; }
26         SourceFile &get_source() const { return source; }
27
28         /** Processes as many new dependences as possible.  Some may be created on
29         the fly and can't be processed until their own dependencies are ready.  In
30         such cases this function needs to be called again. */
31         virtual void find_depends();
32
33 private:
34         /** Recursively looks for header targets and adds them as dependencies. */
35         void find_depends(FileTarget *);
36 };
37
38 #endif