]> git.tdb.fi Git - builder.git/blob - source/csourcefile.h
Inline simple constructors
[builder.git] / source / csourcefile.h
1 #ifndef CSOURCEFILE_H_
2 #define CSOURCEFILE_H_
3
4 #include <msp/io/base.h>
5 #include "sourcefile.h"
6
7 /**
8 Represents a C or C++ source file.
9 */
10 class CSourceFile: public SourceFile
11 {
12 protected:
13         std::vector<std::string> includes;
14
15 public:
16         CSourceFile(Builder &b, const Msp::FS::Path &p): SourceFile(b, p) { }
17         CSourceFile(Builder &, const Component &, const Msp::FS::Path &);
18
19         const char *get_type() const override { return "CSourceFile"; }
20         const std::vector<std::string> &get_includes() const { return includes; }
21 protected:
22         virtual void parse_includes(Msp::IO::Base &);
23         void find_dependencies() override;
24         void modified() override;
25 };
26
27 #endif