* Generate kernel
[reactos.git] / reactos / tools / rbuild / rbuild.h
1 #ifndef __RBUILD_H
2 #define __RBUILD_H
3
4 #include "pch.h"
5
6 #include "ssprintf.h"
7 #include "exception.h"
8 #include "XML.h"
9
10 class Project;
11 class Module;
12 class File;
13 class Library;
14
15 class Project
16 {
17 public:
18 std::string name;
19 std::string makefile;
20 std::vector<Module*> modules;
21
22 Project ();
23 Project ( const std::string& filename );
24 ~Project ();
25 void ProcessXML ( const XMLElement& e,
26 const std::string& path );
27 Module* LocateModule ( std::string name );
28 private:
29 void ReadXml ();
30 XMLFile xmlfile;
31 XMLElement* head;
32 };
33
34
35 enum ModuleType
36 {
37 BuildTool,
38 StaticLibrary,
39 KernelModeDLL
40 };
41
42 class Module
43 {
44 public:
45 Project* project;
46 const XMLElement& node;
47 std::string name;
48 std::string path;
49 ModuleType type;
50 std::vector<File*> files;
51 std::vector<Library*> libraries;
52
53 Module ( Project* project,
54 const XMLElement& moduleNode,
55 const std::string& moduleName,
56 const std::string& modulePath );
57 ~Module();
58 ModuleType GetModuleType (const XMLAttribute& attribute );
59 std::string GetPath ();
60 void ProcessXML ( const XMLElement& e, const std::string& path );
61 };
62
63
64 class File
65 {
66 public:
67 std::string name;
68
69 File ( const std::string& _name );
70 };
71
72
73 class Library
74 {
75 public:
76 std::string name;
77
78 Library ( const std::string& _name );
79 };
80
81 #endif /* __RBUILD_H */