create only the project files specified on cmdline
[reactos.git] / reactos / tools / rbuild / backend / devcpp / devcpp.h
1 /*
2 * Copyright (C) 2005 Trevor McCort
3 * Copyright (C) 2005 Casper S. Hornstrup
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19 #ifndef __DEVCPP_H__
20 #define __DEVCPP_H__
21
22 #include <fstream>
23 #include <vector>
24 #include <string>
25
26 #include "../backend.h"
27
28 class FileUnit
29 {
30 public:
31 std::string filename;
32 std::string folder;
33 };
34
35 class DevCppBackend : public Backend
36 {
37 public:
38
39 DevCppBackend(Project &project,
40 Configuration& configuration);
41 virtual ~DevCppBackend() {}
42
43 virtual void Process();
44
45 private:
46
47 void ProcessModules();
48 void ProcessFile(std::string &filename);
49
50 bool CheckFolderAdded(std::string &folder);
51 void AddFolders(std::string &folder);
52
53 void OutputFolders();
54 void OutputFileUnits();
55
56 std::vector<FileUnit> m_fileUnits;
57 std::vector<std::string> m_folders;
58
59 int m_unitCount;
60
61 std::ofstream m_devFile;
62 };
63
64 #endif // __DEVCPP_H__
65