Merge trunk HEAD (r46369)
[reactos.git] / reactos / tools / rbuild / backend / msbuild / msbuild.h
1 /*
2 * Copyright (C) 2007 Christoph von Wittich
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19 #pragma once
20
21 #include <fstream>
22 #include <vector>
23 #include <string>
24
25 #include "../backend.h"
26
27 class MsBuildConfiguration
28 {
29 public:
30 MsBuildConfiguration(const std::string &name = "");
31 virtual ~MsBuildConfiguration() {}
32 std::string name;
33 };
34
35 class MsBuildBackend : public Backend
36 {
37 public:
38
39 MsBuildBackend(Project &project,
40 Configuration& configuration);
41 virtual ~MsBuildBackend() {}
42
43 virtual void Process();
44
45 private:
46
47 FILE* m_MsBuildFile;
48
49 std::vector<MsBuildConfiguration*> m_configurations;
50 void _generate_makefile ( const Module& module );
51 void _generate_sources ( const Module& module );
52 void _clean_project_files ( void );
53 void ProcessModules();
54 const Property* _lookup_property ( const Module& module, const std::string& name ) const;
55 std::string _replace_str(std::string string1, const std::string &find_str, const std::string &replace_str);
56
57 struct module_data
58 {
59 std::vector <std::string> libraries;
60 std::vector <std::string> references;
61
62 module_data()
63 {}
64 ~module_data()
65 {}
66 };
67
68 };