]> git.tdb.fi Git - builder.git/blob - source/objcsourcefile.cpp
Only get DataTransform directory contents when needed
[builder.git] / source / objcsourcefile.cpp
1 #include <msp/strings/regex.h>
2 #include "objcsourcefile.h"
3
4 using namespace std;
5 using namespace Msp;
6
7 ObjCSourceFile::ObjCSourceFile(Builder &b, const FS::Path &p):
8         CSourceFile(b, p)
9 { }
10
11 ObjCSourceFile::ObjCSourceFile(Builder &b, const Component &c, const FS::Path &p):
12         CSourceFile(b, c, p)
13 { }
14
15 void ObjCSourceFile::parse_includes(IO::Base &in)
16 {
17         static Regex r_include("^[ \t]*#(include|import)[ \t]+([\"<].*)[\">]");
18
19         string line;
20         while(in.getline(line))
21                 if(RegMatch match = r_include.match(line))
22                         includes.push_back(match[2].str);
23 }