]> git.tdb.fi Git - builder.git/blob - source/objectfile.h
Reorder class members
[builder.git] / source / objectfile.h
1 /* $Id$
2
3 This file is part of builder
4 Copyright © 2006-2009  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef OBJECTFILE_H_
9 #define OBJECTFILE_H_
10
11 #include "target.h"
12
13 class Component;
14 class SourceFile;
15
16 /**
17 Object files are compiled from source files.
18 */
19 class ObjectFile: public Target
20 {
21 private:
22         const Component ∁
23         TargetList new_deps;
24         
25 public:
26         ObjectFile(Builder &, const Component &, SourceFile &);
27         virtual const char *get_type() const { return "ObjectFile"; }
28         const Component &get_component() const { return comp; }
29
30         /** Processes as many new dependences as possible.  Some may be created on
31         the fly and can't be processed until their own dependencies are ready.  In
32         such cases this function needs to be called again. */
33         virtual void find_depends();
34
35 private:
36         /** Recursively looks for header targets and adds them as dependencies. */
37         void find_depends(Target *);
38
39         /** Adds a target to the dependency list as well as the new dependencies
40         list. */
41         void add_depend(Target *);
42         virtual Action *create_action();
43
44         static std::string generate_target_name(const Component &, const std::string &);
45 };
46
47 #endif