]> git.tdb.fi Git - builder.git/blob - source/header.h
Better use of OOP in determining file install locations
[builder.git] / source / header.h
1 #ifndef HEADER_H_
2 #define HEADER_H_
3
4 #include "component.h"
5 #include "sourcefile.h"
6
7 /**
8 Represents a header file.  Mainly exists to give extra information to the user.
9 */
10 class Header: public SourceFile
11 {
12 protected:
13         Header(Builder &b, const std::string &f): SourceFile(b, f) { }
14 public:
15         Header(Builder &b, const Component &c, const std::string &f): SourceFile(b, c, f) { install_location = "include/"+c.get_name(); }
16         virtual const char *get_type() const { return "Header"; }
17 };
18
19 /**
20 A header file that doesn't belong to any known package.
21 */
22 class SystemHeader: public Header
23 {
24 public:
25         SystemHeader(Builder &b, const std::string &f): Header(b, f) { }
26         virtual const char *get_type() const { return "SystemHeader"; }
27 };
28
29 #endif