]> git.tdb.fi Git - builder.git/blobdiff - source/header.h
Simplify InstalledFile::generate_target_path
[builder.git] / source / header.h
index 56e563408ca622030f10cb842a795aac772b939a..445fc9c163b32e67caf2318fedf0afdcb34f8c15 100644 (file)
@@ -1,21 +1,29 @@
 #ifndef HEADER_H_
 #define HEADER_H_
 
+#include "component.h"
 #include "sourcefile.h"
 
+/**
+Represents a header file.  Mainly exists to give extra information to the user.
+*/
 class Header: public SourceFile
 {
+protected:
+       Header(Builder &b, const std::string &f): SourceFile(b, f) { }
 public:
-       Header(Builder &b, const Component *c, const std::string &f): SourceFile(b,c,f) { }
-       const char *get_type() const { return "Header"; }
+       Header(Builder &b, const Component &c, const std::string &f): SourceFile(b, c, f) { install_location = "include/"+c.get_name(); }
+       virtual const char *get_type() const { return "Header"; }
 };
 
+/**
+A header file that doesn't belong to any known package.
+*/
 class SystemHeader: public Header
 {
 public:
-       SystemHeader(Builder &b, const std::string &f): Header(b,0,f) { }
-       const char *get_type() const { return "SystemHeader"; }
-       void find_depends() { deps_ready=true; }
+       SystemHeader(Builder &b, const std::string &f): Header(b, f) { }
+       virtual const char *get_type() const { return "SystemHeader"; }
 };
 
 #endif